Skip to main content
GET
/
v1
/
attachments
/
{uuid}
/
{name}
Download an attachment
curl --request GET \
  --url https://api.devin.ai/v1/attachments/{uuid}/{name} \
  --header 'Authorization: Bearer <token>'
{
  "detail": [
    {
      "loc": [
        "<string>"
      ],
      "msg": "<string>",
      "type": "<string>"
    }
  ]
}
This endpoint allows you to download files from a Devin session. If you want to upload resources, you should use the upload endpoint. The endpoint returns a 307 redirect to a presigned URL that provides temporary access to the file. The presigned URL is valid for 60 seconds.

Example Usage

import requests

# Download an attachment
response = requests.get(
    f"https://api.devin.ai/v1/attachments/{uuid}/{filename}",
    headers={"Authorization": f"Bearer {DEVIN_API_KEY}"},
    allow_redirects=True
)

# Save the file content
with open(filename, "wb") as f:
    f.write(response.content)

Authorizations

Authorization
string
header
required

Personal API Key (apk_user_) or Service API Key (apk_)

Path Parameters

uuid
string
required
name
string
required

Response

Redirect to presigned download URL