# Export

The Export API enables bulk export of records across all major resource types. All export endpoints return data in **JSON format** and support pagination.

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

> **Use case:** The Export API is designed for data warehousing, reporting, and migrations. For real-time access, use the individual resource endpoints.
>
> ***
>
> ### Export URL Pattern
>
> ```
> GET /{tenantName}/{instanceName}/export/{resourceName}?start={value}&pageSize={value}
> ```
>
> #### Common Query Parameters

| Parameter  | Type    | Default | Description                                                 |
| ---------- | ------- | ------- | ----------------------------------------------------------- |
| `start`    | string  | —       | ISO 8601 timestamp — return records updated after this time |
| `pageSize` | integer | `100`   | Number of records per page (max: `1000`)                    |
| `page`     | integer | `0`     | Page number                                                 |

> ***
>
> ### Available Export Endpoints
>
> #### Patients
>
> **GET** `/{tenantName}/{instanceName}/export/patients`
>
> #### CDT Records
>
> **GET** `/{tenantName}/{instanceName}/export/cdt-records`
>
> #### PDT Records
>
> **GET** `/{tenantName}/{instanceName}/export/pdt-records`
>
> #### Care Plans
>
> **GET** `/{tenantName}/{instanceName}/export/care-plans`
>
> #### Voice Calls
>
> **GET** `/{tenantName}/{instanceName}/export/calls`
>
> #### Chat Messages
>
> **GET** `/{tenantName}/{instanceName}/export/chat-messages`
>
> #### Programs
>
> **GET** `/{tenantName}/{instanceName}/export/programs`
>
> #### SMS
>
> **GET** `/{tenantName}/{instanceName}/export/sms`
>
> #### WhatsApp Messages
>
> **GET** `/{tenantName}/{instanceName}/export/whatsapp-messages`
>
> #### Calendar Events
>
> **GET** `/{tenantName}/{instanceName}/export/calendar-events`
>
> #### Email
>
> **GET** `/{tenantName}/{instanceName}/export/email`
>
> #### Tasks
>
> **GET** `/{tenantName}/{instanceName}/export/tasks`
>
> #### Assessments
>
> **GET** `/{tenantName}/{instanceName}/export/assessments`
>
> #### PFA (Patient-Facing Assessments)
>
> **GET** `/{tenantName}/{instanceName}/export/pfa`
>
> #### Encounters
>
> **GET** `/{tenantName}/{instanceName}/export/encounters`
>
> #### Encounter Comments
>
> **GET** `/{tenantName}/{instanceName}/export/encounter-comments`
>
> #### Encounter Dispositions
>
> **GET** `/{tenantName}/{instanceName}/export/encounter-dispositions`
>
> #### Automation Audit
>
> **GET** `/{tenantName}/{instanceName}/export/automation-audit`
>
> #### Contacts
>
> **GET** `/{tenantName}/{instanceName}/export/contacts`
>
> #### Document Summary
>
> **GET** `/{tenantName}/{instanceName}/export/document-summary`
>
> ***
>
> ### Formation Exports
>
> #### Export CDT Formation
>
> **GET** `/{tenantName}/{instanceName}/export/formation/cdt`
>
> Returns schema definitions for all CDTs.
>
> #### Export PDT Formation
>
> **GET** `/{tenantName}/{instanceName}/export/formation/pdt`
>
> Returns schema definitions for all PDTs.
>
> ***
>
> ### Example Response
>
> ```json
> {
>   "data": [
>     {
>       "id": "patient-uuid",
>       "firstName": "Jane",
>       "lastName": "Smith",
>       "updatedAt": "2026-03-18T15:00:00Z"
>     }
>   ],
>   "metaInfo": {
>     "page": 0,
>     "pageSize": 100,
>     "totalElements": 1500,
>     "totalPages": 15
>   }
> }
> ```


---

# Agent Instructions: 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/export.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.
