# Upload Enrollment Document
Source: https://www.stedi.com/docs/healthcare/api-reference/post-enrollment-document-upload

***

openapi: enrollment post /enrollments/{enrollmentId}/documents
title: Upload Enrollment Document
sidebarTitle: "Upload Document"
-------------------------------

This endpoint returns a pre-signed URL that you can use to upload a PDF document related to the specified [transaction enrollment](/healthcare/transaction-enrollment).

1. Call this endpoint with the enrollment ID for the transaction enrollment request where you want to upload the PDF. The enrollment ID is returned in the responses for the [Create Enrollment](/healthcare/api-reference/post-enrollment-create-enrollment) and [List Enrollments](/healthcare/api-reference/get-enrollment-list-enrollments) endpoints. It's also listed at the top of the [enrollment's details page](https://portal.stedi.com/app/healthcare/enrollments) in the Stedi portal.
2. The endpoint returns a pre-signed URL that you can use to upload the PDF document to the enrollment record. The URL expires in 24 hours.
3. Use a `PUT` request to upload the attachment file to the pre-signed URL (`uploadURL`) in the response. The request must include a `Content-Type` header set to `application/pdf`.

   ```bash
   curl --request PUT \
   --url "<uploadUrl>" \
   --header "Content-Type: application/pdf" \
   --upload-file /path/to/file.pdf
   ```

   Uploaded documents are listed on the enrollment's details page in the Stedi portal.

## Document status

Calling this endpoint creates a new document record on the enrollment with its status set to `PENDING`. When you successfully upload the PDF to the pre-signed URL, the document record's status changes from `PENDING` to `UPLOADED`.

After 24 hours, Stedi automatically deletes any document records that are still in the `PENDING` status. In this case, you'll need to call this endpoint again to get a new pre-signed URL for uploading the document.