Skip to content

API reference / RivetMSP

Profile

GET /me Bearer token or API key

Current user profile. Requires a user token — legacy API key is denied.

Example request

curl "https://YOUR-HOST/api/v1/me" \
  -H "Authorization: Bearer $TOKEN"
import requests

response = requests.get(
    "https://YOUR-HOST/api/v1/me",
    headers={"Authorization": f"Bearer {TOKEN}"},
)
print(response.json())
const response = await fetch("https://YOUR-HOST/api/v1/me", {
  method: "GET",
  headers: { "Authorization": `Bearer ${TOKEN}` },
});
const data = await response.json();
$ch = curl_init("https://YOUR-HOST/api/v1/me");
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST => "GET",
    CURLOPT_HTTPHEADER => ["Authorization: Bearer $token"],
]);
$data = json_decode(curl_exec($ch), true);

Responses

200Profile

FieldTypeDescription
id integer
name string
email string
type integer
color string
avatar string
Example response
json
{
    "id": 1,
    "name": "string",
    "email": "string",
    "type": 1,
    "color": "string",
    "avatar": "string"
}
POST /me Bearer token or API key

Update profile / password (alias of PUT - FCM push and biometric key registration require PUT)

Request body (application/json, required)

FieldTypeDescription
name string
email string
current_password string
new_password string
fcm_token string
device_public_key_pem string

Example request

curl -X POST "https://YOUR-HOST/api/v1/me" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"name":"string","email":"string","current_password":"string","new_password":"string","fcm_token":"string","device_public_key_pem":"string"}'
import requests

response = requests.post(
    "https://YOUR-HOST/api/v1/me",
    headers={"Authorization": f"Bearer {TOKEN}"},
    json={
        "name": "string",
        "email": "string",
        "current_password": "string",
        "new_password": "string",
        "fcm_token": "string",
        "device_public_key_pem": "string"
    },
)
print(response.json())
const response = await fetch("https://YOUR-HOST/api/v1/me", {
  method: "POST",
  headers: { "Authorization": `Bearer ${TOKEN}`, "Content-Type": "application/json" },
  body: JSON.stringify({
      "name": "string",
      "email": "string",
      "current_password": "string",
      "new_password": "string",
      "fcm_token": "string",
      "device_public_key_pem": "string"
  }),
});
const data = await response.json();
$ch = curl_init("https://YOUR-HOST/api/v1/me");
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST => "POST",
    CURLOPT_HTTPHEADER => ["Authorization: Bearer $token", "Content-Type: application/json"],
    CURLOPT_POSTFIELDS => '{"name":"string","email":"string","current_password":"string","new_password":"string","fcm_token":"string","device_public_key_pem":"string"}',
]);
$data = json_decode(curl_exec($ch), true);

Responses

200Success

FieldTypeDescription
ok boolean
Example response
json
{
    "ok": true
}

400Bad request

FieldTypeDescription
error string

401Missing or invalid credentials

FieldTypeDescription
error string
PUT /me Bearer token or API key

Update profile / password, or register FCM push or biometric key

Request body (application/json, required)

FieldTypeDescription
name string
email string
current_password string
new_password string
fcm_token string
device_public_key_pem string

Example request

curl -X PUT "https://YOUR-HOST/api/v1/me" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"name":"string","email":"string","current_password":"string","new_password":"string","fcm_token":"string","device_public_key_pem":"string"}'
import requests

response = requests.put(
    "https://YOUR-HOST/api/v1/me",
    headers={"Authorization": f"Bearer {TOKEN}"},
    json={
        "name": "string",
        "email": "string",
        "current_password": "string",
        "new_password": "string",
        "fcm_token": "string",
        "device_public_key_pem": "string"
    },
)
print(response.json())
const response = await fetch("https://YOUR-HOST/api/v1/me", {
  method: "PUT",
  headers: { "Authorization": `Bearer ${TOKEN}`, "Content-Type": "application/json" },
  body: JSON.stringify({
      "name": "string",
      "email": "string",
      "current_password": "string",
      "new_password": "string",
      "fcm_token": "string",
      "device_public_key_pem": "string"
  }),
});
const data = await response.json();
$ch = curl_init("https://YOUR-HOST/api/v1/me");
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST => "PUT",
    CURLOPT_HTTPHEADER => ["Authorization: Bearer $token", "Content-Type: application/json"],
    CURLOPT_POSTFIELDS => '{"name":"string","email":"string","current_password":"string","new_password":"string","fcm_token":"string","device_public_key_pem":"string"}',
]);
$data = json_decode(curl_exec($ch), true);

Responses

200Success

FieldTypeDescription
ok boolean
Example response
json
{
    "ok": true
}

400Bad request

FieldTypeDescription
error string

401Missing or invalid credentials

FieldTypeDescription
error string