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

# Get Message Attachment Urls

> Get signed URLs for all attachments of a message.

Returns a mapping of:
- by_content_id: content_id -> {attachment_id, signed_url} for inline images (cid: references)
- by_attachment_id: attachment_id -> signed_url for all downloadable attachments
- expires_at: when the signed URLs expire

Only returns URLs for attachments that have been downloaded to GCS.



## OpenAPI

````yaml get /email/messages/{message_id}/attachment-urls
openapi: 3.1.0
info:
  title: Decoda API
  description: External API documentation for the Decoda Health platform.
  version: '1.0'
servers: []
security: []
paths:
  /email/messages/{message_id}/attachment-urls:
    get:
      tags:
        - provider
        - email
      summary: Get Message Attachment Urls
      description: >-
        Get signed URLs for all attachments of a message.


        Returns a mapping of:

        - by_content_id: content_id -> {attachment_id, signed_url} for inline
        images (cid: references)

        - by_attachment_id: attachment_id -> signed_url for all downloadable
        attachments

        - expires_at: when the signed URLs expire


        Only returns URLs for attachments that have been downloaded to GCS.
      operationId: >-
        get_message_attachment_urls_email_messages__message_id__attachment_urls_get
      parameters:
        - name: TENANT
          in: header
          required: true
          schema:
            type: string
            title: Tenant
          description: The tenant you are making this request on behalf of
        - name: API-KEY
          in: header
          required: true
          schema:
            type: string
            title: Api-Key
          description: Your api key
        - name: message_id
          in: path
          required: true
          schema:
            type: string
            title: Message Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MessageAttachmentUrlsResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    MessageAttachmentUrlsResponse:
      properties:
        byContentId:
          additionalProperties:
            $ref: '#/components/schemas/AttachmentUrlInfo'
          type: object
          title: Bycontentid
        byAttachmentId:
          additionalProperties:
            type: string
          type: object
          title: Byattachmentid
        expiresAt:
          type: string
          format: date-time
          title: Expiresat
      type: object
      required:
        - expiresAt
      title: MessageAttachmentUrlsResponse
      description: >-
        Response containing signed URLs for message attachments, keyed by
        content_id.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    AttachmentUrlInfo:
      properties:
        attachmentId:
          type: string
          title: Attachmentid
        signedUrl:
          type: string
          title: Signedurl
      type: object
      required:
        - attachmentId
        - signedUrl
      title: AttachmentUrlInfo
      description: Signed URL info for a single attachment.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````