> ## Documentation Index
> Fetch the complete documentation index at: https://docs.devinenterprise.com/llms.txt
> Use this file to discover all available pages before exploring further.

> Download attachment files that were previously uploaded. Returns a redirect to a presigned URL for secure file access.

# Download an attachment

This endpoint allows you to download files from a Devin session. If you want to upload resources, you should use the [upload endpoint](/api-reference/v1/attachments/upload-files-for-devin-to-work-with).

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

```python theme={null}
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)
```


## OpenAPI

````yaml /v1-openapi.yaml GET /v1/attachments/{uuid}/{name}
openapi: 3.1.0
info:
  description: Devin v1 API with Personal and Service API Keys
  title: Devin API v1
  version: 1.0.0
servers: []
security:
  - bearerAuth: []
paths:
  /v1/attachments/{uuid}/{name}:
    get:
      summary: Download an attachment
      description: >-
        Download a file attachment using API key authentication. Returns a
        redirect to a presigned URL.
      operationId: download_attachment_customer_endpoint_v1_attachments__uuid___name__get
      parameters:
        - in: path
          name: uuid
          required: true
          schema:
            title: Uuid
            type: string
        - in: path
          name: name
          required: true
          schema:
            title: Name
            type: string
      responses:
        '200':
          content:
            application/json:
              schema: {}
          description: Successful Response
        '307':
          description: Redirect to presigned download URL
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
components:
  schemas:
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          title: Location
          type: array
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
      type: object
  securitySchemes:
    bearerAuth:
      description: Personal API Key (apk_user_*) or Service API Key (apk_*)
      scheme: bearer
      type: http

````