Skip to content

Start building

Jump toAudit and exports
All endpoints

Audit and exports

Who did what and when, and full exports of your organization.

get/v1/audit_events

List audit

Needs audit.view

Newest first, filtered, cursor-paged. Who did what — never the content. include=total_count counts up to 10,000.

Query parameters

  • limitinteger
    Default50at least 1at most 200
  • cursorstring
  • includestring[]
    One oftotal_countfacets
  • actionstring
  • actor_idstring
  • resource_typestring
  • created_afterstring
    date-time
  • created_beforestring
    date-time
  • decisionstring
    One ofalloweddenied_authzdenied_policy
  • qstring
    at most 200 characters

Response200

  • objectstring
    list
  • dataAuditEvent[]
    10 fields
    • idstring
    • objectstring
      audit_event
    • actionstring
    • actorAuditActor
      2 fields
      • idstring or null
      • kindstring
    • atstring
    • changesstring[]
    • decisionstring
    • delegation_idstring or null
    • resource_idstring or null
    • resource_typestring 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/audit_events?limit=20" \
  -H "Authorization: Bearer $MDA_API_KEY"
Response · 200
JSON
{
  "object": "list",
  "data": [
    {
      "id": "id",
      "object": "audit_event",
      "action": "send_message",
      "actor": {
        "id": "id",
        "kind": "kind"
      },
      "at": "at",
      "changes": [
        "change"
      ],
      "decision": "decision",
      "delegation_id": "dlg_01jczfzcy1wbcjnyyqh68jme0a",
      "resource_id": "resource id",
      "resource_type": "resource type"
    }
  ],
  "has_more": false,
  "next_cursor": null,
  "total_count": 1
}
get/v1/audit_events/export

Export audit

Needs audit.view

The filtered log as CSV, times in UTC RFC 3339, at most 10,000 rows; narrow the dates for more. The export itself is audited.

Query parameters

  • actionstring
  • actor_idstring
  • resource_typestring
  • created_afterstring
    date-time
  • created_beforestring
    date-time
  • decisionstring
    One ofalloweddenied_authzdenied_policy
  • qstring
    at most 200 characters

Response200

Answers with a file (text/csv).

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/audit_events/export" \
  -H "Authorization: Bearer $MDA_API_KEY" \
  -o export.csv
get/v1/exports

List exports

Needs tenant.export

Response200

  • objectstring
    list
  • dataExport[]
    11 fields
    • idstring
    • objectstring
      export
    • countsmap<string, integer>
    • created_atstring or null
    • error_codestring or null
    • expires_atstring or null
    • finished_atstring or null
    • requested_bystring
    • size_bytesinteger or null
    • statestring
      One ofqueuedrunningreadyfailedexpired
    • download_urlstring 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
  • 4XXThe request was refused: the problem says why.
  • 5XXThe API could not answer: the problem says why.
Request
curl "https://api.mydeepagents.com/v1/exports" \
  -H "Authorization: Bearer $MDA_API_KEY"
Response · 200
JSON
{
  "object": "list",
  "data": [
    {
      "id": "exp_01jcencwcmcgamqhk6kp5426fb",
      "object": "export",
      "counts": {
        "key": 2
      },
      "created_at": "2026-11-10T09:30:00.000Z",
      "download_url": "https://example.com",
      "error_code": null,
      "expires_at": "2026-11-10T09:30:00.000Z",
      "finished_at": "2026-11-10T09:30:00.000Z",
      "requested_by": "usr_01jcf1j9wjxfrnhqda3mq7ejxn",
      "size_bytes": 1048576,
      "state": "queued"
    }
  ],
  "has_more": false,
  "next_cursor": null,
  "total_count": 1
}
post/v1/exports

Create export

Needs tenant.export

The password in the answer is shown once and never stored: it is the only way to open the archive.

Response202

  • idstring
  • objectstring
    export
  • countsmap<string, integer>
  • created_atstring or null
  • error_codestring or null
  • expires_atstring or null
  • finished_atstring or null
  • passwordstring
  • requested_bystring
  • size_bytesinteger or null
  • statestring
    One ofqueuedrunningreadyfailedexpired
  • download_urlstring or null

Status codes

  • 202Successful Response
  • 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/exports" \
  -H "Authorization: Bearer $MDA_API_KEY"
Response · 202
JSON
{
  "id": "exp_01jcencwcmcgamqhk6kp5426fb",
  "object": "export",
  "counts": {
    "key": 2
  },
  "created_at": "2026-11-10T09:30:00.000Z",
  "download_url": "https://example.com",
  "error_code": null,
  "expires_at": "2026-11-10T09:30:00.000Z",
  "finished_at": "2026-11-10T09:30:00.000Z",
  "password": "password",
  "requested_by": "usr_01jcf1j9wjxfrnhqda3mq7ejxn",
  "size_bytes": 1048576,
  "state": "queued"
}
get/v1/exports/{export_id}

Get export

Needs tenant.export

Path parameters

  • export_idstringRequired

Response200

  • idstring
  • objectstring
    export
  • countsmap<string, integer>
  • created_atstring or null
  • error_codestring or null
  • expires_atstring or null
  • finished_atstring or null
  • requested_bystring
  • size_bytesinteger or null
  • statestring
    One ofqueuedrunningreadyfailedexpired
  • download_urlstring 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/exports/exp_01jcencwcmcgamqhk6kp5426fb" \
  -H "Authorization: Bearer $MDA_API_KEY"
Response · 200
JSON
{
  "id": "exp_01jcencwcmcgamqhk6kp5426fb",
  "object": "export",
  "counts": {
    "key": 2
  },
  "created_at": "2026-11-10T09:30:00.000Z",
  "download_url": "https://example.com",
  "error_code": null,
  "expires_at": "2026-11-10T09:30:00.000Z",
  "finished_at": "2026-11-10T09:30:00.000Z",
  "requested_by": "usr_01jcf1j9wjxfrnhqda3mq7ejxn",
  "size_bytes": 1048576,
  "state": "queued"
}

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.