Skip to content

Start building

Jump toFiles
All endpoints

Files

Download files that tools and runs produced.

post/v1/files/{file_id}/download

Download file

Needs run.view_content

A short-lived link to one file of a run the caller may read: the file's reference with its run, and url, a presigned GET that lives 5 minutes. A file that expired, or that is not in this organization, is 404.

Path parameters

  • file_idstringRequired

Response200

  • objectstring
    file_download
  • fileConnectorFile

    A file by reference: what an agent or a workflow holds. content_type is recorded, never trusted.

    8 fields
    • idstring
    • content_typestring
    • created_atstring
    • data_classstring
      One ofpublicinternalpiisensitivephi
    • expires_atstring
    • namestring
    • runFileRun
      2 fields
      • idstring
      • kindstring
        One ofagentworkflow
    • sizeinteger
  • urlstring
  • url_expires_atstring

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 -X POST "https://api.mydeepagents.com/v1/files/fil_01jcdpvzdzav75whchagjf00tm/download" \
  -H "Authorization: Bearer $MDA_API_KEY"
Response · 200
JSON
{
  "object": "file_download",
  "file": {
    "id": "id",
    "content_type": "content type",
    "created_at": "2026-11-10T09:30:00.000Z",
    "data_class": "public",
    "expires_at": "2026-11-10T09:30:00.000Z",
    "name": "Support triage",
    "run": {
      "id": "id",
      "kind": "agent"
    },
    "size": 2
  },
  "url": "https://mcp.example.com/mcp",
  "url_expires_at": "2026-11-10T09:30:00.000Z"
}

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.