Skip to content
Docs

API reference / Operations by tag

operator

Operations tagged operator.

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

Operations

MethodPathSummary
GET/operator/auditOperator audit trail (append-only): every sign-in step, denial and console action
POST/operator/auth/accept-invitePublic: an invited operator sets a password (16+ characters); sign-in then forces TOTP enrolment
POST/operator/auth/loginOperator sign-in, step 1 (password): returns the TOTP step or forces enrolment; no session yet
POST/operator/auth/logoutOperator sign-out (revokes the session)
POST/operator/auth/mfaOperator sign-in, step 2: TOTP code (replays refused) → session cookie dtk_operator
POST/operator/auth/mfa/enrollOperator first sign-in: TOTP secret + otpauth URI + QR
POST/operator/auth/mfa/enroll/confirmOperator first sign-in: confirm the authenticator code → MFA on + session cookie
GET/operator/dashboardPlatform dashboard: networks by status, organizations, signups, growth (12 months), clicks / conversions / revenue across every network (one rollup over the explicit tenant list), top networks, health
GET/operator/data-healthData health rollup across networks: failing networks and open discrepancies per check, last passes
GET/operator/meSigned-in operator
GET/operator/operatorsOperators with role, status, MFA and live sessions
POST/operator/operatorsInvite an operator (email with a 72 h set-password link; TOTP enrolment at first sign-in). Super admin; reason required
PATCH/operator/operators/{id}Change an operator's role or name (their sessions end on a role change; the last super admin cannot be demoted; not yourself)
POST/operator/operators/{id}/{action}disable | enable | reset-mfa (sessions revoked; reset forces a new authenticator at the next sign-in)
GET/operator/orgsOrganizations (q: name / slug)
POST/operator/orgsCreate an organization (optional first owner invited by email). Super admin; reason required
GET/operator/orgs/{id}Organization: networks with usage, org admins, org audit
PATCH/operator/orgs/{id}Name, status (suspend signs every org admin out), limits {networks}, settings {allow_close_networks}, notes, billing email
DELETE/operator/orgs/{id}Delete a throwaway e2e-org-* organization without networks (confirm=); its org_audit stays
POST/operator/orgs/{id}/adminsInvite an org admin (email with a 72 h set-password link)
POST/operator/orgs/{id}/admins/{adminId}/{action}Org admin: disable | enable | reset-mfa | role (sessions revoked; the org keeps one active owner)
POST/operator/orgs/{id}/networksAssign a network to the organization or transfer it from another (revokes the old org's impersonation sessions on it); reason required
POST/operator/orgs/{id}/networks/{tenantId}/detachDetach a network from the organization (stand-alone again); reason required
GET/operator/searchCross-tenant search (2-120 characters): networks (slug / name / id), organizations, people by email or name, partners and advertisers by name — identifiers only
GET/operator/signupsWorkspace signups (pending, verified, expired) for abuse review
GET/operator/tenantsWorkspaces: search (q: slug/name/id), status (comma list), plan; include_test=1 also lists throwaway Go-test tenants (hidden by default, WP-65); usage counts per row; status_counts
POST/operator/tenantsProvision a network on behalf (trial subscription, owner admin invitation by email, optional organization; sample data recorded for onboarding). Super admin; reason required
GET/operator/tenants/{id}Workspace detail: subscription, usage, staff users, monthly clicks, billing events, operator audit, portal hosts
DELETE/operator/tenants/{id}Purge a CLOSED throwaway workspace (slug e2e-ws-* only; confirm=): deletes every row it owns
POST/operator/tenants/{id}/closeClose a workspace (typed slug confirmation): sessions revoked, traffic blocked, data retained
GET/operator/tenants/{id}/directoryA network's partners, advertisers and offers (read-only, with counts), settings and portal hosts
POST/operator/tenants/{id}/impersonateOpen the network's admin (default; sets the tenant session cookie), partner or advertiser portal (one-time 2-minute link to the portal host) as one of its people for 5-60 min (default 30): reason required, read_only refuses every write server side (forced for support), audited in operator_audit and the network's own audit log, banner in the portal (WP-63)
GET/operator/tenants/{id}/peopleA network's staff, partner users, advertiser users and pending invitations
POST/operator/tenants/{id}/people/{userId}/{action}People action: disable / enable (membership), reset-password (emails a link), reset-mfa, revoke-sessions, revoke-keys (API keys + MCP tokens), role and transfer-ownership (super admin). Reason required; written to operator_audit and the network's audit log
POST/operator/tenants/{id}/people/inviteInvite a staff member (default admin; other roles need super admin). Support or super admin; reason required
POST/operator/tenants/{id}/restoreRestore a suspended or closed workspace to active (or trial)
PATCH/operator/tenants/{id}/subscriptionPlan, limits (clicks_per_month, seats, domains; null = unlimited), click overage policy, trial end, trial/active status, billing email, notes. Operator admin; reason required; recorded by the manual billing provider
POST/operator/tenants/{id}/suspendSuspend: sign-ins, sessions and API keys refused; block_traffic also sends the workspace's clicks to the fallback (edge). Reason required

GET /operator/audit

Operator audit trail (append-only): every sign-in step, denial and console action

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

ParameterInTypeRequiredDescription
tenant_idquerystringno
operator_idquerystringno
actionquerystringno
outcomequerystringno
pagequeryintegerno
page_sizequeryintegerno
StatusDescriptionBody
200okapplication/json OperatorList
defaulterrorapplication/json Error
bash
curl 'https://api.metrixed.com/v1/operator/audit?page=1&page_size=50' \
  -H "Authorization: Bearer $DT_API_KEY" \
  -H 'Accept: application/json'

Example 200 response:

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

POST /operator/auth/accept-invite

Public: an invited operator sets a password (16+ characters); sign-in then forces TOTP enrolment

Operation postOperatorAuthAcceptInvite. Auth: none (public endpoint).

Request body (application/json, required): InviteAccept

FieldTypeFlagsDescription
tokenstringrequired
passwordstringrequired
namestring
StatusDescriptionBody
200okapplication/json InviteAccepted
defaulterrorapplication/json Error
bash
curl -X POST 'https://api.metrixed.com/v1/operator/auth/accept-invite' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  --data-raw '{"token":"","password":""}'

Example 200 response:

json
{
  "ok": false,
  "next": ""
}

POST /operator/auth/login

Operator sign-in, step 1 (password): returns the TOTP step or forces enrolment; no session yet

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

Request body (application/json, required): OperatorLogin

FieldTypeFlagsDescription
emailstringrequired
passwordstringrequired
StatusDescriptionBody
200okapplication/json OperatorLoginStep
defaulterrorapplication/json Error
bash
curl -X POST 'https://api.metrixed.com/v1/operator/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,
  "mfa_token": "",
  "mfa_enrollment_required": false,
  "enroll_token": ""
}

POST /operator/auth/logout

Operator sign-out (revokes the session)

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

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

Example 200 response:

json
{
  "ok": false
}

POST /operator/auth/mfa

Operator sign-in, step 2: TOTP code (replays refused) → session cookie dtk_operator

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

Request body (application/json, required): OperatorMFA

FieldTypeFlagsDescription
mfa_tokenstringrequired
codestringrequired
StatusDescriptionBody
200okapplication/json OperatorSession
defaulterrorapplication/json Error
bash
curl -X POST 'https://api.metrixed.com/v1/operator/auth/mfa' \
  -H "Authorization: Bearer $DT_API_KEY" \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  --data-raw '{"mfa_token":"","code":""}'

Example 200 response:

json
{
  "ok": false,
  "operator": {}
}

POST /operator/auth/mfa/enroll

Operator first sign-in: TOTP secret + otpauth URI + QR

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

Request body (application/json, required): OperatorEnroll

FieldTypeFlagsDescription
enroll_tokenstringrequired
StatusDescriptionBody
200okapplication/json OperatorEnrollSecret
defaulterrorapplication/json Error
bash
curl -X POST 'https://api.metrixed.com/v1/operator/auth/mfa/enroll' \
  -H "Authorization: Bearer $DT_API_KEY" \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  --data-raw '{"enroll_token":""}'

Example 200 response:

json
{
  "secret": "",
  "otpauth_uri": "",
  "qr_png_base64": ""
}

POST /operator/auth/mfa/enroll/confirm

Operator first sign-in: confirm the authenticator code → MFA on + session cookie

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

Request body (application/json, required): OperatorEnrollConfirm

FieldTypeFlagsDescription
enroll_tokenstringrequired
codestringrequired
StatusDescriptionBody
200okapplication/json OperatorSession
defaulterrorapplication/json Error
bash
curl -X POST 'https://api.metrixed.com/v1/operator/auth/mfa/enroll/confirm' \
  -H "Authorization: Bearer $DT_API_KEY" \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  --data-raw '{"enroll_token":"","code":""}'

Example 200 response:

json
{
  "ok": false,
  "operator": {}
}

GET /operator/dashboard

Platform dashboard: networks by status, organizations, signups, growth (12 months), clicks / conversions / revenue across every network (one rollup over the explicit tenant list), top networks, health

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

ParameterInTypeRequiredDescription
fromquerystring (date)no
toquerystring (date)no
StatusDescriptionBody
200okapplication/json PlatformDashboard
defaulterrorapplication/json Error
bash
curl 'https://api.metrixed.com/v1/operator/dashboard' \
  -H "Authorization: Bearer $DT_API_KEY" \
  -H 'Accept: application/json'

Example 200 response:

json
{
  "networks": 0,
  "status_counts": {},
  "organizations": 0,
  "signups": {}
}

GET /operator/data-health

Data health rollup across networks: failing networks and open discrepancies per check, last passes

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

StatusDescriptionBody
200okapplication/json OperatorDataHealth
defaulterrorapplication/json Error
bash
curl 'https://api.metrixed.com/v1/operator/data-health' \
  -H "Authorization: Bearer $DT_API_KEY" \
  -H 'Accept: application/json'

Example 200 response:

json
{
  "checks": [
    {}
  ],
  "failing_networks": [
    {}
  ],
  "networks_audited": 0,
  "last_pass": {}
}

GET /operator/me

Signed-in operator

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

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

Example 200 response:

json
{
  "id": "",
  "email": "",
  "name": "",
  "role": "super_admin"
}

GET /operator/operators

Operators with role, status, MFA and live sessions

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

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

Example 200 response:

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

POST /operator/operators

Invite an operator (email with a 72 h set-password link; TOTP enrolment at first sign-in). Super admin; reason required

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

Request body (application/json, required): OperatorInvite

FieldTypeFlagsDescription
emailstring (email)required
namestring
roleenum: super_admin, support, billing, viewerrequired
reasonstringrequired
StatusDescriptionBody
201okapplication/json OperatorAccount
defaulterrorapplication/json Error
bash
curl -X POST 'https://api.metrixed.com/v1/operator/operators' \
  -H "Authorization: Bearer $DT_API_KEY" \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  --data-raw '{"email":"user@example.com","role":"super_admin","reason":""}'

Example 201 response:

json
{
  "id": "",
  "email": "",
  "name": "",
  "role": "super_admin"
}

PATCH /operator/operators/{id}

Change an operator's role or name (their sessions end on a role change; the last super admin cannot be demoted; not yourself)

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

ParameterInTypeRequiredDescription
idpathstringyes

Request body (application/json, required): OperatorAccountPatch

FieldTypeFlagsDescription
rolestring
namestring
reasonstringrequired
StatusDescriptionBody
200okapplication/json OperatorAccount
defaulterrorapplication/json Error
bash
curl -X PATCH 'https://api.metrixed.com/v1/operator/operators/<id>' \
  -H "Authorization: Bearer $DT_API_KEY" \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  --data-raw '{"reason":""}'

Example 200 response:

json
{
  "id": "",
  "email": "",
  "name": "",
  "role": "super_admin"
}

POST /operator/operators/{id}/{action}

disable | enable | reset-mfa (sessions revoked; reset forces a new authenticator at the next sign-in)

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

ParameterInTypeRequiredDescription
idpathstringyes
actionpathenum: disable, enable, reset-mfayes

Request body (application/json, required): OperatorClose

FieldTypeFlagsDescription
reasonstringrequired
confirm_slugstringrequired
StatusDescriptionBody
200okapplication/json Ok
defaulterrorapplication/json Error
bash
curl -X POST 'https://api.metrixed.com/v1/operator/operators/<id>/<action>' \
  -H "Authorization: Bearer $DT_API_KEY" \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  --data-raw '{"reason":"","confirm_slug":""}'

Example 200 response:

json
{
  "ok": false
}

GET /operator/orgs

Organizations (q: name / slug)

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

ParameterInTypeRequiredDescription
qquerystringno
pagequeryintegerno
page_sizequeryintegerno
StatusDescriptionBody
200okapplication/json OrganizationList
defaulterrorapplication/json Error
bash
curl 'https://api.metrixed.com/v1/operator/orgs?page=1&page_size=50' \
  -H "Authorization: Bearer $DT_API_KEY" \
  -H 'Accept: application/json'

Example 200 response:

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

POST /operator/orgs

Create an organization (optional first owner invited by email). Super admin; reason required

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

Request body (application/json, required): OrganizationWrite

FieldTypeFlagsDescription
namestring
slugstring
statusenum: active, suspended, closed
limitsobject (free-form)
settingsobject (free-form)
notesstring
billing_emailstring
owner_emailstring
owner_namestring
reasonstringrequired
StatusDescriptionBody
201okapplication/json Organization
defaulterrorapplication/json Error
bash
curl -X POST 'https://api.metrixed.com/v1/operator/orgs' \
  -H "Authorization: Bearer $DT_API_KEY" \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  --data-raw '{"reason":""}'

Example 201 response:

json
{
  "id": "",
  "slug": "",
  "name": "",
  "status": "active"
}

GET /operator/orgs/{id}

Organization: networks with usage, org admins, org audit

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

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

Example 200 response:

json
{
  "organization": {},
  "networks": [
    {}
  ],
  "admins": [
    {}
  ],
  "audit": [
    {}
  ]
}

PATCH /operator/orgs/{id}

Name, status (suspend signs every org admin out), limits {networks}, settings {allow_close_networks}, notes, billing email

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

ParameterInTypeRequiredDescription
idpathstringyes

Request body (application/json, required): OrganizationWrite

FieldTypeFlagsDescription
namestring
slugstring
statusenum: active, suspended, closed
limitsobject (free-form)
settingsobject (free-form)
notesstring
billing_emailstring
owner_emailstring
owner_namestring
reasonstringrequired
StatusDescriptionBody
200okapplication/json Organization
defaulterrorapplication/json Error
bash
curl -X PATCH 'https://api.metrixed.com/v1/operator/orgs/<id>' \
  -H "Authorization: Bearer $DT_API_KEY" \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  --data-raw '{"reason":""}'

Example 200 response:

json
{
  "id": "",
  "slug": "",
  "name": "",
  "status": "active"
}

DELETE /operator/orgs/{id}

Delete a throwaway e2e-org-* organization without networks (confirm=); its org_audit stays

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

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

Example 200 response:

json
{
  "purged": ""
}

POST /operator/orgs/{id}/admins

Invite an org admin (email with a 72 h set-password link)

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

ParameterInTypeRequiredDescription
idpathstringyes

Request body (application/json, required): OrgAdminInvite

FieldTypeFlagsDescription
emailstring (email)required
namestring
roleenum: owner, admin, viewer
reasonstringrequired
StatusDescriptionBody
201okapplication/json OrgAdminInvited
defaulterrorapplication/json Error
bash
curl -X POST 'https://api.metrixed.com/v1/operator/orgs/<id>/admins' \
  -H "Authorization: Bearer $DT_API_KEY" \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  --data-raw '{"email":"user@example.com","reason":""}'

Example 201 response:

json
{
  "id": "",
  "email": "",
  "role": "",
  "status": ""
}

POST /operator/orgs/{id}/admins/{adminId}/{action}

Org admin: disable | enable | reset-mfa | role (sessions revoked; the org keeps one active owner)

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

ParameterInTypeRequiredDescription
idpathstringyes
adminIdpathstringyes
actionpathenum: disable, enable, reset-mfa, roleyes

Request body (application/json, required): OrgAdminAction

FieldTypeFlagsDescription
reasonstringrequired
roleenum: owner, admin, viewer
StatusDescriptionBody
200okapplication/json Ok
defaulterrorapplication/json Error
bash
curl -X POST 'https://api.metrixed.com/v1/operator/orgs/<id>/admins/<adminId>/<action>' \
  -H "Authorization: Bearer $DT_API_KEY" \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  --data-raw '{"reason":""}'

Example 200 response:

json
{
  "ok": false
}

POST /operator/orgs/{id}/networks

Assign a network to the organization or transfer it from another (revokes the old org's impersonation sessions on it); reason required

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

ParameterInTypeRequiredDescription
idpathstringyes

Request body (application/json, required): OrganizationAssign

FieldTypeFlagsDescription
tenant_idstringrequired
reasonstringrequired
StatusDescriptionBody
200okapplication/json NetworkMoved
defaulterrorapplication/json Error
bash
curl -X POST 'https://api.metrixed.com/v1/operator/orgs/<id>/networks' \
  -H "Authorization: Bearer $DT_API_KEY" \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  --data-raw '{"tenant_id":"","reason":""}'

Example 200 response:

json
{
  "tenant_id": "",
  "from_organization": "",
  "to_organization": "",
  "org_sessions_revoked": 0
}

POST /operator/orgs/{id}/networks/{tenantId}/detach

Detach a network from the organization (stand-alone again); reason required

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

ParameterInTypeRequiredDescription
idpathstringyes
tenantIdpathstringyes

Request body (application/json, required): OperatorRestore

FieldTypeFlagsDescription
reasonstringrequired
statusenum: active, trial
StatusDescriptionBody
200okapplication/json NetworkMoved
defaulterrorapplication/json Error
bash
curl -X POST 'https://api.metrixed.com/v1/operator/orgs/<id>/networks/<tenantId>/detach' \
  -H "Authorization: Bearer $DT_API_KEY" \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  --data-raw '{"reason":""}'

Example 200 response:

json
{
  "tenant_id": "",
  "from_organization": "",
  "to_organization": "",
  "org_sessions_revoked": 0
}

GET /operator/search

Cross-tenant search (2-120 characters): networks (slug / name / id), organizations, people by email or name, partners and advertisers by name — identifiers only

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

ParameterInTypeRequiredDescription
qquerystringyes
StatusDescriptionBody
200okapplication/json PlatformSearch
defaulterrorapplication/json Error
bash
curl 'https://api.metrixed.com/v1/operator/search' \
  -H "Authorization: Bearer $DT_API_KEY" \
  -H 'Accept: application/json'

Example 200 response:

json
{
  "q": "",
  "networks": [
    {}
  ],
  "organizations": [
    {}
  ],
  "people": [
    {}
  ]
}

GET /operator/signups

Workspace signups (pending, verified, expired) for abuse review

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

ParameterInTypeRequiredDescription
statusquerystringno
pagequeryintegerno
page_sizequeryintegerno
StatusDescriptionBody
200okapplication/json OperatorList
defaulterrorapplication/json Error
bash
curl 'https://api.metrixed.com/v1/operator/signups?page=1&page_size=50' \
  -H "Authorization: Bearer $DT_API_KEY" \
  -H 'Accept: application/json'

Example 200 response:

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

GET /operator/tenants

Workspaces: search (q: slug/name/id), status (comma list), plan; include_test=1 also lists throwaway Go-test tenants (hidden by default, WP-65); usage counts per row; status_counts

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

ParameterInTypeRequiredDescription
qquerystringno
statusquerystringno
planquerystringno
sortquerystringno
include_testquerystringno
pagequeryintegerno
page_sizequeryintegerno
StatusDescriptionBody
200okapplication/json OperatorTenantList
defaulterrorapplication/json Error
bash
curl 'https://api.metrixed.com/v1/operator/tenants?page=1&page_size=50' \
  -H "Authorization: Bearer $DT_API_KEY" \
  -H 'Accept: application/json'

Example 200 response:

json
{
  "data": [
    {}
  ],
  "page": {},
  "status_counts": {},
  "test_tenants": 0
}

POST /operator/tenants

Provision a network on behalf (trial subscription, owner admin invitation by email, optional organization; sample data recorded for onboarding). Super admin; reason required

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

Request body (application/json, required): NetworkProvision

FieldTypeFlagsDescription
namestringrequired
slugstringrequired
modesarray of enum: network, program, app_attribution, media_buying, igaming, lead_gen
data_regionenum: us, eu, in, ap
localestring
owner_emailstring (email)required
owner_namestring
sample_databoolean
organization_idstring
reasonstring
StatusDescriptionBody
201okapplication/json NetworkProvisioned
defaulterrorapplication/json Error
bash
curl -X POST 'https://api.metrixed.com/v1/operator/tenants' \
  -H "Authorization: Bearer $DT_API_KEY" \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  --data-raw '{"name":"","slug":"","owner_email":"user@example.com"}'

Example 201 response:

json
{
  "tenant": {},
  "owner_invited": ""
}

GET /operator/tenants/{id}

Workspace detail: subscription, usage, staff users, monthly clicks, billing events, operator audit, portal hosts

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

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

Example 200 response:

json
{
  "tenant": {},
  "employees": [
    {}
  ],
  "usage_months": [
    {}
  ],
  "billing_events": [
    {}
  ]
}

DELETE /operator/tenants/{id}

Purge a CLOSED throwaway workspace (slug e2e-ws-* only; confirm=): deletes every row it owns

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

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

Example 200 response:

json
{
  "purged": "",
  "rows": {},
  "users_removed": 0
}

POST /operator/tenants/{id}/close

Close a workspace (typed slug confirmation): sessions revoked, traffic blocked, data retained

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

ParameterInTypeRequiredDescription
idpathstringyes

Request body (application/json, required): OperatorClose

FieldTypeFlagsDescription
reasonstringrequired
confirm_slugstringrequired
StatusDescriptionBody
200okapplication/json OperatorTenant
defaulterrorapplication/json Error
bash
curl -X POST 'https://api.metrixed.com/v1/operator/tenants/<id>/close' \
  -H "Authorization: Bearer $DT_API_KEY" \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  --data-raw '{"reason":"","confirm_slug":""}'

Example 200 response:

json
{
  "id": "",
  "slug": "",
  "name": "",
  "status": "trial"
}

GET /operator/tenants/{id}/directory

A network's partners, advertisers and offers (read-only, with counts), settings and portal hosts

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

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

Example 200 response:

json
{
  "partners": {},
  "advertisers": {},
  "offers": {},
  "settings": {}
}

POST /operator/tenants/{id}/impersonate

Open the network's admin (default; sets the tenant session cookie), partner or advertiser portal (one-time 2-minute link to the portal host) as one of its people for 5-60 min (default 30): reason required, read_only refuses every write server side (forced for support), audited in operator_audit and the network's own audit log, banner in the portal (WP-63)

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

ParameterInTypeRequiredDescription
idpathstringyes

Request body (application/json, required): OperatorImpersonate

FieldTypeFlagsDescription
reasonstringrequired
minutesinteger
user_idstring
portalenum: admin, partner, advertiser
party_idstring
read_onlyboolean
StatusDescriptionBody
201okapplication/json OperatorImpersonation
defaulterrorapplication/json Error
bash
curl -X POST 'https://api.metrixed.com/v1/operator/tenants/<id>/impersonate' \
  -H "Authorization: Bearer $DT_API_KEY" \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  --data-raw '{"reason":""}'

Example 201 response:

json
{
  "redirect": "",
  "url": "",
  "portal": "",
  "tenant_slug": ""
}

GET /operator/tenants/{id}/people

A network's staff, partner users, advertiser users and pending invitations

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

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

Example 200 response:

json
{
  "staff": [
    {}
  ],
  "partner_users": [
    {}
  ],
  "advertiser_users": [
    {}
  ],
  "invitations": [
    {}
  ]
}

POST /operator/tenants/{id}/people/{userId}/{action}

People action: disable / enable (membership), reset-password (emails a link), reset-mfa, revoke-sessions, revoke-keys (API keys + MCP tokens), role and transfer-ownership (super admin). Reason required; written to operator_audit and the network's audit log

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

ParameterInTypeRequiredDescription
idpathstringyes
userIdpathstringyes
actionpathenum: disable, enable, reset-password, reset-mfa, revoke-sessions, revoke-keys, role, transfer-ownershipyes

Request body (application/json, required): PeopleAction

FieldTypeFlagsDescription
principal_typeenum: employee, partner, advertiser
party_idstring
reasonstringrequired
role_keystring
StatusDescriptionBody
200okapplication/json PeopleActionResult
defaulterrorapplication/json Error
bash
curl -X POST 'https://api.metrixed.com/v1/operator/tenants/<id>/people/<userId>/<action>' \
  -H "Authorization: Bearer $DT_API_KEY" \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  --data-raw '{"reason":""}'

Example 200 response:

json
{
  "user_id": "",
  "email": "",
  "status": "",
  "sessions_revoked": 0
}

POST /operator/tenants/{id}/people/invite

Invite a staff member (default admin; other roles need super admin). Support or super admin; reason required

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

ParameterInTypeRequiredDescription
idpathstringyes

Request body (application/json, required): PeopleInvite

FieldTypeFlagsDescription
emailstring (email)required
namestring
role_keystringstaff role key, default admin
reasonstringrequired
StatusDescriptionBody
201okapplication/json PeopleInvited
defaulterrorapplication/json Error
bash
curl -X POST 'https://api.metrixed.com/v1/operator/tenants/<id>/people/invite' \
  -H "Authorization: Bearer $DT_API_KEY" \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  --data-raw '{"email":"user@example.com","reason":""}'

Example 201 response:

json
{
  "invitation_id": "",
  "email": "",
  "role_key": ""
}

POST /operator/tenants/{id}/restore

Restore a suspended or closed workspace to active (or trial)

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

ParameterInTypeRequiredDescription
idpathstringyes

Request body (application/json, required): OperatorRestore

FieldTypeFlagsDescription
reasonstringrequired
statusenum: active, trial
StatusDescriptionBody
200okapplication/json OperatorTenant
defaulterrorapplication/json Error
bash
curl -X POST 'https://api.metrixed.com/v1/operator/tenants/<id>/restore' \
  -H "Authorization: Bearer $DT_API_KEY" \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  --data-raw '{"reason":""}'

Example 200 response:

json
{
  "id": "",
  "slug": "",
  "name": "",
  "status": "trial"
}

PATCH /operator/tenants/{id}/subscription

Plan, limits (clicks_per_month, seats, domains; null = unlimited), click overage policy, trial end, trial/active status, billing email, notes. Operator admin; reason required; recorded by the manual billing provider

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

ParameterInTypeRequiredDescription
idpathstringyes

Request body (application/json, required): OperatorSubscriptionPatch

FieldTypeFlagsDescription
planstring
limitsobject (free-form)
click_overageenum: allow, block
statusenum: trial, active
trial_ends_atstring
billing_emailstring
notesstring
reasonstringrequired
StatusDescriptionBody
200okapplication/json OperatorTenant
defaulterrorapplication/json Error
bash
curl -X PATCH 'https://api.metrixed.com/v1/operator/tenants/<id>/subscription' \
  -H "Authorization: Bearer $DT_API_KEY" \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  --data-raw '{"reason":""}'

Example 200 response:

json
{
  "id": "",
  "slug": "",
  "name": "",
  "status": "trial"
}

POST /operator/tenants/{id}/suspend

Suspend: sign-ins, sessions and API keys refused; block_traffic also sends the workspace's clicks to the fallback (edge). Reason required

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

ParameterInTypeRequiredDescription
idpathstringyes

Request body (application/json, required): OperatorSuspend

FieldTypeFlagsDescription
reasonstringrequired
block_trafficboolean
StatusDescriptionBody
200okapplication/json OperatorTenant
defaulterrorapplication/json Error
bash
curl -X POST 'https://api.metrixed.com/v1/operator/tenants/<id>/suspend' \
  -H "Authorization: Bearer $DT_API_KEY" \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  --data-raw '{"reason":""}'

Example 200 response:

json
{
  "id": "",
  "slug": "",
  "name": "",
  "status": "trial"
}