Skip to content

Start building

Jump toDelegations
All endpoints

Delegations

Access given to another organization, such as an agency working for you.

get/v1/delegations

List delegations

Needs delegation.manage

In: access this tenant grants to others (with its local status). Out: access this tenant holds in others. Sorts by name (the other organization, default), status, expires_at, role, created_at and updated_at; q searches the organizations and the role. Filters, each repeatable: direction (in, out), status, role and created_by (who granted it, usr_…), plus the created and updated time ranges; facets count each of them.

Query parameters

  • directionstring[]
  • statusstring[]
  • rolestring[]
  • created_bystring[]
  • limitinteger

    Rows per page, 1 to 200. Omitted: every row.

    at least 1at most 200
  • cursorstring
  • qstring

    Search: rows whose name (or the list's other searchable text) contains this, any case.

    at most 200 characters
  • orderstring

    Sort field; a leading - sorts down. Each list names the fields it sorts by.

    at most 64 charactersmatches ^-?[a-z_]+$
  • includestring[]

    total_count (counted up to 10,000) and facets (a count per filter value).

    One oftotal_countfacets
  • created_afterstring

    Only rows created at or after this time (RFC 3339).

    date-time
  • created_beforestring

    Only rows created at or before this time (RFC 3339).

    date-time
  • updated_afterstring

    Only rows last changed at or after this time (RFC 3339).

    date-time
  • updated_beforestring

    Only rows last changed at or before this time (RFC 3339).

    date-time

Response200

  • objectstring
    list
  • dataDelegation[]
    21 fields
    • idstring
    • objectstring
      delegation
    • directionstring
      One ofinout
    • expires_atstring or null
    • grantee_display_namestring
    • grantee_group_idstring or null
    • grantee_tenant_idstring
    • grantor_display_namestring
    • grantor_tenant_idstring
    • local_statusstring or null
      One ofpending_local_approvalacceptedrejectedrevoked
    • max_data_classstring
      One ofpublicinternalpiisensitivephi
    • require_mfaboolean
    • revocable_by_grantorboolean
    • rolestring
    • statusstring
    • workspace_idsstring[] or null
    • created_atstring or null
    • created_byActorRef or null

      Who created or last changed something, resolved to a name for display. system, workload (an automation) and end_user (a widget visitor) have no ID or name: the console words them. name is null for someone the directory no longer knows. id is what the lists' created_by/updated_by filters take. avatar_version is set for a person with a photo: it is at GET /v1/members/{id}/avatar?v=<avatar_version> while they are a member.

      5 fields
      • idstring or null
      • kindstring
        One ofuserapi_keyservice_accountworkloadend_usersystem
      • namestring or null
      • avatar_versionstring or null
      • emailstring or null
    • grantee_slugstring or null
    • grantor_slugstring or null
    • updated_atstring or null
  • has_moreboolean
  • next_cursorstring or null
  • facetsmap<string, map<string, integer>> or null
  • peoplemap<string, ActorRef> or null
    5 fields
    • idstring or null
    • kindstring
      One ofuserapi_keyservice_accountworkloadend_usersystem
    • namestring or null
    • avatar_versionstring or null
    • emailstring or null
  • total_countinteger or null
  • total_count_exactboolean or null

Status codes

  • 200Successful Response
  • 422The request is not valid: errors[] names each field.
  • 4XXThe request was refused: the problem says why.
  • 5XXThe API could not answer: the problem says why.
Request
curl "https://api.mydeepagents.com/v1/delegations?limit=20" \
  -H "Authorization: Bearer $MDA_API_KEY"
Response · 200
JSON
{
  "object": "list",
  "data": [
    {
      "id": "dlg_01jczfzcy1wbcjnyyqh68jme0a",
      "object": "delegation",
      "created_at": "2026-11-10T09:30:00.000Z",
      "created_by": {
        "kind": "user",
        "id": "usr_01jcf1j9wjxfrnhqda3mq7ejxn",
        "name": "Ada Lovelace",
        "email": "ada@example.com"
      },
      "direction": "in",
      "expires_at": "2026-11-10T09:30:00.000Z",
      "grantee_display_name": "grantee display name",
      "grantee_group_id": "grantee group id",
      "grantee_slug": "grantee slug",
      "grantee_tenant_id": "grantee tenant id",
      "grantor_display_name": "grantor display name",
      "grantor_slug": "grantor slug",
      "grantor_tenant_id": "grantor tenant id",
      "local_status": "pending_local_approval",
      "max_data_class": "public",
      "require_mfa": true,
      "revocable_by_grantor": true,
      "role": "role",
      "status": "status",
      "updated_at": "2026-11-10T09:30:00.000Z",
      "workspace_ids": [
        "ws_01jccj30nr8ad7mx1yc5v9zx3h"
      ]
    }
  ],
  "has_more": false,
  "next_cursor": null,
  "total_count": 1
}
post/v1/delegations

Create delegation

Needs delegation.manage

Request bodyDelegationCreate

  • grantee_tenant_idstringRequired
  • rolestringRequired
  • baa_referencestring or null
  • expires_atstring or null
    date-time
  • grantee_group_idstring or null
  • ip_rangesstring[] or null
  • max_data_classstring
    One ofpublicinternalpiisensitivephiDefault"internal"
  • require_mfaboolean
    Defaultfalse
  • workspace_idsstring[] or null

Response201

  • idstring
  • objectstring
    delegation
  • statusstring

Status codes

  • 201Successful Response
  • 422The request is not valid: errors[] names each field.
  • 4XXThe request was refused: the problem says why.
  • 5XXThe API could not answer: the problem says why.
Request
curl -X POST "https://api.mydeepagents.com/v1/delegations" \
  -H "Authorization: Bearer $MDA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "grantee_tenant_id": "grantee tenant id",
    "role": "role"
  }'
Response · 201
JSON
{
  "id": "dlg_01jczfzcy1wbcjnyyqh68jme0a",
  "object": "delegation",
  "status": "status"
}
post/v1/delegations/{delegation_id}/approve

Approve delegation

Needs delegation.manage

Path parameters

  • delegation_idstringRequired

Response204

Answers 204 with no body.

Status codes

  • 204Successful Response
  • 422The request is not valid: errors[] names each field.
  • 4XXThe request was refused: the problem says why.
  • 5XXThe API could not answer: the problem says why.
Request
curl -X POST "https://api.mydeepagents.com/v1/delegations/dlg_01jczfzcy1wbcjnyyqh68jme0a/approve" \
  -H "Authorization: Bearer $MDA_API_KEY"
post/v1/delegations/{delegation_id}/reject

Reject delegation

Needs delegation.manage

Path parameters

  • delegation_idstringRequired

Response204

Answers 204 with no body.

Status codes

  • 204Successful Response
  • 422The request is not valid: errors[] names each field.
  • 4XXThe request was refused: the problem says why.
  • 5XXThe API could not answer: the problem says why.
Request
curl -X POST "https://api.mydeepagents.com/v1/delegations/dlg_01jczfzcy1wbcjnyyqh68jme0a/reject" \
  -H "Authorization: Bearer $MDA_API_KEY"
post/v1/delegations/{delegation_id}/revoke

Revoke delegation

Needs delegation.manage

Path parameters

  • delegation_idstringRequired

Response204

Answers 204 with no body.

Status codes

  • 204Successful Response
  • 422The request is not valid: errors[] names each field.
  • 4XXThe request was refused: the problem says why.
  • 5XXThe API could not answer: the problem says why.
Request
curl -X POST "https://api.mydeepagents.com/v1/delegations/dlg_01jczfzcy1wbcjnyyqh68jme0a/revoke" \
  -H "Authorization: Bearer $MDA_API_KEY"

Build with us

Ready for your first call?

Early access is open. Tell us what you want your agents to do, and we will help you get your first key.