# Create attachment for appointment

This endpoint is used to upload attachment documents related to the appointment for the provider to view. You can upload more than one attachment with the same attachment_type for the same appointment_id if needed. The provider will be able to receive all uploaded attachments.
Only documents of type jpg, png, pdf, and docx are supported. Documents must be less than 100MB. You may not upload attachments to appointments in a failed state or over 7 days after the appointment.

Endpoint: POST /v1/appointments/{appointment_id}/attachments
Version: 1.177
Security: ClientCredentialsFlow, AuthorizationCodeFlow

## Path parameters:

  - `appointment_id` (string, required)

## Request fields (multipart/form-data):

  - `attachment` (string, required)

  - `attachment_type` (string, required)
    The type of attachment being uploaded.
- `community_care_packet`: Required for VA referrals to Community Care Providers. Use when submitting referral documents required by the Department  of Veterans Affairs for appointments within its extended network.
- `pcp_patient_referral`: Use to support appointments booked with an approved referral from a primary care doctor.
    Enum: "community_care_packet", "pcp_patient_referral", "patient_front_insurance_card", "patient_back_insurance_card"

## Response 200 fields (application/json):

  - `request_id` (string, required)
    Unique request identifier for tracing

  - `data` (object, required)

  - `data.appointment_id` (string, required)

  - `data.attachments` (array, required)

  - `data.attachments.attachment_type` (string, required)
    The type of attachment being uploaded.
- `community_care_packet`: Required for VA referrals to Community Care Providers. Use when submitting referral documents required by the Department  of Veterans Affairs for appointments within its extended network.
- `pcp_patient_referral`: Use to support appointments booked with an approved referral from a primary care doctor.
    Enum: "community_care_packet", "pcp_patient_referral", "patient_front_insurance_card", "patient_back_insurance_card"

## Response 400 fields (application/json):

  - `request_id` (string, required)
    Unique request identifier for tracing

  - `error_type` (string, required)
    Enum: "api_error", "invalid_request"

  - `errors` (array, required)

  - `errors.field` (string)

  - `errors.message` (string, required)

## Response 404 fields (application/json):

  - `request_id` (string, required)
    Unique request identifier for tracing

  - `error_type` (string, required)
    Enum: "api_error", "invalid_request"

  - `errors` (array, required)

  - `errors.field` (string)

  - `errors.message` (string, required)

