Skip to content

Start building

Jump toAPI keys
All endpoints

API keys

List, create and revoke the keys of your service accounts.

get/v1/api_keys

List API keys

Needs api_key.manage

Sorts by created_at (default, newest first), updated_at, last_used_at, expires_at, status and environment; q searches key IDs and scopes. Filters, each repeatable: status, environment, service_account_id, expiry (never, expired, soon: within 30 days, later), used (never, recent: in the last 30 days, idle: not since), created_by and updated_by (usr_… or sa_…), plus the created and updated time ranges; facets count each of them.

Query parameters

  • statusstring[]
  • environmentstring[]
  • service_account_idstring[]
  • expirystring[]
  • usedstring[]
  • created_bystring[]
  • updated_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
  • dataApiKey[]
    14 fields
    • objectstring
      api_key
    • created_atstring
    • environmentstring
      One oflivetest
    • expires_atstring or null
    • ip_allowliststring[] or null
    • key_idstring
    • last_used_atstring or null
    • scopesstring[]
    • service_account_idstring
    • statusstring
      One ofactiverevoked
    • workspace_idsstring[] 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
    • updated_atstring or null
    • updated_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
  • 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/api_keys?limit=20" \
  -H "Authorization: Bearer $MDA_API_KEY"
Response · 200
JSON
{
  "object": "list",
  "data": [
    {
      "object": "api_key",
      "created_at": "2026-11-10T09:30:00.000Z",
      "created_by": {
        "kind": "user",
        "id": "usr_01jcf1j9wjxfrnhqda3mq7ejxn",
        "name": "Ada Lovelace",
        "email": "ada@example.com"
      },
      "environment": "live",
      "expires_at": "2026-11-10T09:30:00.000Z",
      "ip_allowlist": [
        "203.0.113.0/24"
      ],
      "key_id": "k7m2p9qa3tq8v1zc",
      "last_used_at": "2026-11-10T09:30:00.000Z",
      "scopes": [
        "agent.view",
        "agent.run",
        "run.view"
      ],
      "service_account_id": "sa_01jcc0xyvpwprm791eysn305pn",
      "status": "active",
      "updated_at": "2026-11-10T09:30:00.000Z",
      "updated_by": {
        "kind": "user",
        "id": "usr_01jcf1j9wjxfrnhqda3mq7ejxn",
        "name": "Ada Lovelace",
        "email": "ada@example.com"
      },
      "workspace_ids": [
        "ws_01jccj30nr8ad7mx1yc5v9zx3h"
      ]
    }
  ],
  "has_more": false,
  "next_cursor": null,
  "total_count": 1
}
post/v1/api_keys

Create API key

Needs api_key.manage

Request bodyApiKeyCreate

  • scopesstring[]Required
    at least 1 itemsat most 200 items
  • service_account_idstringRequired
  • environmentstring
    One oflivetestDefault"live"
  • expires_atstring or null
    date-time
  • ip_allowliststring[] or null

Response201

  • objectstring
    api_key
  • keystring
  • key_idstring
  • notestring

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/api_keys" \
  -H "Authorization: Bearer $MDA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "service_account_id": "sa_01jcc0xyvpwprm791eysn305pn",
    "scopes": [
      "agent.view",
      "agent.run",
      "run.view"
    ],
    "environment": "live"
  }'
Response · 201
JSON
{
  "object": "api_key",
  "key": "mda_live_k7m2p9qa3tq8v1zc_eRo_PWaFdMY_tFkimvrCq0deP4fjquHR33cCUQBDB5K",
  "key_id": "k7m2p9qa3tq8v1zc",
  "note": "Store this key now. It is shown only once."
}
delete/v1/api_keys/{key_id}

Revoke API key

Needs api_key.manage

Path parameters

  • key_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 DELETE "https://api.mydeepagents.com/v1/api_keys/k7m2p9qa3tq8v1zc" \
  -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.