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

# Anexar arquivo a uma tarefa



## OpenAPI

````yaml /api-reference/v1/swagger.json post /api/v1/tasks/{task_id}/attachments
openapi: 3.1.0
info:
  title: API V1
  version: v1
servers:
  - url: https://app.synkrony.ai
security:
  - BearerAuth: []
paths:
  /api/v1/tasks/{task_id}/attachments:
    post:
      tags:
        - Tasks
      summary: Anexar arquivo a uma tarefa
      parameters:
        - name: task_id
          in: path
          required: true
          description: ID da tarefa
          schema:
            type: integer
      requestBody:
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                file:
                  type: string
                  format: binary
                  description: Arquivo a ser anexado
              required:
                - file
        required: true
      responses:
        '201':
          description: created
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/Attachment'
                required:
                  - data
        '401':
          description: unauthorized
        '404':
          description: task not found
        '422':
          description: invalid upload or storage limit exceeded
        '500':
          description: internal server error
components:
  schemas:
    Attachment:
      type: object
      properties:
        id:
          type: integer
        filename:
          type: string
        byte_size:
          type: integer
        content_type:
          type: string
        created_at:
          type: string
          format: date-time
        url:
          type: string
        blob_signed_id:
          type: string
        signed_id:
          type: string
        uploaded_by:
          type: integer
          nullable: true
          description: >-
            ID do usuário para uploads feitos pela interface web; nulo para
            uploads via API
        uploaded_via:
          type: string
          enum:
            - api
            - web
          nullable: true
          description: Origem do upload
      required:
        - id
        - filename
        - byte_size
        - content_type
        - created_at
        - url
        - blob_signed_id
        - signed_id
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: 'API token no formato Bearer. Exemplo: Bearer YOUR_API_TOKEN'

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.