> ## 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.

> Descarga archivos adjuntos que se hayan subido previamente. Devuelve una redirección a una URL prefirmada para un acceso seguro al archivo.

# Descargar adjunto

Este endpoint permite descargar archivos de una sesión de Devin. Si quieres subir recursos, debes usar el [endpoint de carga](/es/api-reference/v1/attachments/upload-files-for-devin-to-work-with).

El endpoint devuelve una redirección 307 a una URL prefirmada que proporciona acceso temporal al archivo. La URL prefirmada es válida durante 60 segundos.

<div id="example-usage">
  ## Ejemplos de uso
</div>

```python theme={null}
import requests

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

# Guardar el contenido del archivo
with open(filename, "wb") as f:
    f.write(response.content)
```


## OpenAPI

````yaml es/v1-openapi.yaml GET /v1/attachments/{uuid}/{name}
openapi: 3.1.0
info:
  description: Devin v1 API con API keys personales y de servicio
  title: Devin API v1
  version: 1.0.0
servers: []
security:
  - bearerAuth: []
paths:
  /v1/attachments/{uuid}/{name}:
    get:
      summary: Descargar adjunto
      description: >-
        Descarga un archivo adjunto mediante autenticación con API key. Devuelve
        una redirección a una URL prefirmada.
      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: Respuesta correcta
        '307':
          description: Redirigir a la URL de descarga prefirmada
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Error de validación
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: Clave de API personal (apk_user_\*) o clave de API de servicio (apk_\*)
      scheme: bearer
      type: http

````