> For the complete documentation index, see [llms.txt](https://docs.welkinhealth.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.welkinhealth.com/developer-and-integration-guide/api-reference/fax.md).

# Fax

The Fax API provides full lifecycle management for faxes — sending outbound faxes, receiving and assigning inbound faxes, and managing draft fax records and their attachments.

Most requests require a fax ID, which you can retrieve from the Get All Faxes response.

**Base path:** `/{tenantName}/{instanceName}/faxes`

***

## Sending a Fax — Workflow

To send a fax via the API, follow these steps in order:

1. **Create Draft Fax** — the response includes the draft `id` needed for subsequent requests
2. **Update Fax** *(optional)* — modify receiver or subject before sending
3. **Upload Files** — attach one or more files to the draft
4. **Assign Fax** *(optional)* — link the fax to a patient record
5. **Send Draft Fax** — transmit the fax

***

## Endpoints

### GET Get All Faxes

**GET** `/{tenantName}/{instanceName}/faxes`

Get a list of all faxes in the environment.

#### Query Parameters

| Parameter   | Type    | Required | Description                     |
| ----------- | ------- | -------- | ------------------------------- |
| `page`      | integer | No       | Page number (zero-based)        |
| `size`      | integer | No       | Number of results per page      |
| `sort`      | string  | No       | Field to sort by                |
| `direction` | string  | No       | Sort direction: `ASC` or `DESC` |

#### Example Request

```http
GET /welkinhealth/live/faxes
Authorization: Bearer <token>
```

***

### GET Get Fax by ID

**GET** `/{tenantName}/{instanceName}/faxes/{faxId}`

Allows you to find a specific fax.

#### Example Request

```http
GET /welkinhealth/live/faxes/{faxId}
Authorization: Bearer <token>
```

***

### POST Create Draft Fax

**POST** `/{tenantName}/{instanceName}/faxes`

Request to create a fax draft. The response will return the draft ID, which is required for subsequent requests to perform actions on this draft.

#### Example Request

```http
POST /welkinhealth/live/faxes
Authorization: Bearer <token>
Content-Type: application/json

{
  "receiverFaxNumber": "+15551234567",
  "subject": "Patient Records"
}
```

***

### PATCH Update Fax

**PATCH** `/{tenantName}/{instanceName}/faxes/{faxId}`

Request to update a fax. This request allows you to edit a fax draft before sending it. You can retrieve the fax ID from the response to a fax draft creation request or from a fax list request.

You can also use this request to mark an incoming fax as reviewed by setting `"reviewed": true` in the request body. This only applies to incoming faxes.

For outgoing faxes, you can update the associated patient by including `"patientId"` in the body.

#### Example Request

```http
PATCH /welkinhealth/live/faxes/{faxId}
Authorization: Bearer <token>
Content-Type: application/json

{
  "receiverFaxNumber": "+15551234567",
  "subject": "Updated Subject",
  "reviewed": true
}
```

***

### POST Upload Files to Draft Fax

**POST** `/{tenantName}/{instanceName}/faxes/{faxId}/files`

Request to upload files to a fax draft. You can retrieve the fax ID from the response to a fax draft creation request or from a fax list request.

The response will also include the IDs of the uploaded files — these are required if you need to delete a file from the draft.

Supported file types: `jpg`, `jpeg`, `png`, `pdf`, `docx`. Maximum 10 files with a total size of up to 100 MB.

#### Example Request

```http
POST /welkinhealth/live/faxes/{faxId}/files
Authorization: Bearer <token>
Content-Type: multipart/form-data

file=@document.pdf
```

***

### DELETE Delete File from Draft Fax

**DELETE** `/{tenantName}/{instanceName}/faxes/{faxId}/files/{fileId}`

This request allows you to delete a file from the fax draft. You must specify the file ID, which you can retrieve from the response to a fax file upload request or from a fax list request.

#### Example Request

```http
DELETE /welkinhealth/live/faxes/{faxId}/files/{fileId}
Authorization: Bearer <token>
```

***

### POST Send Draft Fax

**POST** `/{tenantName}/{instanceName}/faxes/{faxId}/send`

Send a draft fax with the specified ID. The fax status in the response will be `PROCESSING`, indicating the fax is currently being sent.

You can retrieve the fax ID from the response to a fax draft creation request or from a fax list request.

#### Example Request

```http
POST /welkinhealth/live/faxes/{faxId}/send
Authorization: Bearer <token>
```

***

### POST Retry Sending

**POST** `/{tenantName}/{instanceName}/faxes/{faxId}/retry`

If the fax failed to send, you can use this request to retry sending it. You can retrieve the fax ID from the response to a fax draft creation request or from a fax list request.

#### Example Request

```http
POST /welkinhealth/live/faxes/{faxId}/retry
Authorization: Bearer <token>
```

***

### POST Assign Fax

**POST** `/{tenantName}/{instanceName}/faxes/{faxId}/assign`

Request to assign a patient to the fax.

For an incoming fax, the request body must include the patient ID and the document type in which the fax file will be saved.

For an outgoing fax, only the patient ID is required.

#### Example Request

```http
POST /welkinhealth/live/faxes/{faxId}/assign
Authorization: Bearer <token>
Content-Type: application/json

{
  "patientId": "{patientId}",
  "documentTypeId": "{documentTypeId}"
}
```

***

### DELETE Delete Fax

**DELETE** `/{tenantName}/{instanceName}/faxes/{faxId}`

Delete the fax with the specified ID.

#### Example Request

```http
DELETE /welkinhealth/live/faxes/{faxId}
Authorization: Bearer <token>
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.welkinhealth.com/developer-and-integration-guide/api-reference/fax.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
