GET
/
attachments
/
{uuid}
/
{name}
# Note: -L flag is required to follow the 307 redirect
curl -L -X GET "https://api.devin.ai/v1/attachments/{uuid}/{name}" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -o "downloaded_file.ext"
This response does not have an example.

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

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

uuid
string
required

The UUID of the attachment

name
string
required

The filename of the attachment

Response

307

Temporary redirect to presigned URL for file download