# Carepatron Public API > Public API for Carepatron healthcare PMS/EHR platform. The Carepatron Public API gives you programmatic access to core Carepatron functionality - the same healthcare practice-management and EHR platform your team uses in the app. Use it to integrate Carepatron with your own systems and to automate workflows. This page is the starting point. For the full, interactive reference - every endpoint, parameter, and schema - see the [API reference](/api). The raw OpenAPI specification is published at [`/openapi.yaml`](/openapi.yaml) and [`/openapi.json`](/openapi.json) for tooling and code generation. ## Base URL All requests go to: ```text https://api.carepatron.com ``` ## Authentication The API authenticates each request with an API key sent in a request header. Create a key at developer.carepatron.com, then send it with every call. Only the workspace owner can create API keys, and the workspace needs a paid Carepatron plan. See the [API reference](/api) for the exact header name, the key format, and the scopes each endpoint requires. These are described authoritatively in the specification, so they never drift from what the API actually enforces. Treat API keys as secrets: never embed them in client-side code or commit them to source control. They are bearer tokens - whoever has the key can use it to do anything the API allows for the scopes the key was granted. To confine an App's keys to your own network, list your source addresses in the App's IP allowlist in the Developer Console: a request with any of its keys from anywhere else is refused with `403` [`ip_not_allowed`](/docs/errors#ip_not_allowed). Callers that reach the API over IPv6 need their IPv6 range listed. ## Signing in to the Developer Console Sign in as the workspace owner, with the same account and the same method (Google, Apple, or email and password) you use for the Carepatron app. A teammate's account is not offered the workspace, and the same email signed in another way can be a different account. Login to the Developer Console occurs via a UI hosted by the same secure store (AWS Cognito) that holds user login details for the Carepatron App. This login UI affords limited design changes - while we have plans to update and improve this we are currently restricted in how we design the login form and so it does not look as polished as we would like. It is however legitimate, so long as it is hosted at `auth.carepatron.com`. ## Versioning The API is versioned by date. Each request carries the API version it was written against in the `cp-api-version` header, so your integration keeps working as the API evolves. [API versions](/docs/versions) lists every supported version and what changed at each, and links each version's whole contract. ## Conventions - **Errors** are RFC 9457 problem documents (`application/problem+json`): a machine-readable `type` URI that opens the [error reference](/docs/errors), a human-readable `title`, an occurrence-specific `detail`, and an `instance` trace identifier. Branch on the code at the end of that URI rather than the whole URI - the code is immutable, the prefix is not. A refused request body carries one further member, `errors` - see [Validation errors](/docs/validation-errors). - **HTTPS only**: a request over plain `http://` is refused with a `403`, not redirected. Its API key has already crossed the network unencrypted, so replace a key you have sent that way. - **Rate limits** are reported through the `RateLimit-Limit`, `RateLimit-Remaining`, and `RateLimit-Reset` headers on every response the gateway's limiter answered. A refusal before it - a missing, malformed, rejected or wrong-environment key, a tenant-path refusal, a source address outside the App's IP allowlist, a `503` - and a refusal from the edge carry none, and while the limiter's store is unavailable a request is served without them. A `429` means slow down and retry after the window resets. - **Idempotency**: every `POST` requires an `Idempotency-Key` header. A resend with the same key within two hours is answered with the first response, marked `Idempotent-Replayed: true`, a refusal included; a request the gateway could not complete, such as one answered `504`, may be executed again when resent. Every other write is a `PUT` or a `DELETE`, which is idempotent by its method, so a retry needs no key. - **Long-running work** (for example, exporting contacts) returns `202 Accepted` with a job you poll until it succeeds or fails. - **Request size**: a request body may be at most 1 MiB (1,048,576 bytes), and a `POST` body at most 64 KiB (65,536 bytes). A larger body is refused with `413`. These caps apply to the whole body, whatever the bounds on its individual fields allow. ## Next steps - Browse the [interactive API reference](/api). - Download the specification: [`/openapi.yaml`](/openapi.yaml) or [`/openapi.json`](/openapi.json). - See what became generally available, and when, in the [changelog](/docs/changelog). ## API - Base URL: https://api.carepatron.com - Version: 2026-11-16 (header `cp-api-version`) - Auth: API key in the `cp-api-key` header ## Sections - [Contacts](https://developer.carepatron.com/api#tag/contacts): Operations related to contacts - [Email addresses](https://developer.carepatron.com/api#tag/email-addresses): Operations related to a contact's email addresses - [Phone numbers](https://developer.carepatron.com/api#tag/phone-numbers): Operations related to a contact's phone numbers - [Addresses](https://developer.carepatron.com/api#tag/addresses): Operations related to a contact's postal addresses - [Custom fields](https://developer.carepatron.com/api#tag/custom-fields): Operations related to contact custom field definitions and each contact's values - [Tags](https://developer.carepatron.com/api#tag/tags): Operations related to the workspace's tags. Only the tags the workspace's owner has approved for the App the key belongs to, on the App's page in the Developer Console, are served. - [Diagnostics](https://developer.carepatron.com/api#tag/diagnostics): Operations related to API health and status ## More - [OpenAPI spec (YAML)](https://developer.carepatron.com/openapi.yaml) - [OpenAPI spec (JSON)](https://developer.carepatron.com/openapi.json) - [Full reference (single file)](https://developer.carepatron.com/llms-full.txt) - [Interactive reference](https://developer.carepatron.com/api) - [Documentation](https://developer.carepatron.com/docs)