Profile
Current user profile. Requires a user token (API keys are 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
| Field | Type | Description |
|---|---|---|
| id | integer | |
| name | string | |
| string | ||
| type | integer | |
| color | string | |
| avatar | string | |
| modules | object | Feature-module flags relevant to client UIs, such as gating ticket charges in RivetIT's mobile app. |
| modules.accounting_enabled | boolean | |
| modules.ticket_charges_enabled | boolean | |
| is_admin | boolean | The login's role is an administrator role (every permission is 3). |
| limited | boolean | A module-only login (no Departments, Tickets/assets/docs or Assets, e.g. Training only). The API then allows only /me, /notifications and /kb, /reports, /alerts for modules the role holds; everything else answers 403. |
| permissions | object | Every module (module_client, module_support, module_assets, module_training, ...) with this login's level - 0 none, 1 view, 2 edit, 3 full - so the app can hide screens it cannot open. Asset screens accept module_assets or module_support. |
Example response
json
{
"id": 1,
"name": "string",
"email": "string",
"type": 1,
"color": "string",
"avatar": "string",
"modules": {
"accounting_enabled": true,
"ticket_charges_enabled": true
},
"is_admin": true,
"limited": true,
"permissions": {}
}
Update profile / password (alias of PUT - FCM push and biometric key registration require PUT)
Request body (application/json, required)
| Field | Type | Description |
|---|---|---|
| name | string | |
| 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
| Field | Type | Description |
|---|---|---|
| ok | boolean |
Example response
json
{
"ok": true
}
400Bad request
| Field | Type | Description |
|---|---|---|
| error | string |
401Missing or invalid credentials
| Field | Type | Description |
|---|---|---|
| error | string |
Update profile / password, or register FCM push or biometric key
Request body (application/json, required)
| Field | Type | Description |
|---|---|---|
| name | string | |
| 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
| Field | Type | Description |
|---|---|---|
| ok | boolean |
Example response
json
{
"ok": true
}
400Bad request
| Field | Type | Description |
|---|---|---|
| error | string |
401Missing or invalid credentials
| Field | Type | Description |
|---|---|---|
| error | string |