API reference / Operations by tag
users
Staff users of a tenant, their roles and status.
30 operations. Base URL https://api.metrixed.com/v1; see authentication, errors and pagination.
Operations
| Method | Path | Summary |
|---|---|---|
| GET | /account-managers | Staff who can be assigned partners / advertisers, with the size of their book and whether their role is restricted to assigned accounts |
| GET | /audit-log | Audit log |
| GET | /employees | List Employees |
| POST | /employees | Create Employee |
| GET | /employees/{id} | Get Employee |
| PATCH | /employees/{id} | Update Employee |
| DELETE | /employees/{id} | Delete Employee |
| POST | /employees/bulk/apply | Bulk edit apply |
| POST | /employees/bulk/preview | Bulk edit preview |
| POST | /employees/search | Search Employees (advanced) |
| GET | /me/saved-views | List my saved list views and the team's shared ones for a screen (?screen=/offers) |
| POST | /me/saved-views | Save a list view (is_shared: visible to the whole team; is_default: opens by default for me) |
| PATCH | /me/saved-views/{id} | Rename, re-share, make default or overwrite the state of one of my views |
| DELETE | /me/saved-views/{id} | Delete one of my saved views |
| GET | /roles | List Roles |
| POST | /roles | Create Role |
| GET | /roles/{id} | Get Role |
| PATCH | /roles/{id} | Update Role |
| DELETE | /roles/{id} | Delete Role |
| POST | /roles/bulk/apply | Bulk edit apply |
| POST | /roles/bulk/preview | Bulk edit preview |
| POST | /roles/search | Search Roles (advanced) |
| GET | /users | List Users |
| POST | /users | Create User |
| GET | /users/{id} | Get User |
| PATCH | /users/{id} | Update User |
| DELETE | /users/{id} | Delete User |
| POST | /users/bulk/apply | Bulk edit apply |
| POST | /users/bulk/preview | Bulk edit preview |
| POST | /users/search | Search Users (advanced) |
GET /account-managers
Staff who can be assigned partners / advertisers, with the size of their book and whether their role is restricted to assigned accounts
Operation getAccountManagers. Auth: API key (Bearer) or session cookie.
| Status | Description | Body |
|---|---|---|
| 200 | ok | application/json AccountManagerList |
| default | error | application/json Error |
curl 'https://api.metrixed.com/v1/account-managers' \
-H "Authorization: Bearer $DT_API_KEY" \
-H 'Accept: application/json'
Example 200 response:
{
"data": [
{}
],
"total": 0
}
GET /audit-log
Audit log
Operation getAuditLog. Auth: API key (Bearer) or session cookie.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
page | query | integer | no | |
page_size | query | integer | no | |
sort | query | string | no | field or -field |
include | query | string | no | comma-separated relationships |
filter | query | object (free-form) | no | |
q | query | string | no | free-text search |
| Status | Description | Body |
|---|---|---|
| 200 | ok | application/json AuditEntryList |
| default | error | application/json Error |
curl 'https://api.metrixed.com/v1/audit-log?page=1&page_size=50' \
-H "Authorization: Bearer $DT_API_KEY" \
-H 'Accept: application/json'
Example 200 response:
{
"data": [
{}
],
"page": {}
}
GET /employees
List Employees
Operation getEmployees. Auth: API key (Bearer) or session cookie.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
page | query | integer | no | |
page_size | query | integer | no | |
sort | query | string | no | field or -field |
include | query | string | no | comma-separated relationships |
filter | query | object (free-form) | no | |
q | query | string | no | free-text search |
| Status | Description | Body |
|---|---|---|
| 200 | ok | application/json EmployeeList |
| default | error | application/json Error |
curl 'https://api.metrixed.com/v1/employees?page=1&page_size=50' \
-H "Authorization: Bearer $DT_API_KEY" \
-H 'Accept: application/json'
Example 200 response:
{
"data": [
{}
],
"page": {}
}
POST /employees
Create Employee
Operation postEmployees. Auth: API key (Bearer) or session cookie.
Request body (application/json, required): EmployeeCreate
| Field | Type | Flags | Description |
|---|---|---|---|
user_id | string | required | |
role_id | string | required | |
business_unit_id | string | ||
title | string | ||
work_phone | string | ||
cell_phone | string | ||
instant_messaging | object (free-form) | ||
is_account_manager | boolean | ||
is_sales_manager | boolean | ||
signature | string | ||
status | string |
curl -X POST 'https://api.metrixed.com/v1/employees' \
-H "Authorization: Bearer $DT_API_KEY" \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
--data-raw '{"user_id":"","role_id":""}'
Example 201 response:
{
"external_ref": ""
}
GET /employees/{id}
Get Employee
Operation getEmployeesId. Auth: API key (Bearer) or session cookie.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | yes |
curl 'https://api.metrixed.com/v1/employees/<id>' \
-H "Authorization: Bearer $DT_API_KEY" \
-H 'Accept: application/json'
Example 200 response:
{
"external_ref": ""
}
PATCH /employees/{id}
Update Employee
Operation patchEmployeesId. Auth: API key (Bearer) or session cookie.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | yes |
Request body (application/json, required): EmployeeUpdate
| Field | Type | Flags | Description |
|---|---|---|---|
user_id | string | ||
role_id | string | ||
business_unit_id | string | ||
title | string | ||
work_phone | string | ||
cell_phone | string | ||
instant_messaging | object (free-form) | ||
is_account_manager | boolean | ||
is_sales_manager | boolean | ||
signature | string | ||
status | string |
curl -X PATCH 'https://api.metrixed.com/v1/employees/<id>' \
-H "Authorization: Bearer $DT_API_KEY" \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
--data-raw '{"user_id":"","role_id":"","business_unit_id":"","title":""}'
Example 200 response:
{
"external_ref": ""
}
DELETE /employees/{id}
Delete Employee
Operation deleteEmployeesId. Auth: API key (Bearer) or session cookie.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | yes |
curl -X DELETE 'https://api.metrixed.com/v1/employees/<id>' \
-H "Authorization: Bearer $DT_API_KEY" \
-H 'Accept: application/json'
Example 204 response:
{
"ok": false
}
POST /employees/bulk/apply
Bulk edit apply
Operation postEmployeesBulkApply. Auth: API key (Bearer) or session cookie.
Request body (application/json, required): BulkPatch
| Field | Type | Flags | Description |
|---|---|---|---|
ids | array of string | required | |
patches | array of object | required |
| Status | Description | Body |
|---|---|---|
| 200 | ok | application/json BulkPreview |
| default | error | application/json Error |
curl -X POST 'https://api.metrixed.com/v1/employees/bulk/apply' \
-H "Authorization: Bearer $DT_API_KEY" \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
--data-raw '{"ids":[""],"patches":[{"field":"","value":{}}]}'
Example 200 response:
{
"affected": 0,
"changes": [
{}
],
"warnings": [
""
],
"token": ""
}
POST /employees/bulk/preview
Bulk edit preview
Operation postEmployeesBulkPreview. Auth: API key (Bearer) or session cookie.
Request body (application/json, required): BulkPatch
| Field | Type | Flags | Description |
|---|---|---|---|
ids | array of string | required | |
patches | array of object | required |
| Status | Description | Body |
|---|---|---|
| 200 | ok | application/json BulkPreview |
| default | error | application/json Error |
curl -X POST 'https://api.metrixed.com/v1/employees/bulk/preview' \
-H "Authorization: Bearer $DT_API_KEY" \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
--data-raw '{"ids":[""],"patches":[{"field":"","value":{}}]}'
Example 200 response:
{
"affected": 0,
"changes": [
{}
],
"warnings": [
""
],
"token": ""
}
POST /employees/search
Search Employees (advanced)
Operation postEmployeesSearch. Auth: API key (Bearer) or session cookie.
Request body (application/json, required): SearchRequest
| Field | Type | Flags | Description |
|---|---|---|---|
filters | array of object | ||
search | string | ||
sort | array of object (free-form) | ||
page | integer | ||
page_size | integer | ||
include | array of string |
| Status | Description | Body |
|---|---|---|
| 200 | ok | application/json EmployeeList |
| default | error | application/json Error |
curl -X POST 'https://api.metrixed.com/v1/employees/search' \
-H "Authorization: Bearer $DT_API_KEY" \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
--data-raw '{"filters":[{}],"search":"","sort":[{}],"page":0}'
Example 200 response:
{
"data": [
{}
],
"page": {}
}
GET /me/saved-views
List my saved list views and the team's shared ones for a screen (?screen=/offers)
Operation getMeSavedViews. Auth: API key (Bearer) or session cookie.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
screen | query | string | yes |
| Status | Description | Body |
|---|---|---|
| 200 | ok | application/json SavedListViewList |
| default | error | application/json Error |
curl 'https://api.metrixed.com/v1/me/saved-views' \
-H "Authorization: Bearer $DT_API_KEY" \
-H 'Accept: application/json'
Example 200 response:
{}
POST /me/saved-views
Save a list view (is_shared: visible to the whole team; is_default: opens by default for me)
Operation postMeSavedViews. Auth: API key (Bearer) or session cookie.
Request body (application/json, required): SavedListView
| Status | Description | Body |
|---|---|---|
| 201 | ok | application/json SavedListView |
| default | error | application/json Error |
curl -X POST 'https://api.metrixed.com/v1/me/saved-views' \
-H "Authorization: Bearer $DT_API_KEY" \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
--data-raw '{}'
Example 201 response:
{}
PATCH /me/saved-views/{id}
Rename, re-share, make default or overwrite the state of one of my views
Operation patchMeSavedViewsId. Auth: API key (Bearer) or session cookie.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | yes |
Request body (application/json, required): SavedListView
| Status | Description | Body |
|---|---|---|
| 200 | ok | application/json SavedListViewPatchResult |
| default | error | application/json Error |
curl -X PATCH 'https://api.metrixed.com/v1/me/saved-views/<id>' \
-H "Authorization: Bearer $DT_API_KEY" \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
--data-raw '{}'
Example 200 response:
{}
DELETE /me/saved-views/{id}
Delete one of my saved views
Operation deleteMeSavedViewsId. Auth: API key (Bearer) or session cookie.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | yes |
curl -X DELETE 'https://api.metrixed.com/v1/me/saved-views/<id>' \
-H "Authorization: Bearer $DT_API_KEY" \
-H 'Accept: application/json'
Example 204 response:
{
"ok": false
}
GET /roles
List Roles
Operation getRoles. Auth: API key (Bearer) or session cookie.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
page | query | integer | no | |
page_size | query | integer | no | |
sort | query | string | no | field or -field |
include | query | string | no | comma-separated relationships |
filter | query | object (free-form) | no | |
q | query | string | no | free-text search |
curl 'https://api.metrixed.com/v1/roles?page=1&page_size=50' \
-H "Authorization: Bearer $DT_API_KEY" \
-H 'Accept: application/json'
Example 200 response:
{
"data": [
{}
],
"page": {}
}
POST /roles
Create Role
Operation postRoles. Auth: API key (Bearer) or session cookie.
Request body (application/json, required): RoleCreate
| Field | Type | Flags | Description |
|---|---|---|---|
key | string | required | |
name | string | required | |
principal_type | enum: employee, partner_user, advertiser_user | required | |
permissions | object (free-form) | resource -> {read,write,scope} |
curl -X POST 'https://api.metrixed.com/v1/roles' \
-H "Authorization: Bearer $DT_API_KEY" \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
--data-raw '{"key":"","name":"","principal_type":"employee"}'
Example 201 response:
{
"external_ref": ""
}
GET /roles/{id}
Get Role
Operation getRolesId. Auth: API key (Bearer) or session cookie.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | yes |
curl 'https://api.metrixed.com/v1/roles/<id>' \
-H "Authorization: Bearer $DT_API_KEY" \
-H 'Accept: application/json'
Example 200 response:
{
"external_ref": ""
}
PATCH /roles/{id}
Update Role
Operation patchRolesId. Auth: API key (Bearer) or session cookie.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | yes |
Request body (application/json, required): RoleUpdate
| Field | Type | Flags | Description |
|---|---|---|---|
key | string | ||
name | string | ||
principal_type | enum: employee, partner_user, advertiser_user | ||
permissions | object (free-form) | resource -> {read,write,scope} |
curl -X PATCH 'https://api.metrixed.com/v1/roles/<id>' \
-H "Authorization: Bearer $DT_API_KEY" \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
--data-raw '{"key":"","name":"","principal_type":"employee","permissions":{}}'
Example 200 response:
{
"external_ref": ""
}
DELETE /roles/{id}
Delete Role
Operation deleteRolesId. Auth: API key (Bearer) or session cookie.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | yes |
curl -X DELETE 'https://api.metrixed.com/v1/roles/<id>' \
-H "Authorization: Bearer $DT_API_KEY" \
-H 'Accept: application/json'
Example 204 response:
{
"ok": false
}
POST /roles/bulk/apply
Bulk edit apply
Operation postRolesBulkApply. Auth: API key (Bearer) or session cookie.
Request body (application/json, required): BulkPatch
| Field | Type | Flags | Description |
|---|---|---|---|
ids | array of string | required | |
patches | array of object | required |
| Status | Description | Body |
|---|---|---|
| 200 | ok | application/json BulkPreview |
| default | error | application/json Error |
curl -X POST 'https://api.metrixed.com/v1/roles/bulk/apply' \
-H "Authorization: Bearer $DT_API_KEY" \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
--data-raw '{"ids":[""],"patches":[{"field":"","value":{}}]}'
Example 200 response:
{
"affected": 0,
"changes": [
{}
],
"warnings": [
""
],
"token": ""
}
POST /roles/bulk/preview
Bulk edit preview
Operation postRolesBulkPreview. Auth: API key (Bearer) or session cookie.
Request body (application/json, required): BulkPatch
| Field | Type | Flags | Description |
|---|---|---|---|
ids | array of string | required | |
patches | array of object | required |
| Status | Description | Body |
|---|---|---|
| 200 | ok | application/json BulkPreview |
| default | error | application/json Error |
curl -X POST 'https://api.metrixed.com/v1/roles/bulk/preview' \
-H "Authorization: Bearer $DT_API_KEY" \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
--data-raw '{"ids":[""],"patches":[{"field":"","value":{}}]}'
Example 200 response:
{
"affected": 0,
"changes": [
{}
],
"warnings": [
""
],
"token": ""
}
POST /roles/search
Search Roles (advanced)
Operation postRolesSearch. Auth: API key (Bearer) or session cookie.
Request body (application/json, required): SearchRequest
| Field | Type | Flags | Description |
|---|---|---|---|
filters | array of object | ||
search | string | ||
sort | array of object (free-form) | ||
page | integer | ||
page_size | integer | ||
include | array of string |
curl -X POST 'https://api.metrixed.com/v1/roles/search' \
-H "Authorization: Bearer $DT_API_KEY" \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
--data-raw '{"filters":[{}],"search":"","sort":[{}],"page":0}'
Example 200 response:
{
"data": [
{}
],
"page": {}
}
GET /users
List Users
Operation getUsers. Auth: API key (Bearer) or session cookie.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
page | query | integer | no | |
page_size | query | integer | no | |
sort | query | string | no | field or -field |
include | query | string | no | comma-separated relationships |
filter | query | object (free-form) | no | |
q | query | string | no | free-text search |
curl 'https://api.metrixed.com/v1/users?page=1&page_size=50' \
-H "Authorization: Bearer $DT_API_KEY" \
-H 'Accept: application/json'
Example 200 response:
{
"data": [
{}
],
"page": {}
}
POST /users
Create User
Operation postUsers. Auth: API key (Bearer) or session cookie.
Request body (application/json, required): UserCreate
| Field | Type | Flags | Description |
|---|---|---|---|
email | string (email) | required | |
name | string | required | |
status | string | ||
locale | string | ||
timezone | string | ||
avatar_url | string |
curl -X POST 'https://api.metrixed.com/v1/users' \
-H "Authorization: Bearer $DT_API_KEY" \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
--data-raw '{"email":"user@example.com","name":""}'
Example 201 response:
{
"external_ref": ""
}
GET /users/{id}
Get User
Operation getUsersId. Auth: API key (Bearer) or session cookie.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | yes |
curl 'https://api.metrixed.com/v1/users/<id>' \
-H "Authorization: Bearer $DT_API_KEY" \
-H 'Accept: application/json'
Example 200 response:
{
"external_ref": ""
}
PATCH /users/{id}
Update User
Operation patchUsersId. Auth: API key (Bearer) or session cookie.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | yes |
Request body (application/json, required): UserUpdate
| Field | Type | Flags | Description |
|---|---|---|---|
email | string (email) | ||
name | string | ||
status | string | ||
locale | string | ||
timezone | string | ||
avatar_url | string |
curl -X PATCH 'https://api.metrixed.com/v1/users/<id>' \
-H "Authorization: Bearer $DT_API_KEY" \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
--data-raw '{"email":"user@example.com","name":"","status":"","locale":""}'
Example 200 response:
{
"external_ref": ""
}
DELETE /users/{id}
Delete User
Operation deleteUsersId. Auth: API key (Bearer) or session cookie.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | yes |
curl -X DELETE 'https://api.metrixed.com/v1/users/<id>' \
-H "Authorization: Bearer $DT_API_KEY" \
-H 'Accept: application/json'
Example 204 response:
{
"ok": false
}
POST /users/bulk/apply
Bulk edit apply
Operation postUsersBulkApply. Auth: API key (Bearer) or session cookie.
Request body (application/json, required): BulkPatch
| Field | Type | Flags | Description |
|---|---|---|---|
ids | array of string | required | |
patches | array of object | required |
| Status | Description | Body |
|---|---|---|
| 200 | ok | application/json BulkPreview |
| default | error | application/json Error |
curl -X POST 'https://api.metrixed.com/v1/users/bulk/apply' \
-H "Authorization: Bearer $DT_API_KEY" \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
--data-raw '{"ids":[""],"patches":[{"field":"","value":{}}]}'
Example 200 response:
{
"affected": 0,
"changes": [
{}
],
"warnings": [
""
],
"token": ""
}
POST /users/bulk/preview
Bulk edit preview
Operation postUsersBulkPreview. Auth: API key (Bearer) or session cookie.
Request body (application/json, required): BulkPatch
| Field | Type | Flags | Description |
|---|---|---|---|
ids | array of string | required | |
patches | array of object | required |
| Status | Description | Body |
|---|---|---|
| 200 | ok | application/json BulkPreview |
| default | error | application/json Error |
curl -X POST 'https://api.metrixed.com/v1/users/bulk/preview' \
-H "Authorization: Bearer $DT_API_KEY" \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
--data-raw '{"ids":[""],"patches":[{"field":"","value":{}}]}'
Example 200 response:
{
"affected": 0,
"changes": [
{}
],
"warnings": [
""
],
"token": ""
}
POST /users/search
Search Users (advanced)
Operation postUsersSearch. Auth: API key (Bearer) or session cookie.
Request body (application/json, required): SearchRequest
| Field | Type | Flags | Description |
|---|---|---|---|
filters | array of object | ||
search | string | ||
sort | array of object (free-form) | ||
page | integer | ||
page_size | integer | ||
include | array of string |
curl -X POST 'https://api.metrixed.com/v1/users/search' \
-H "Authorization: Bearer $DT_API_KEY" \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
--data-raw '{"filters":[{}],"search":"","sort":[{}],"page":0}'
Example 200 response:
{
"data": [
{}
],
"page": {}
}