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

# Get attachment metadata

> Return metadata for a temporary uploaded attachment owned by the authenticated team. File bytes are not returned.



## OpenAPI

````yaml /openapi-sending.json get /emails/attachments/{attachment_id}
openapi: 3.1.0
info:
  description: >-
    Send emails programmatically via the Sendmux email infrastructure. Every
    response carries an `X-Request-Id` header; errors include a `retryable`
    flag. 429 and 503 responses include `Retry-After`. Mutating endpoints accept
    an `Idempotency-Key` header for safe retries.
  title: Sendmux Sending API
  version: 1.0.0
servers:
  - description: Production
    url: https://smtp.sendmux.ai/api/v1
security:
  - BearerAuth: []
  - OAuth2:
      - email.send
paths:
  /emails/attachments/{attachment_id}:
    get:
      tags:
        - Attachments
      summary: Get attachment metadata
      description: >-
        Return metadata for a temporary uploaded attachment owned by the
        authenticated team. File bytes are not returned.
      operationId: sendingGetAttachment
      parameters:
        - description: Temporary attachment ID returned by an upload endpoint.
          in: path
          name: attachment_id
          required: true
          schema:
            pattern: ^att_[a-z0-9]{24}$
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AttachmentUploadResponse'
          description: Attachment metadata
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Authentication required
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Insufficient permissions
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Attachment not found or expired
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Rate limit exceeded
        '503':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Attachment storage temporarily unavailable
      security:
        - BearerAuth: []
        - OAuth2:
            - email.send
components:
  schemas:
    AttachmentUploadResponse:
      allOf:
        - $ref: '#/components/schemas/SuccessEnvelope'
        - properties:
            data:
              $ref: '#/components/schemas/AttachmentUploadData'
          required:
            - data
          type: object
      unevaluatedProperties: false
    ErrorResponse:
      additionalProperties: false
      properties:
        error:
          $ref: '#/components/schemas/ErrorDetail'
        meta:
          $ref: '#/components/schemas/Meta'
        ok:
          enum:
            - false
          type: boolean
      required:
        - ok
        - error
        - meta
      type: object
    SuccessEnvelope:
      properties:
        meta:
          $ref: '#/components/schemas/Meta'
        ok:
          enum:
            - true
          type: boolean
      required:
        - ok
        - meta
      type: object
    AttachmentUploadData:
      additionalProperties: false
      properties:
        attachment_id:
          description: Temporary attachment ID to use in email attachments[].
          example: att_tz4a98xxat96iws9zmbrgj3a
          pattern: ^att_[a-z0-9]{24}$
          type: string
        content_type:
          description: Stored attachment MIME type
          example: application/pdf
          type: string
        expires_at:
          description: ISO timestamp when this temporary attachment reference expires.
          example: '2026-07-07T08:15:00.000Z'
          format: date-time
          type: string
        filename:
          description: Stored attachment filename
          example: analysis.pdf
          type: string
        size_bytes:
          description: Stored attachment byte size
          example: 20480
          type: integer
      required:
        - attachment_id
        - filename
        - content_type
        - size_bytes
        - expires_at
      type: object
    ErrorDetail:
      additionalProperties: false
      properties:
        code:
          description: Machine-readable error code
          example: validation_error
          type: string
        doc_url:
          description: Link to error documentation
          format: uri
          type: string
        errors:
          description: Accumulated per-field issues (validation errors)
          items:
            $ref: '#/components/schemas/ErrorIssue'
          type: array
        message:
          description: Human-readable error description
          type: string
        param:
          description: Parameter that caused the error
          type: string
        retryable:
          description: >-
            True when the client may safely retry the same request. 429 and 5xx
            default true; 4xx default false.
          type: boolean
      required:
        - code
        - message
        - retryable
      type: object
    Meta:
      additionalProperties: false
      properties:
        request_id:
          description: Unique request identifier
          example: req_clxxxxxxxxxxxxxxxxxxxxxxxxx
          type: string
      required:
        - request_id
      type: object
    ErrorIssue:
      additionalProperties: false
      properties:
        code:
          description: Issue code from the validator
          example: invalid_string
          type: string
        field:
          description: Dot-path to the failing field
          example: to.email
          type: string
        message:
          description: Human-readable issue message
          type: string
      required:
        - field
        - code
        - message
      type: object
  securitySchemes:
    BearerAuth:
      description: Sendmux API key (smx_...)
      scheme: bearer
      type: http
    OAuth2:
      description: >-
        Use the authorisation-code flow with S256 PKCE and
        resource=https://sendmux.ai/api. The user must grant Sending API access
        and email.send. OAuth access tokens authenticate HTTP requests; use a
        send-capable API key for SMTP.
      flows:
        authorizationCode:
          authorizationUrl: https://app.sendmux.ai/oauth/authorize
          refreshUrl: https://app.sendmux.ai/oauth/token
          scopes:
            email.send: Send email and manage temporary sending attachments
          tokenUrl: https://app.sendmux.ai/oauth/token
      type: oauth2

````

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