Skip to content
Docs

API reference / Operations by tag

org

Operations tagged org.

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

Operations

MethodPathSummary
GET/org/adminsOrg admins
POST/org/adminsInvite an org admin (owner only)
POST/org/admins/{adminId}/{action}Org admin: disable | enable | reset-mfa | role (owner only; not yourself; one active owner kept)
GET/org/auditOrganization audit trail (append-only): sign-ins, denials (incl. cross-organization attempts), every console action
POST/org/auth/accept-invitePublic: an invited org admin sets a password (12+ characters); sign-in then forces TOTP enrolment
GET/org/auth/accountsOrganizations the signed-in email administers (active memberships of active organizations); current = this session's
GET/org/auth/configPublic: organization sign-in settings (self_signup flag: owner decision, off)
POST/org/auth/invite-infoPublic: the invited email and whether it already signs in to another organization (then the invitation is accepted without a password: the existing password and authenticator carry over)
POST/org/auth/loginOrg admin sign-in, step 1 (password): TOTP step or forced enrolment; no session yet
POST/org/auth/logoutOrg admin sign-out (revokes the session)
POST/org/auth/mfaOrg admin sign-in, step 2: TOTP code (replays refused) → session cookie dtk_org
POST/org/auth/mfa/enrollOrg admin first sign-in: TOTP secret + otpauth URI + QR
POST/org/auth/mfa/enroll/confirmOrg admin first sign-in: confirm the code → MFA on + session cookie
POST/org/auth/switchMove this session to another organization the email administers (the session ends, a new one opens there; audited in both)
GET/org/meSigned-in org admin with permissions and the organization (limits, settings)
GET/org/networksThe organization's networks with usage counts and the org limits
POST/org/networksCreate a child network within limits.networks (owner admin invitation by email). Org owner / admin
GET/org/networks/{id}A child network: usage, directory (read-only), settings and hosts; 403 for any network outside the organization
POST/org/networks/{id}/closeClose (never purge) a child network: org owner, only when the operator enabled allow_close_networks; typed slug confirmation
POST/org/networks/{id}/impersonateOpen a child network's admin / partner / advertiser portal as one of its people (5-60 min, reason, read-only option); audited in org_audit and the network's audit log
GET/org/networks/{id}/peopleA child network's people and pending invitations
POST/org/networks/{id}/people/{userId}/{action}People action on a child network (same as the operator's); password / MFA resets are refused for identities that also belong to networks outside the organization
POST/org/networks/{id}/people/inviteInvite a staff member into a child network (default admin)
GET/org/reports/rollupRollup report across the child networks: one reporting query over the explicit child tenant list; totals per currency, per network and per day
GET/org/usageOrganization usage (networks, seats, clicks this month, partners) against its limits

GET /org/admins

Org admins

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

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

Example 200 response:

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

POST /org/admins

Invite an org admin (owner only)

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

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/org/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 /org/admins/{adminId}/{action}

Org admin: disable | enable | reset-mfa | role (owner only; not yourself; one active owner kept)

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

ParameterInTypeRequiredDescription
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/org/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
}

GET /org/audit

Organization audit trail (append-only): sign-ins, denials (incl. cross-organization attempts), every console action

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

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

Example 200 response:

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

POST /org/auth/accept-invite

Public: an invited org admin sets a password (12+ characters); sign-in then forces TOTP enrolment

Operation postOrgAuthAcceptInvite. 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/org/auth/accept-invite' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  --data-raw '{"token":"","password":""}'

Example 200 response:

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

GET /org/auth/accounts

Organizations the signed-in email administers (active memberships of active organizations); current = this session's

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

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

Example 200 response:

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

GET /org/auth/config

Public: organization sign-in settings (self_signup flag: owner decision, off)

Operation getOrgAuthConfig. Auth: none (public endpoint).

StatusDescriptionBody
200okapplication/json OrgAuthConfig
defaulterrorapplication/json Error
bash
curl 'https://api.metrixed.com/v1/org/auth/config' \
  -H 'Accept: application/json'

Example 200 response:

json
{
  "self_signup": false,
  "mfa_required": false
}

POST /org/auth/invite-info

Public: the invited email and whether it already signs in to another organization (then the invitation is accepted without a password: the existing password and authenticator carry over)

Operation postOrgAuthInviteInfo. Auth: none (public endpoint).

Request body (application/json, required): OrgInviteInfoRequest

FieldTypeFlagsDescription
tokenstringrequired
StatusDescriptionBody
200okapplication/json OrgInviteInfo
defaulterrorapplication/json Error
bash
curl -X POST 'https://api.metrixed.com/v1/org/auth/invite-info' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  --data-raw '{"token":""}'

Example 200 response:

json
{
  "email": "",
  "organization": "",
  "existing_login": false
}

POST /org/auth/login

Org admin sign-in, step 1 (password): TOTP step or forced enrolment; no session yet

Operation postOrgAuthLogin. Auth: none (public endpoint).

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/org/auth/login' \
  -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 /org/auth/logout

Org admin sign-out (revokes the session)

Operation postOrgAuthLogout. Auth: none (public endpoint).

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

Example 200 response:

json
{
  "ok": false
}

POST /org/auth/mfa

Org admin sign-in, step 2: TOTP code (replays refused) → session cookie dtk_org

Operation postOrgAuthMfa. Auth: none (public endpoint).

Request body (application/json, required): OperatorMFA

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

Example 200 response:

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

POST /org/auth/mfa/enroll

Org admin first sign-in: TOTP secret + otpauth URI + QR

Operation postOrgAuthMfaEnroll. Auth: none (public endpoint).

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/org/auth/mfa/enroll' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  --data-raw '{"enroll_token":""}'

Example 200 response:

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

POST /org/auth/mfa/enroll/confirm

Org admin first sign-in: confirm the code → MFA on + session cookie

Operation postOrgAuthMfaEnrollConfirm. Auth: none (public endpoint).

Request body (application/json, required): OperatorEnrollConfirm

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

Example 200 response:

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

POST /org/auth/switch

Move this session to another organization the email administers (the session ends, a new one opens there; audited in both)

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

Request body (application/json, required): OrgSwitch

FieldTypeFlagsDescription
organization_idstringrequired
StatusDescriptionBody
200okapplication/json OrgSwitched
defaulterrorapplication/json Error
bash
curl -X POST 'https://api.metrixed.com/v1/org/auth/switch' \
  -H "Authorization: Bearer $DT_API_KEY" \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  --data-raw '{"organization_id":""}'

Example 200 response:

json
{
  "ok": false,
  "organization_id": "",
  "organization": "",
  "role": ""
}

GET /org/me

Signed-in org admin with permissions and the organization (limits, settings)

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

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

Example 200 response:

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

GET /org/networks

The organization's networks with usage counts and the org limits

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

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

Example 200 response:

json
{
  "data": [
    {}
  ],
  "limits": {},
  "settings": {}
}

POST /org/networks

Create a child network within limits.networks (owner admin invitation by email). Org owner / admin

Operation postOrgNetworks. 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 OrgNetworkCreated
defaulterrorapplication/json Error
bash
curl -X POST 'https://api.metrixed.com/v1/org/networks' \
  -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
{
  "network": {},
  "owner_invited": ""
}

GET /org/networks/{id}

A child network: usage, directory (read-only), settings and hosts; 403 for any network outside the organization

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

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

Example 200 response:

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

POST /org/networks/{id}/close

Close (never purge) a child network: org owner, only when the operator enabled allow_close_networks; typed slug confirmation

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

ParameterInTypeRequiredDescription
idpathstringyes

Request body (application/json, required): OperatorClose

FieldTypeFlagsDescription
reasonstringrequired
confirm_slugstringrequired
StatusDescriptionBody
200okapplication/json OrgNetworkClosed
defaulterrorapplication/json Error
bash
curl -X POST 'https://api.metrixed.com/v1/org/networks/<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": "",
  "status": "",
  "sessions_revoked": 0
}

POST /org/networks/{id}/impersonate

Open a child network's admin / partner / advertiser portal as one of its people (5-60 min, reason, read-only option); audited in org_audit and the network's audit log

Operation postOrgNetworksIdImpersonate. 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/org/networks/<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 /org/networks/{id}/people

A child network's people and pending invitations

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

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

Example 200 response:

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

POST /org/networks/{id}/people/{userId}/{action}

People action on a child network (same as the operator's); password / MFA resets are refused for identities that also belong to networks outside the organization

Operation postOrgNetworksIdPeopleUserIdAction. 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/org/networks/<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 /org/networks/{id}/people/invite

Invite a staff member into a child network (default admin)

Operation postOrgNetworksIdPeopleInvite. 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/org/networks/<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": ""
}

GET /org/reports/rollup

Rollup report across the child networks: one reporting query over the explicit child tenant list; totals per currency, per network and per day

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

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

Example 200 response:

json
{
  "totals": {},
  "networks": [
    {}
  ],
  "days": [
    {}
  ],
  "from": ""
}

GET /org/usage

Organization usage (networks, seats, clicks this month, partners) against its limits

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

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

Example 200 response:

json
{
  "limits": {},
  "usage": {}
}