Skip to content
Docs

API reference / Operations by tag

auth

Login, MFA, sessions, SSO, invitations, roles and API keys for staff and portal users.

62 operations. Base URL https://api.metrixed.com/v1; see authentication, errors and pagination.

Operations

MethodPathSummary
GET/auth/accountsPortal users: the partner or advertiser accounts the user belongs to in this network (current = the account the session acts for)
GET/auth/api-keysList ApiKeys
POST/auth/api-keysCreate ApiKey
GET/auth/api-keys/{id}Get ApiKey
PATCH/auth/api-keys/{id}Update ApiKey
DELETE/auth/api-keys/{id}Delete ApiKey
POST/auth/api-keys/{id}/rotateRotate an API key (grace period)
POST/auth/api-keys/bulk/applyBulk edit apply
POST/auth/api-keys/bulk/previewBulk edit preview
POST/auth/api-keys/searchSearch ApiKeys (advanced)
GET/auth/impersonatePublic: redeem a log-in-as link on the portal host (sets the session cookie, 302 to /)
POST/auth/invitations/acceptAccept an invitation (creates user + membership)
POST/auth/loginLogin
POST/auth/logoutLogout
GET/auth/meCurrent principal
POST/auth/mfaVerify MFA code
POST/auth/mfa/backup-codesRegenerate backup codes
POST/auth/mfa/confirmConfirm TOTP enrolment, returns backup codes
POST/auth/mfa/disableDisable MFA
POST/auth/mfa/enrollStart TOTP enrolment (secret + QR)
POST/auth/password/changeChange own password
POST/auth/password/forgotRequest password reset email
POST/auth/password/resetReset password with emailed token
GET/auth/platform-impersonatePublic: redeem a one-time platform impersonation link on the partner / advertiser portal host (sets the session cookie, 302 to /)
GET/auth/sessionsList own active sessions
DELETE/auth/sessions/{id}Revoke a session
POST/auth/sessions/revoke-othersRevoke all other sessions
POST/auth/sso/{id}/acsSAML assertion consumer service
GET/auth/sso/{id}/callbackOIDC callback
GET/auth/sso/{id}/metadataSAML SP metadata
GET/auth/sso/{id}/startBegin SSO login (redirect to IdP)
GET/auth/sso/discoverEnabled SSO connections for a tenant slug
POST/auth/switch-accountPortal users: make this session act for another of the user's accounts (API keys and MCP tokens stay bound to the account they were created in)
GET/invitationsList invitations
POST/invitationsInvite a user (employee/partner/advertiser); the invitee is emailed a link to their own portal
DELETE/invitations/{id}Revoke invitation
POST/invitations/{id}/resendResend invitation
GET/me/account-scopeThe caller's manager scope: restricted (role restricted to assigned accounts) and, when restricted, how many partners / advertisers / offers it sees
GET/me/api-keysOwn API keys
POST/me/api-keysCreate own API key
DELETE/me/api-keys/{id}Revoke own API key
DELETE/me/known-browsers/{id}Forget a known browser: the next sign-in from it sends the alert again
GET/me/notification-prefsStaff: my own email switches per notification kind (on top of the tenant matrix)
PUT/me/notification-prefsStaff: switch notification emails on or off for myself
GET/me/permissionsEffective permission matrix + actions for UI gating
GET/me/sign-in-alertsNew-browser sign-in alerts: whether the caller gets the email and the browsers already known (id is a short hash; current = this browser)
PUT/me/sign-in-alertsTurn the new-browser sign-in email on or off for the caller
GET/public/notify/unsubscribePublic: unsubscribe confirmation page for one kind of email (HTML; asks first so link scanners change nothing)
POST/public/notify/unsubscribePublic: one-click unsubscribe (RFC 8058 List-Unsubscribe-Post): switches the kind off in the recipient's own preferences (partner category, advertiser user kind, staff kind); 400 for security mail or a bad token, 404 when the recipient is unknown
GET/roles/metaResources and special actions available to roles
GET/security/ip-allowlistAdmin sign-in IP allow-list (empty = every address) and the caller's IP
PUT/security/ip-allowlistReplace the admin sign-in IP allow-list (max 100, normalised; refused when it would exclude the caller's own IP). Enforced at employee login and on every employee session
GET/security/loginsLogin history: every sign-in session of the workspace (staff, partner and advertiser users) with device, IP, method and status, newest first
GET/security/policyTenant security policy
PATCH/security/policyUpdate tenant security policy
DELETE/security/sessions/{id}Revoke a user's active session (signs them out; audited as session.revoked)
GET/security/ssoSSO connections
POST/security/ssoCreate SSO connection (SAML/OIDC)
PATCH/security/sso/{id}Update SSO connection
DELETE/security/sso/{id}Delete SSO connection
GET/team/membersEmployee members with role and MFA state
PATCH/team/members/{userId}Change member role/status

GET /auth/accounts

Portal users: the partner or advertiser accounts the user belongs to in this network (current = the account the session acts for)

Operation getAuthAccounts. Auth: API key (Bearer) or session cookie.

StatusDescriptionBody
200okapplication/json PortalAccounts
defaulterrorapplication/json Error
bash
curl 'https://api.metrixed.com/v1/auth/accounts' \
  -H "Authorization: Bearer $DT_API_KEY" \
  -H 'Accept: application/json'

Example 200 response:

json
{
  "principal_type": "",
  "current": "",
  "switchable": false,
  "data": [
    {}
  ]
}

GET /auth/api-keys

List ApiKeys List ApiKeys. WP-67: naturally small; returns at most 500 rows and capped: true when that cap is hit.

Operation getAuthApiKeys. Auth: API key (Bearer) or session cookie.

ParameterInTypeRequiredDescription
pagequeryintegerno
page_sizequeryintegerno
sortquerystringnofield or -field
includequerystringnocomma-separated relationships
filterqueryobject (free-form)no
qquerystringnofree-text search
StatusDescriptionBody
200okapplication/json ApiKeyList
defaulterrorapplication/json Error
bash
curl 'https://api.metrixed.com/v1/auth/api-keys?page=1&page_size=50' \
  -H "Authorization: Bearer $DT_API_KEY" \
  -H 'Accept: application/json'

Example 200 response:

json
{
  "data": [
    {}
  ],
  "page": {}
}

POST /auth/api-keys

Create ApiKey

Operation postAuthApiKeys. Auth: API key (Bearer) or session cookie.

Request body (application/json, required): ApiKeyCreate

FieldTypeFlagsDescription
principal_typestring
principal_idstring
namestringrequired
scopesarray of stringrequired
ip_allowlistarray of string
rate_limit_per_minuteinteger
expires_atstring (date-time)
statusstring
StatusDescriptionBody
201okapplication/json ApiKey
defaulterrorapplication/json Error
bash
curl -X POST 'https://api.metrixed.com/v1/auth/api-keys' \
  -H "Authorization: Bearer $DT_API_KEY" \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  --data-raw '{"name":"","scopes":[""]}'

Example 201 response:

json
{
  "external_ref": ""
}

GET /auth/api-keys/{id}

Get ApiKey

Operation getAuthApiKeysId. Auth: API key (Bearer) or session cookie.

ParameterInTypeRequiredDescription
idpathstringyes
StatusDescriptionBody
200okapplication/json ApiKey
defaulterrorapplication/json Error
bash
curl 'https://api.metrixed.com/v1/auth/api-keys/<id>' \
  -H "Authorization: Bearer $DT_API_KEY" \
  -H 'Accept: application/json'

Example 200 response:

json
{
  "external_ref": ""
}

PATCH /auth/api-keys/{id}

Update ApiKey

Operation patchAuthApiKeysId. Auth: API key (Bearer) or session cookie.

ParameterInTypeRequiredDescription
idpathstringyes

Request body (application/json, required): ApiKeyUpdate

FieldTypeFlagsDescription
principal_typestring
principal_idstring
namestring
scopesarray of string
ip_allowlistarray of string
rate_limit_per_minuteinteger
expires_atstring (date-time)
statusstring
StatusDescriptionBody
200okapplication/json ApiKey
defaulterrorapplication/json Error
bash
curl -X PATCH 'https://api.metrixed.com/v1/auth/api-keys/<id>' \
  -H "Authorization: Bearer $DT_API_KEY" \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  --data-raw '{"principal_type":"","principal_id":"","name":"","scopes":[""]}'

Example 200 response:

json
{
  "external_ref": ""
}

DELETE /auth/api-keys/{id}

Delete ApiKey

Operation deleteAuthApiKeysId. Auth: API key (Bearer) or session cookie.

ParameterInTypeRequiredDescription
idpathstringyes
StatusDescriptionBody
204okapplication/json Ok
defaulterrorapplication/json Error
bash
curl -X DELETE 'https://api.metrixed.com/v1/auth/api-keys/<id>' \
  -H "Authorization: Bearer $DT_API_KEY" \
  -H 'Accept: application/json'

Example 204 response:

json
{
  "ok": false
}

POST /auth/api-keys/{id}/rotate

Rotate an API key (grace period)

Operation postAuthApiKeysIdRotate. Auth: API key (Bearer) or session cookie.

ParameterInTypeRequiredDescription
idpathstringyes
StatusDescriptionBody
200okapplication/json Ok
defaulterrorapplication/json Error
bash
curl -X POST 'https://api.metrixed.com/v1/auth/api-keys/<id>/rotate' \
  -H "Authorization: Bearer $DT_API_KEY" \
  -H 'Accept: application/json'

Example 200 response:

json
{
  "ok": false
}

POST /auth/api-keys/bulk/apply

Bulk edit apply

Operation postAuthApiKeysBulkApply. Auth: API key (Bearer) or session cookie.

Request body (application/json, required): BulkPatch

FieldTypeFlagsDescription
idsarray of stringrequired
patchesarray of objectrequired
StatusDescriptionBody
200okapplication/json BulkPreview
defaulterrorapplication/json Error
bash
curl -X POST 'https://api.metrixed.com/v1/auth/api-keys/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:

json
{
  "affected": 0,
  "changes": [
    {}
  ],
  "warnings": [
    ""
  ],
  "token": ""
}

POST /auth/api-keys/bulk/preview

Bulk edit preview

Operation postAuthApiKeysBulkPreview. Auth: API key (Bearer) or session cookie.

Request body (application/json, required): BulkPatch

FieldTypeFlagsDescription
idsarray of stringrequired
patchesarray of objectrequired
StatusDescriptionBody
200okapplication/json BulkPreview
defaulterrorapplication/json Error
bash
curl -X POST 'https://api.metrixed.com/v1/auth/api-keys/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:

json
{
  "affected": 0,
  "changes": [
    {}
  ],
  "warnings": [
    ""
  ],
  "token": ""
}

POST /auth/api-keys/search

Search ApiKeys (advanced)

Operation postAuthApiKeysSearch. Auth: API key (Bearer) or session cookie.

Request body (application/json, required): SearchRequest

FieldTypeFlagsDescription
filtersarray of object
searchstring
sortarray of object (free-form)
pageinteger
page_sizeinteger
includearray of string
StatusDescriptionBody
200okapplication/json ApiKeyList
defaulterrorapplication/json Error
bash
curl -X POST 'https://api.metrixed.com/v1/auth/api-keys/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:

json
{
  "data": [
    {}
  ],
  "page": {}
}

GET /auth/impersonate

Public: redeem a log-in-as link on the portal host (sets the session cookie, 302 to /)

Operation getAuthImpersonate. Auth: API key (Bearer) or session cookie.

ParameterInTypeRequiredDescription
tokenquerystringyes
StatusDescriptionBody
302okapplication/json Ok
defaulterrorapplication/json Error
bash
curl 'https://api.metrixed.com/v1/auth/impersonate' \
  -H "Authorization: Bearer $DT_API_KEY" \
  -H 'Accept: application/json'

POST /auth/invitations/accept

Accept an invitation (creates user + membership)

Operation postAuthInvitationsAccept. Auth: API key (Bearer) or session cookie.

StatusDescriptionBody
200okapplication/json Ok
defaulterrorapplication/json Error
bash
curl -X POST 'https://api.metrixed.com/v1/auth/invitations/accept' \
  -H "Authorization: Bearer $DT_API_KEY" \
  -H 'Accept: application/json'

Example 200 response:

json
{
  "ok": false
}

POST /auth/login

Login

Operation postAuthLogin. Auth: API key (Bearer) or session cookie.

Request body (application/json, required): LoginRequest

FieldTypeFlagsDescription
emailstringrequired
passwordstringrequired
tenant_slugstring
StatusDescriptionBody
200okapplication/json LoginResult
defaulterrorapplication/json Error
bash
curl -X POST 'https://api.metrixed.com/v1/auth/login' \
  -H "Authorization: Bearer $DT_API_KEY" \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  --data-raw '{"email":"","password":""}'

Example 200 response:

json
{
  "mfa_required": false,
  "session_token": "",
  "user": {},
  "memberships": [
    {}
  ]
}

POST /auth/logout

Logout

Operation postAuthLogout. Auth: API key (Bearer) or session cookie.

StatusDescriptionBody
200okapplication/json Ok
defaulterrorapplication/json Error
bash
curl -X POST 'https://api.metrixed.com/v1/auth/logout' \
  -H "Authorization: Bearer $DT_API_KEY" \
  -H 'Accept: application/json'

Example 200 response:

json
{
  "ok": false
}

GET /auth/me

Current principal

Operation getAuthMe. Auth: API key (Bearer) or session cookie.

StatusDescriptionBody
200okapplication/json LoginResult
defaulterrorapplication/json Error
bash
curl 'https://api.metrixed.com/v1/auth/me' \
  -H "Authorization: Bearer $DT_API_KEY" \
  -H 'Accept: application/json'

Example 200 response:

json
{
  "mfa_required": false,
  "session_token": "",
  "user": {},
  "memberships": [
    {}
  ]
}

POST /auth/mfa

Verify MFA code

Operation postAuthMfa. Auth: API key (Bearer) or session cookie.

Request body (application/json, required): LoginRequest

FieldTypeFlagsDescription
emailstringrequired
passwordstringrequired
tenant_slugstring
StatusDescriptionBody
200okapplication/json LoginResult
defaulterrorapplication/json Error
bash
curl -X POST 'https://api.metrixed.com/v1/auth/mfa' \
  -H "Authorization: Bearer $DT_API_KEY" \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  --data-raw '{"email":"","password":""}'

Example 200 response:

json
{
  "mfa_required": false,
  "session_token": "",
  "user": {},
  "memberships": [
    {}
  ]
}

POST /auth/mfa/backup-codes

Regenerate backup codes

Operation postAuthMfaBackupCodes. Auth: API key (Bearer) or session cookie.

StatusDescriptionBody
200okapplication/json Ok
defaulterrorapplication/json Error
bash
curl -X POST 'https://api.metrixed.com/v1/auth/mfa/backup-codes' \
  -H "Authorization: Bearer $DT_API_KEY" \
  -H 'Accept: application/json'

Example 200 response:

json
{
  "ok": false
}

POST /auth/mfa/confirm

Confirm TOTP enrolment, returns backup codes

Operation postAuthMfaConfirm. Auth: API key (Bearer) or session cookie.

StatusDescriptionBody
200okapplication/json Ok
defaulterrorapplication/json Error
bash
curl -X POST 'https://api.metrixed.com/v1/auth/mfa/confirm' \
  -H "Authorization: Bearer $DT_API_KEY" \
  -H 'Accept: application/json'

Example 200 response:

json
{
  "ok": false
}

POST /auth/mfa/disable

Disable MFA

Operation postAuthMfaDisable. Auth: API key (Bearer) or session cookie.

StatusDescriptionBody
200okapplication/json Ok
defaulterrorapplication/json Error
bash
curl -X POST 'https://api.metrixed.com/v1/auth/mfa/disable' \
  -H "Authorization: Bearer $DT_API_KEY" \
  -H 'Accept: application/json'

Example 200 response:

json
{
  "ok": false
}

POST /auth/mfa/enroll

Start TOTP enrolment (secret + QR)

Operation postAuthMfaEnroll. Auth: API key (Bearer) or session cookie.

StatusDescriptionBody
200okapplication/json Ok
defaulterrorapplication/json Error
bash
curl -X POST 'https://api.metrixed.com/v1/auth/mfa/enroll' \
  -H "Authorization: Bearer $DT_API_KEY" \
  -H 'Accept: application/json'

Example 200 response:

json
{
  "ok": false
}

POST /auth/password/change

Change own password

Operation postAuthPasswordChange. Auth: API key (Bearer) or session cookie.

StatusDescriptionBody
200okapplication/json Ok
defaulterrorapplication/json Error
bash
curl -X POST 'https://api.metrixed.com/v1/auth/password/change' \
  -H "Authorization: Bearer $DT_API_KEY" \
  -H 'Accept: application/json'

Example 200 response:

json
{
  "ok": false
}

POST /auth/password/forgot

Request password reset email

Operation postAuthPasswordForgot. Auth: API key (Bearer) or session cookie.

StatusDescriptionBody
200okapplication/json Ok
defaulterrorapplication/json Error
bash
curl -X POST 'https://api.metrixed.com/v1/auth/password/forgot' \
  -H "Authorization: Bearer $DT_API_KEY" \
  -H 'Accept: application/json'

Example 200 response:

json
{
  "ok": false
}

POST /auth/password/reset

Reset password with emailed token

Operation postAuthPasswordReset. Auth: API key (Bearer) or session cookie.

StatusDescriptionBody
200okapplication/json Ok
defaulterrorapplication/json Error
bash
curl -X POST 'https://api.metrixed.com/v1/auth/password/reset' \
  -H "Authorization: Bearer $DT_API_KEY" \
  -H 'Accept: application/json'

Example 200 response:

json
{
  "ok": false
}

GET /auth/platform-impersonate

Public: redeem a one-time platform impersonation link on the partner / advertiser portal host (sets the session cookie, 302 to /)

Operation getAuthPlatformImpersonate. Auth: none (public endpoint).

ParameterInTypeRequiredDescription
tokenquerystringyes
StatusDescriptionBody
302okapplication/json Ok
defaulterrorapplication/json Error
bash
curl 'https://api.metrixed.com/v1/auth/platform-impersonate' \
  -H 'Accept: application/json'

GET /auth/sessions

List own active sessions

Operation getAuthSessions. Auth: API key (Bearer) or session cookie.

StatusDescriptionBody
200okapplication/json Ok
defaulterrorapplication/json Error
bash
curl 'https://api.metrixed.com/v1/auth/sessions' \
  -H "Authorization: Bearer $DT_API_KEY" \
  -H 'Accept: application/json'

Example 200 response:

json
{
  "ok": false
}

DELETE /auth/sessions/{id}

Revoke a session

Operation deleteAuthSessionsId. Auth: API key (Bearer) or session cookie.

ParameterInTypeRequiredDescription
idpathstringyes
StatusDescriptionBody
200okapplication/json Ok
defaulterrorapplication/json Error
bash
curl -X DELETE 'https://api.metrixed.com/v1/auth/sessions/<id>' \
  -H "Authorization: Bearer $DT_API_KEY" \
  -H 'Accept: application/json'

Example 200 response:

json
{
  "ok": false
}

POST /auth/sessions/revoke-others

Revoke all other sessions

Operation postAuthSessionsRevokeOthers. Auth: API key (Bearer) or session cookie.

StatusDescriptionBody
200okapplication/json Ok
defaulterrorapplication/json Error
bash
curl -X POST 'https://api.metrixed.com/v1/auth/sessions/revoke-others' \
  -H "Authorization: Bearer $DT_API_KEY" \
  -H 'Accept: application/json'

Example 200 response:

json
{
  "ok": false
}

POST /auth/sso/{id}/acs

SAML assertion consumer service

Operation postAuthSsoIdAcs. Auth: API key (Bearer) or session cookie.

ParameterInTypeRequiredDescription
idpathstringyes
StatusDescriptionBody
200okapplication/json Ok
defaulterrorapplication/json Error
bash
curl -X POST 'https://api.metrixed.com/v1/auth/sso/<id>/acs' \
  -H "Authorization: Bearer $DT_API_KEY" \
  -H 'Accept: application/json'

Example 200 response:

json
{
  "ok": false
}

GET /auth/sso/{id}/callback

OIDC callback

Operation getAuthSsoIdCallback. Auth: API key (Bearer) or session cookie.

ParameterInTypeRequiredDescription
idpathstringyes
StatusDescriptionBody
200okapplication/json Ok
defaulterrorapplication/json Error
bash
curl 'https://api.metrixed.com/v1/auth/sso/<id>/callback' \
  -H "Authorization: Bearer $DT_API_KEY" \
  -H 'Accept: application/json'

Example 200 response:

json
{
  "ok": false
}

GET /auth/sso/{id}/metadata

SAML SP metadata

Operation getAuthSsoIdMetadata. Auth: API key (Bearer) or session cookie.

ParameterInTypeRequiredDescription
idpathstringyes
StatusDescriptionBody
200okapplication/json Ok
defaulterrorapplication/json Error
bash
curl 'https://api.metrixed.com/v1/auth/sso/<id>/metadata' \
  -H "Authorization: Bearer $DT_API_KEY" \
  -H 'Accept: application/json'

Example 200 response:

json
{
  "ok": false
}

GET /auth/sso/{id}/start

Begin SSO login (redirect to IdP)

Operation getAuthSsoIdStart. Auth: API key (Bearer) or session cookie.

ParameterInTypeRequiredDescription
idpathstringyes
StatusDescriptionBody
200okapplication/json Ok
defaulterrorapplication/json Error
bash
curl 'https://api.metrixed.com/v1/auth/sso/<id>/start' \
  -H "Authorization: Bearer $DT_API_KEY" \
  -H 'Accept: application/json'

Example 200 response:

json
{
  "ok": false
}

GET /auth/sso/discover

Enabled SSO connections for a tenant slug

Operation getAuthSsoDiscover. Auth: API key (Bearer) or session cookie.

StatusDescriptionBody
200okapplication/json Ok
defaulterrorapplication/json Error
bash
curl 'https://api.metrixed.com/v1/auth/sso/discover' \
  -H "Authorization: Bearer $DT_API_KEY" \
  -H 'Accept: application/json'

Example 200 response:

json
{
  "ok": false
}

POST /auth/switch-account

Portal users: make this session act for another of the user's accounts (API keys and MCP tokens stay bound to the account they were created in)

Operation postAuthSwitchAccount. Auth: API key (Bearer) or session cookie.

Request body (application/json, required): SwitchAccountRequest

FieldTypeFlagsDescription
account_idstringrequiredaccount id or display id
StatusDescriptionBody
200okapplication/json SwitchAccountResult
defaulterrorapplication/json Error
bash
curl -X POST 'https://api.metrixed.com/v1/auth/switch-account' \
  -H "Authorization: Bearer $DT_API_KEY" \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  --data-raw '{"account_id":""}'

Example 200 response:

json
{
  "current": "",
  "account": {}
}

GET /invitations

List invitations List invitations. WP-67: paged; q matches the email; state pending|expired|accepted|revoked; counts per state.

Operation getInvitations. Auth: API key (Bearer) or session cookie.

ParameterInTypeRequiredDescription
qquerystringno
pagequerystringno
page_sizequerystringno
sortquerystringno
statequerystringno
principal_typequerystringno
StatusDescriptionBody
200okapplication/json Ok
defaulterrorapplication/json Error
bash
curl 'https://api.metrixed.com/v1/invitations?page=1&page_size=50' \
  -H "Authorization: Bearer $DT_API_KEY" \
  -H 'Accept: application/json'

Example 200 response:

json
{
  "ok": false
}

POST /invitations

Invite a user (employee/partner/advertiser); the invitee is emailed a link to their own portal

Operation postInvitations. Auth: API key (Bearer) or session cookie.

Request body (application/json, required): InvitationCreate

FieldTypeFlagsDescription
emailstring (email)required
principal_typeenum: employee, partner, advertiser
principal_idstringpartner or advertiser id (portal users)
role_keystring
namestring
StatusDescriptionBody
201okapplication/json Ok
defaulterrorapplication/json Error
bash
curl -X POST 'https://api.metrixed.com/v1/invitations' \
  -H "Authorization: Bearer $DT_API_KEY" \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  --data-raw '{"email":"user@example.com"}'

Example 201 response:

json
{
  "ok": false
}

DELETE /invitations/{id}

Revoke invitation

Operation deleteInvitationsId. Auth: API key (Bearer) or session cookie.

ParameterInTypeRequiredDescription
idpathstringyes
StatusDescriptionBody
200okapplication/json Ok
defaulterrorapplication/json Error
bash
curl -X DELETE 'https://api.metrixed.com/v1/invitations/<id>' \
  -H "Authorization: Bearer $DT_API_KEY" \
  -H 'Accept: application/json'

Example 200 response:

json
{
  "ok": false
}

POST /invitations/{id}/resend

Resend invitation

Operation postInvitationsIdResend. Auth: API key (Bearer) or session cookie.

ParameterInTypeRequiredDescription
idpathstringyes
StatusDescriptionBody
200okapplication/json Ok
defaulterrorapplication/json Error
bash
curl -X POST 'https://api.metrixed.com/v1/invitations/<id>/resend' \
  -H "Authorization: Bearer $DT_API_KEY" \
  -H 'Accept: application/json'

Example 200 response:

json
{
  "ok": false
}

GET /me/account-scope

The caller's manager scope: restricted (role restricted to assigned accounts) and, when restricted, how many partners / advertisers / offers it sees

Operation getMeAccountScope. Auth: API key (Bearer) or session cookie.

StatusDescriptionBody
200okapplication/json AccountScope
defaulterrorapplication/json Error
bash
curl 'https://api.metrixed.com/v1/me/account-scope' \
  -H "Authorization: Bearer $DT_API_KEY" \
  -H 'Accept: application/json'

Example 200 response:

json
{
  "restricted": false,
  "employee_id": "",
  "partners": 0,
  "advertisers": 0
}

GET /me/api-keys

Own API keys

Operation getMeApiKeys. Auth: API key (Bearer) or session cookie.

StatusDescriptionBody
200okapplication/json Ok
defaulterrorapplication/json Error
bash
curl 'https://api.metrixed.com/v1/me/api-keys' \
  -H "Authorization: Bearer $DT_API_KEY" \
  -H 'Accept: application/json'

Example 200 response:

json
{
  "ok": false
}

POST /me/api-keys

Create own API key

Operation postMeApiKeys. Auth: API key (Bearer) or session cookie.

StatusDescriptionBody
200okapplication/json Ok
defaulterrorapplication/json Error
bash
curl -X POST 'https://api.metrixed.com/v1/me/api-keys' \
  -H "Authorization: Bearer $DT_API_KEY" \
  -H 'Accept: application/json'

Example 200 response:

json
{
  "ok": false
}

DELETE /me/api-keys/{id}

Revoke own API key

Operation deleteMeApiKeysId. Auth: API key (Bearer) or session cookie.

ParameterInTypeRequiredDescription
idpathstringyes
StatusDescriptionBody
200okapplication/json Ok
defaulterrorapplication/json Error
bash
curl -X DELETE 'https://api.metrixed.com/v1/me/api-keys/<id>' \
  -H "Authorization: Bearer $DT_API_KEY" \
  -H 'Accept: application/json'

Example 200 response:

json
{
  "ok": false
}

DELETE /me/known-browsers/{id}

Forget a known browser: the next sign-in from it sends the alert again

Operation deleteMeKnownBrowsersId. Auth: API key (Bearer) or session cookie.

ParameterInTypeRequiredDescription
idpathstringyes
StatusDescriptionBody
204okapplication/json Ok
defaulterrorapplication/json Error
bash
curl -X DELETE 'https://api.metrixed.com/v1/me/known-browsers/<id>' \
  -H "Authorization: Bearer $DT_API_KEY" \
  -H 'Accept: application/json'

Example 204 response:

json
{
  "ok": false
}

GET /me/notification-prefs

Staff: my own email switches per notification kind (on top of the tenant matrix)

Operation getMeNotificationPrefs. Auth: API key (Bearer) or session cookie.

StatusDescriptionBody
200okapplication/json MyNotificationPrefs
defaulterrorapplication/json Error
bash
curl 'https://api.metrixed.com/v1/me/notification-prefs' \
  -H "Authorization: Bearer $DT_API_KEY" \
  -H 'Accept: application/json'

Example 200 response:

json
{}

PUT /me/notification-prefs

Staff: switch notification emails on or off for myself

Operation putMeNotificationPrefs. Auth: API key (Bearer) or session cookie.

Request body (application/json, required): MyNotificationPrefsUpdate

StatusDescriptionBody
200okapplication/json Ok
defaulterrorapplication/json Error
bash
curl -X PUT 'https://api.metrixed.com/v1/me/notification-prefs' \
  -H "Authorization: Bearer $DT_API_KEY" \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  --data-raw '{}'

Example 200 response:

json
{
  "ok": false
}

GET /me/permissions

Effective permission matrix + actions for UI gating

Operation getMePermissions. Auth: API key (Bearer) or session cookie.

StatusDescriptionBody
200okapplication/json Ok
defaulterrorapplication/json Error
bash
curl 'https://api.metrixed.com/v1/me/permissions' \
  -H "Authorization: Bearer $DT_API_KEY" \
  -H 'Accept: application/json'

Example 200 response:

json
{
  "ok": false
}

GET /me/sign-in-alerts

New-browser sign-in alerts: whether the caller gets the email and the browsers already known (id is a short hash; current = this browser)

Operation getMeSignInAlerts. Auth: API key (Bearer) or session cookie.

StatusDescriptionBody
200okapplication/json SignInAlerts
defaulterrorapplication/json Error
bash
curl 'https://api.metrixed.com/v1/me/sign-in-alerts' \
  -H "Authorization: Bearer $DT_API_KEY" \
  -H 'Accept: application/json'

Example 200 response:

json
{
  "enabled": false,
  "browsers": [
    {}
  ]
}

PUT /me/sign-in-alerts

Turn the new-browser sign-in email on or off for the caller

Operation putMeSignInAlerts. Auth: API key (Bearer) or session cookie.

Request body (application/json, required): SignInAlertsUpdate

FieldTypeFlagsDescription
enabledbooleanrequired
StatusDescriptionBody
200okapplication/json SignInAlerts
defaulterrorapplication/json Error
bash
curl -X PUT 'https://api.metrixed.com/v1/me/sign-in-alerts' \
  -H "Authorization: Bearer $DT_API_KEY" \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  --data-raw '{"enabled":false}'

Example 200 response:

json
{
  "enabled": false,
  "browsers": [
    {}
  ]
}

GET /public/notify/unsubscribe

Public: unsubscribe confirmation page for one kind of email (HTML; asks first so link scanners change nothing)

Operation getPublicNotifyUnsubscribe. Auth: API key (Bearer) or session cookie.

ParameterInTypeRequiredDescription
tquerystringyessealed unsubscribe token from the email
StatusDescriptionBody
200HTML pagetext/html string
defaulterrorapplication/json Error
bash
curl 'https://api.metrixed.com/v1/public/notify/unsubscribe' \
  -H "Authorization: Bearer $DT_API_KEY" \
  -H 'Accept: application/json'

POST /public/notify/unsubscribe

Public: one-click unsubscribe (RFC 8058 List-Unsubscribe-Post): switches the kind off in the recipient's own preferences (partner category, advertiser user kind, staff kind); 400 for security mail or a bad token, 404 when the recipient is unknown

Operation postPublicNotifyUnsubscribe. Auth: API key (Bearer) or session cookie.

ParameterInTypeRequiredDescription
tquerystringyessealed unsubscribe token from the email
StatusDescriptionBody
200HTML pagetext/html string
defaulterrorapplication/json Error
bash
curl -X POST 'https://api.metrixed.com/v1/public/notify/unsubscribe' \
  -H "Authorization: Bearer $DT_API_KEY" \
  -H 'Accept: application/json'

GET /roles/meta

Resources and special actions available to roles

Operation getRolesMeta. Auth: API key (Bearer) or session cookie.

StatusDescriptionBody
200okapplication/json Ok
defaulterrorapplication/json Error
bash
curl 'https://api.metrixed.com/v1/roles/meta' \
  -H "Authorization: Bearer $DT_API_KEY" \
  -H 'Accept: application/json'

Example 200 response:

json
{
  "ok": false
}

GET /security/ip-allowlist

Admin sign-in IP allow-list (empty = every address) and the caller's IP

Operation getSecurityIpAllowlist. Auth: API key (Bearer) or session cookie.

StatusDescriptionBody
200okapplication/json AdminIPAllowlist
defaulterrorapplication/json Error
bash
curl 'https://api.metrixed.com/v1/security/ip-allowlist' \
  -H "Authorization: Bearer $DT_API_KEY" \
  -H 'Accept: application/json'

Example 200 response:

json
{}

PUT /security/ip-allowlist

Replace the admin sign-in IP allow-list (max 100, normalised; refused when it would exclude the caller's own IP). Enforced at employee login and on every employee session

Operation putSecurityIpAllowlist. Auth: API key (Bearer) or session cookie.

Request body (application/json, required): AdminIPAllowlist

StatusDescriptionBody
200okapplication/json AdminIPAllowlist
defaulterrorapplication/json Error
bash
curl -X PUT 'https://api.metrixed.com/v1/security/ip-allowlist' \
  -H "Authorization: Bearer $DT_API_KEY" \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  --data-raw '{}'

Example 200 response:

json
{}

GET /security/logins

Login history: every sign-in session of the workspace (staff, partner and advertiser users) with device, IP, method and status, newest first

Operation getSecurityLogins. Auth: API key (Bearer) or session cookie.

ParameterInTypeRequiredDescription
principal_typequeryenum: all, employee, partner, advertiserno
qquerystringno
statusqueryenum: all, activeno
limitqueryintegerno
StatusDescriptionBody
200okapplication/json LoginSessionList
defaulterrorapplication/json Error
bash
curl 'https://api.metrixed.com/v1/security/logins' \
  -H "Authorization: Bearer $DT_API_KEY" \
  -H 'Accept: application/json'

Example 200 response:

json
{
  "data": [
    {}
  ]
}

GET /security/policy

Tenant security policy

Operation getSecurityPolicy. Auth: API key (Bearer) or session cookie.

StatusDescriptionBody
200okapplication/json Ok
defaulterrorapplication/json Error
bash
curl 'https://api.metrixed.com/v1/security/policy' \
  -H "Authorization: Bearer $DT_API_KEY" \
  -H 'Accept: application/json'

Example 200 response:

json
{
  "ok": false
}

PATCH /security/policy

Update tenant security policy

Operation patchSecurityPolicy. Auth: API key (Bearer) or session cookie.

StatusDescriptionBody
200okapplication/json Ok
defaulterrorapplication/json Error
bash
curl -X PATCH 'https://api.metrixed.com/v1/security/policy' \
  -H "Authorization: Bearer $DT_API_KEY" \
  -H 'Accept: application/json'

Example 200 response:

json
{
  "ok": false
}

DELETE /security/sessions/{id}

Revoke a user's active session (signs them out; audited as session.revoked)

Operation deleteSecuritySessionsId. Auth: API key (Bearer) or session cookie.

ParameterInTypeRequiredDescription
idpathstringyes
StatusDescriptionBody
204okapplication/json Ok
defaulterrorapplication/json Error
bash
curl -X DELETE 'https://api.metrixed.com/v1/security/sessions/<id>' \
  -H "Authorization: Bearer $DT_API_KEY" \
  -H 'Accept: application/json'

Example 204 response:

json
{
  "ok": false
}

GET /security/sso

SSO connections

Operation getSecuritySso. Auth: API key (Bearer) or session cookie.

StatusDescriptionBody
200okapplication/json Ok
defaulterrorapplication/json Error
bash
curl 'https://api.metrixed.com/v1/security/sso' \
  -H "Authorization: Bearer $DT_API_KEY" \
  -H 'Accept: application/json'

Example 200 response:

json
{
  "ok": false
}

POST /security/sso

Create SSO connection (SAML/OIDC)

Operation postSecuritySso. Auth: API key (Bearer) or session cookie.

StatusDescriptionBody
200okapplication/json Ok
defaulterrorapplication/json Error
bash
curl -X POST 'https://api.metrixed.com/v1/security/sso' \
  -H "Authorization: Bearer $DT_API_KEY" \
  -H 'Accept: application/json'

Example 200 response:

json
{
  "ok": false
}

PATCH /security/sso/{id}

Update SSO connection

Operation patchSecuritySsoId. Auth: API key (Bearer) or session cookie.

ParameterInTypeRequiredDescription
idpathstringyes
StatusDescriptionBody
200okapplication/json Ok
defaulterrorapplication/json Error
bash
curl -X PATCH 'https://api.metrixed.com/v1/security/sso/<id>' \
  -H "Authorization: Bearer $DT_API_KEY" \
  -H 'Accept: application/json'

Example 200 response:

json
{
  "ok": false
}

DELETE /security/sso/{id}

Delete SSO connection

Operation deleteSecuritySsoId. Auth: API key (Bearer) or session cookie.

ParameterInTypeRequiredDescription
idpathstringyes
StatusDescriptionBody
200okapplication/json Ok
defaulterrorapplication/json Error
bash
curl -X DELETE 'https://api.metrixed.com/v1/security/sso/<id>' \
  -H "Authorization: Bearer $DT_API_KEY" \
  -H 'Accept: application/json'

Example 200 response:

json
{
  "ok": false
}

GET /team/members

Employee members with role and MFA state

Operation getTeamMembers. Auth: API key (Bearer) or session cookie.

StatusDescriptionBody
200okapplication/json Ok
defaulterrorapplication/json Error
bash
curl 'https://api.metrixed.com/v1/team/members' \
  -H "Authorization: Bearer $DT_API_KEY" \
  -H 'Accept: application/json'

Example 200 response:

json
{
  "ok": false
}

PATCH /team/members/{userId}

Change member role/status

Operation patchTeamMembersUserId. Auth: API key (Bearer) or session cookie.

ParameterInTypeRequiredDescription
userIdpathstringyes
StatusDescriptionBody
200okapplication/json Ok
defaulterrorapplication/json Error
bash
curl -X PATCH 'https://api.metrixed.com/v1/team/members/<userId>' \
  -H "Authorization: Bearer $DT_API_KEY" \
  -H 'Accept: application/json'

Example 200 response:

json
{
  "ok": false
}