{
"success": false,
"message": "Internal server error"
}
An encounter is an episode visit written to the patient’s chart together with its form documentation (for example a scored questionnaire such as GAD-7). Encounters are created using an asynchronous processing model, so creating one is not instantaneous.Instead of leaving your POST request hanging until completion, we immediately return a success response if the request is properly formed. We then notify you via a webhook when the encounter has been written to the EMR.This gives you flexibility around your user experience. For example, when you first make the /encounters call you can display a Processing status to your user, and when you receive the webhook notification you can update that to Completed.
How an encounter is created
Processing an encounter runs an ordered chain against the EMR:
Episode — the encounter is attached to the episode you give in episode_id. There is no fallback to another episode. Assign the patient to a team first, as a separate step, to open the episode.
Encounter type — the encounter_type is resolved against the client’s live billing matrix. An encounter type that is not billable for the client fails the encounter (see Failure).
Form documentation — the answers you supply are validated against the synced form definition (form_id) and written on the encounter. For a scored questionnaire, per-question scores are entered and totals and risk bands are derived by the EMR.
Sign and submit — the encounter is signed with the service date (encounter_date), start and end times, and location you supplied.
Read-back — after signing, the encounter is re-read from the EMR to confirm it persisted and to read its status and approval state before the success webhook is sent.
Request Parameters
Required Fields
patient_mrn (string, required): The patient’s medical record number. The patient must already be synced to Cobalt.
episode_id (string, required): The episode the encounter is created under. Use the exact id from the patient episode payload.
encounter_type (string, required): The encounter type to add, by name or numeric visit-type id (for example "GAD-7"). Must be billable for the client — that is, present in the client’s billing matrix.
form_id (string, required): EMR form id whose answers you are providing — the emr_form_id of a form from GET /v1/forms. Required when the encounter type documents a form.
answers (object, required): Form answers keyed by EMR question id (the emrQuestionId of each question in the form definition — see GET /v1/forms/{id}). For a scored questionnaire, provide the numeric score for each scored question; totals and risk bands are derived automatically. Answers are validated against the synced form definition before the encounter is written.
Optional Fields
encounter_date (string, optional): Encounter (service) date in YYYY-MM-DD format, in the practice’s local time. Defaults to today. Cannot be in the future.
start_time (string, optional): Service start as an ISO 8601 date-time (for example "2026-10-05T14:00:00-04:00"). A value without an offset is read in the practice’s local time. Sets the service date; if you also send encounter_date, it must be the same date. Cannot be in the future. Defaults to the current time.
end_time (string, optional): Service end as an ISO 8601 date-time, on the same day as start_time and after it. Defaults to one hour after start_time. Requires start_time.
location (string, optional): Service location, by EMR location id or exact name from the Location list on the EMR’s service form (for example "Broadway Office"). Defaults to the EMR’s default location for the service.
callback_urls (array of strings, optional): URLs to receive the completion webhook for this encounter, in addition to your account webhook.
{ "success": true, "message": "Encounter processing. A webhook event will be sent upon completion.", "encounter_id": "123e4567e89b12d3a456426614174000", "job_id": 12345}
The response includes:
encounter_id: Cobalt encounter ID (UUID without dashes). This is echoed back in the webhook payload so you can correlate the two.
job_id: Job execution identifier for tracking the async operation.
{ "success": false, "message": "answers must be an object keyed by EMR question id."}
Invalid Encounter Date
{ "success": false, "message": "encounter_date must be a valid date (YYYY-MM-DD)."}
{ "success": false, "message": "encounter_date cannot be in the future."}
Invalid Service Times
{ "success": false, "message": "end_time must be after start_time."}
Other messages: start_time must be an ISO 8601 date-time (e.g. 2026-10-05T14:00:00-04:00). (and the same for end_time), end_time requires start_time., end_time must be on the same day as start_time., encounter_date must match the date of start_time (<date>)., and start_time cannot be in the future.
User Not Found
{ "success": false, "message": "User not found."}
This indicates an issue with your access token.
Unsupported EMR
{ "success": false, "message": "Creating encounters is not supported for [EMR Name]."}
Your EMR system may not currently support encounter creation.
Webhook Notifications
When the encounter has finished processing, we send a webhook to your registered endpoint.
encounter_id: The Cobalt encounter ID you received in the response.
emr_encounter_id: The encounter id in the EMR.
emr_episode_id: The episode the encounter was written under.
emr_status: The encounter status in the EMR after signing (for example COMPLETED). null if the status could not be read.
approved: Whether the EMR approved the encounter on signing. Some EMR configurations approve an encounter automatically and others leave it unapproved; false means it still needs approval: approve it with PATCH /v1/encounters/{id}. null if the approval state could not be read.
patient_mrn: The patient’s medical record number.
Failure
{ "id": "<id-of-webhook-response>", "access_token_reference_id": "<access-token-reference-id>", "object": "event", "created": "2026-08-26T10:35:00.000Z", "type": "encounter.failed", "data": { "encounter_id": "123e4567e89b12d3a456426614174000", "emr_encounter_id": null, "patient_mrn": "1234567", "failure_reason": "Encounter type 'GAD-7' not available for client 1234567 (not in billing matrix)" }}
Transient problems are retried automatically and do not emit a webhook until they are resolved or the attempts are exhausted. A encounter.failed event is sent once, when the failure is permanent. Common failure_reason values:
Encounter type '<type>' not available for client <mrn> (not in billing matrix) — the encounter type is not billable for the client.
Missing required answers: <question ids> — one or more required form questions were not answered.
Location '<location>' is not in the service Location list for client <mrn>. — the location does not match a location id or name in the EMR’s service Location list.
Authorizations
client_id
string
header
required
client_secret
string
header
required
access_token
string
header
required
Body
application/json
encounter_type
string
required
Encounter type to add, by name or EMR id (e.g. "GAD-7", "Office Visit").
Example:
"GAD-7"
patient_mrn
string
Medical Record Number of the patient. With appointment_id it is taken from the appointment and, if sent, must match it.
Example:
"15539"
episode_id
string
Episode (FHIR EpisodeOfCare) the encounter is created under. Pull the exact id from the patient episode payload and pass it here — the encounter attaches to this episode with no fallback. Assign the patient to a team first (a separate step) to open the episode.
Example:
"32340"
form_id
string
EMR form id whose answers are provided (from GET /v1/forms). Required when the encounter type documents a form.
Example:
"392"
answers
object
Form answers keyed by EMR question id (from GET /v1/forms). Value by question format: single choice (radio, push button) and dropdown take the answer value or answer id; check box (multi-select) takes a list of answer values or ids; text box takes a string; date takes YYYY-MM-DD. An open-text narrative question takes the text as a string. To add notes to a choice (e.g. "Other"), send { "value": "Other", "notes": "..." }. For a scored questionnaire (e.g. GAD-7) provide the numeric score for each scored question; totals and risk bands are derived automatically. A conditional question (shown only after a trigger answer) is accepted only when its trigger answer is also supplied. An answer that does not match the form fails the request.
Show child attributes
Example:
{ "427919": { "value": "Other", "notes": "School visit" }, "427920": "Narrative text for the contact.", "467752": "2026-09-24", "467761": "Therapy", "467762": "Reason for the referral.", "467767": ["Mornings", "Afternoons"] }
encounter_date
string
Encounter (service) date (YYYY-MM-DD), in the practice's local time. Cannot be in the future. With appointment_id it is taken from the appointment and, if sent, must match it. Where not required, defaults to today.
Example:
"2026-08-26"
start_time
string<date-time>
Service start as an ISO 8601 date-time (e.g. "2026-10-05T14:00:00-04:00"). A value without an offset is read in the practice's local time. Sets the service date; when encounter_date is also given it must be the same date. Defaults to the current time.
Example:
"2026-10-05T14:00:00-04:00"
end_time
string<date-time>
Service end as an ISO 8601 date-time, on the same day as start_time and after it. Defaults to one hour after start_time. Requires start_time.
Example:
"2026-10-05T15:00:00-04:00"
location
string
Service location, by EMR location id (from GET /v1/locations) or, where the EMR lists locations on its service form, exact name (e.g. "Broadway Office"). With appointment_id, defaults to the appointment's location; otherwise defaults to the EMR's default location for the service where not required. An unknown location fails the request.
Example:
"Broadway Office"
provider
string
EMR provider id (from GET /v1/providers) the encounter is seen by. With appointment_id, defaults to the appointment's provider.
Example:
"b2c3d4e5f6a1478899aabbccddeeff00"
appointment_id
string
Cobalt appointment id to link the new encounter to. The patient, date, location and provider default from the appointment. If the appointment already has an encounter linked, no encounter is created and the encounter.failed webhook carries it as existing_emr_encounter_id. The linked encounter is also returned on the appointment as encounter_ehr_id.
Example:
"a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4"
callback_urls
string[]
URLs to receive the completion webhook for this encounter, in addition to the account webhook.
Example:
["https://example.com/webhooks/cobalt"]
expires_at
string<date-time> | null
Optional ISO 8601 timestamp with an explicit timezone offset, in the future when submitted. Cobalt starts no new operation attempt after this deadline and reports reasons[].code EXPIRED. An attempt already in progress, including write reconciliation, may finish after it.
Example:
"2027-06-15T14:30:00Z"
Response
Encounter queued for processing
success
boolean
required
Example:
true
message
string
required
Example:
"Encounter queued for processing"
encounter_id
string
required
Example:
"f47ac10b58cc4372a5670e02b2c3d479"
job_id
integer
required
Example:
12345
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Cobalt","colors":{"primary":"#576dee","light":"#8a9af4","dark":"#3a4cbc"},"logo":{"light":"https://mintcdn.com/cobalt-cd7844c1/ARV8r_xeyMO_zivG/logo/light.svg?fit=max\u0026auto=format\u0026n=ARV8r_xeyMO_zivG\u0026q=85\u0026s=de8566184dd7d19c926d1f0e5ee04d74","dark":"https://mintcdn.com/cobalt-cd7844c1/ARV8r_xeyMO_zivG/logo/dark.svg?fit=max\u0026auto=format\u0026n=ARV8r_xeyMO_zivG\u0026q=85\u0026s=c9b017690a9cf87eea9b8c1a41a0330e"},"favicon":"https://mintcdn.com/cobalt-cd7844c1/NyZchDiv0WDjeFlo/favicon.svg?fit=max\u0026auto=format\u0026n=NyZchDiv0WDjeFlo\u0026q=85\u0026s=f4adc378c31a71ebba62a9d5d28f3bb6","navbar":{"links":[{"href":"mailto:bryan@usecobalt.com","label":"Support"}]},"footer":{"socials":{"linkedin":"https://www.linkedin.com/company/usecobalt"}},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"cobalt-cd7844c1","hasAudioNarration":false,"actualSubdomain":"cobalt-cd7844c1","customDomains":["docs.usecobalt.com"],"gitSource":{"type":"github","owner":"cobalt-technology","repo":"docs","deployBranch":"master","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"entitlements":{},"buildId":"6af9cd9e50cc0037d87248b7","clientVersion":"0.0.4143","searchFilterCounts":[{"language":"default","tag":"API Reference","count":89},{"language":"default","tag":"Guides","count":31},{"language":"default","tag":"Webhooks","count":13},{"language":"default","tag":"Account","count":8},{"language":"default","tag":"Orders","count":6},{"language":"default","tag":"Patients","count":6},{"language":"default","tag":"Appointments","count":5},{"language":"default","tag":"Link","count":5},{"language":"default","tag":"Claims","count":4},{"language":"default","tag":"Documents","count":4}]},"assistantConfig":{},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"api-reference/encounters/create","slug":"/api-reference/encounters/create","pageMetadata":{"title":"Create Encounter","openapi":"POST /encounters","description":"Queues an encounter (an episode visit with form documentation) for creation in the provider's EMR system.","href":"/api-reference/encounters/create"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Queues an encounter (an episode visit with form documentation) for creation in the provider’s EMR system.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,ol:`ol`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Heading}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:`An encounter is an episode visit written to the patient’s chart together with its form documentation (for example a scored questionnaire such as GAD-7). Encounters are created using an asynchronous processing model, so creating one is not instantaneous.`}),`\n`,_jsx(_components.p,{children:`Instead of leaving your POST request hanging until completion, we immediately return a success response if the request is properly formed. We then notify you via a webhook when the encounter has been written to the EMR.`}),`\n`,_jsxs(_components.p,{children:[`This gives you flexibility around your user experience. For example, when you first make the `,_jsx(_components.code,{children:`/encounters`}),` call you can display a `,_jsx(_components.strong,{children:`Processing`}),` status to your user, and when you receive the webhook notification you can update that to `,_jsx(_components.strong,{children:`Completed`}),`.`]}),`\n`,_jsx(Heading,{level:`3`,id:`how-an-encounter-is-created`,children:`How an encounter is created`}),`\n`,_jsx(_components.p,{children:`Processing an encounter runs an ordered chain against the EMR:`}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Episode`}),` — the encounter is attached to the episode you give in `,_jsx(_components.code,{children:`episode_id`}),`. There is no fallback to another episode. Assign the patient to a team first, as a separate step, to open the episode.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Encounter type`}),` — the `,_jsx(_components.code,{children:`encounter_type`}),` is resolved against the client’s live billing matrix. An encounter type that is not billable for the client fails the encounter (see `,_jsx(_components.a,{href:`#failure`,children:`Failure`}),`).`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Form documentation`}),` — the `,_jsx(_components.code,{children:`answers`}),` you supply are validated against the synced form definition (`,_jsx(_components.code,{children:`form_id`}),`) and written on the encounter. For a scored questionnaire, per-question scores are entered and totals and risk bands are derived by the EMR.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Sign and submit`}),` — the encounter is signed with the service date (`,_jsx(_components.code,{children:`encounter_date`}),`), start and end times, and location you supplied.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Read-back`}),` — after signing, the encounter is re-read from the EMR to confirm it persisted and to read its status and approval state before the success webhook is sent.`]}),`\n`]}),`\n`,_jsx(Heading,{level:`3`,id:`request-parameters`,children:`Request Parameters`}),`\n`,_jsx(Heading,{level:`4`,id:`required-fields`,children:`Required Fields`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`patient_mrn`}),` (string, required): The patient’s medical record number. The patient must already be synced to Cobalt.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`episode_id`}),` (string, required): The episode the encounter is created under. Use the exact id from the patient episode payload.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`encounter_type`}),` (string, required): The encounter type to add, by name or numeric visit-type id (for example `,_jsx(_components.code,{children:`\"GAD-7\"`}),`). Must be billable for the client — that is, present in the client’s billing matrix.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`form_id`}),` (string, required): EMR form id whose answers you are providing — the `,_jsx(_components.code,{children:`emr_form_id`}),` of a form from `,_jsx(_components.a,{href:`/api-reference/forms/get`,children:_jsx(_components.code,{children:`GET /v1/forms`})}),`. Required when the encounter type documents a form.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`answers`}),` (object, required): Form answers keyed by EMR question id (the `,_jsx(_components.code,{children:`emrQuestionId`}),` of each question in the form definition — see `,_jsx(_components.a,{href:`/api-reference/forms/get-by-id`,children:_jsx(_components.code,{children:`GET /v1/forms/{id}`})}),`). For a scored questionnaire, provide the numeric score for each scored question; totals and risk bands are derived automatically. Answers are validated against the synced form definition before the encounter is written.`]}),`\n`]}),`\n`,_jsx(Heading,{level:`4`,id:`optional-fields`,children:`Optional Fields`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`encounter_date`}),` (string, optional): Encounter (service) date in `,_jsx(_components.code,{children:`YYYY-MM-DD`}),` format, in the practice’s local time. Defaults to today. Cannot be in the future.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`start_time`}),` (string, optional): Service start as an ISO 8601 date-time (for example `,_jsx(_components.code,{children:`\"2026-10-05T14:00:00-04:00\"`}),`). A value without an offset is read in the practice’s local time. Sets the service date; if you also send `,_jsx(_components.code,{children:`encounter_date`}),`, it must be the same date. Cannot be in the future. Defaults to the current time.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`end_time`}),` (string, optional): Service end as an ISO 8601 date-time, on the same day as `,_jsx(_components.code,{children:`start_time`}),` and after it. Defaults to one hour after `,_jsx(_components.code,{children:`start_time`}),`. Requires `,_jsx(_components.code,{children:`start_time`}),`.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`location`}),` (string, optional): Service location, by EMR location id or exact name from the Location list on the EMR’s service form (for example `,_jsx(_components.code,{children:`\"Broadway Office\"`}),`). Defaults to the EMR’s default location for the service.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`callback_urls`}),` (array of strings, optional): URLs to receive the completion webhook for this encounter, in addition to your account webhook.`]}),`\n`]}),`\n`,_jsx(Heading,{level:`3`,id:`example-request`,children:`Example Request`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`20`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`20`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -X`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` POST`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` https://api.usecobalt.com/v1/encounters`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`-H `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'Content-Type: application/json'`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`-H `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'client_id: ci_live_198908HJDKJSH98789OHKJL'`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`-H `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'client_secret: cs_live_9827hofdsklOYYHJLJh'`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`-H `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'access_token: 493JKLHIU98789hLKH9HHJH'`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`-d `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'{`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"patient_mrn\": \"1234567\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"episode_id\": \"32340\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"encounter_type\": \"GAD-7\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"form_id\": \"392\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"encounter_date\": \"2026-08-26\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"start_time\": \"2026-08-26T14:00:00-04:00\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"end_time\": \"2026-08-26T15:00:00-04:00\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"location\": \"Broadway Office\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"answers\": {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"453149\": \"3\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"453150\": \"2\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"453156\": \"Very difficult\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`}'`})}),`\n`]})})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`9`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`9`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -X`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` POST`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` https://api.usecobalt.com/v1/encounters`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`-H `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'Content-Type: application/json'`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`-H `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'client_id: ci_live_198908HJDKJSH98789OHKJL'`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`-H `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'client_secret: cs_live_9827hofdsklOYYHJLJh'`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`-H `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'access_token: 493JKLHIU98789hLKH9HHJH'`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`-d `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'{`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"appointment_id\": \"a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"encounter_type\": \"Office Visit\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`}'`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`3`,id:`example-response`,children:`Example Response`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`6`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`6`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"success\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`true`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Encounter processing. A webhook event will be sent upon completion.\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"encounter_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"123e4567e89b12d3a456426614174000\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"job_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`12345`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`The response includes:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`encounter_id`}),`: Cobalt encounter ID (UUID without dashes). This is echoed back in the webhook payload so you can correlate the two.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`job_id`}),`: Job execution identifier for tracking the async operation.`]}),`\n`]}),`\n`,_jsx(Heading,{level:`3`,id:`error-responses`,children:`Error Responses`}),`\n`,_jsx(Heading,{level:`4`,id:`missing-required-field`,children:`Missing Required Field`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`4`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`4`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"success\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`false`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Missing required field: patient_mrn\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`4`,id:`answers-not-an-object`,children:`Answers Not An Object`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`4`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`4`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"success\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`false`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"answers must be an object keyed by EMR question id.\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`4`,id:`invalid-encounter-date`,children:`Invalid Encounter Date`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`4`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`4`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"success\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`false`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"encounter_date must be a valid date (YYYY-MM-DD).\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`4`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`4`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"success\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`false`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"encounter_date cannot be in the future.\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`4`,id:`invalid-service-times`,children:`Invalid Service Times`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`4`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`4`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"success\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`false`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"end_time must be after start_time.\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Other messages: `,_jsx(_components.code,{children:`start_time must be an ISO 8601 date-time (e.g. 2026-10-05T14:00:00-04:00).`}),` (and the same for `,_jsx(_components.code,{children:`end_time`}),`), `,_jsx(_components.code,{children:`end_time requires start_time.`}),`, `,_jsx(_components.code,{children:`end_time must be on the same day as start_time.`}),`, `,_jsx(_components.code,{children:`encounter_date must match the date of start_time (\u003cdate>).`}),`, and `,_jsx(_components.code,{children:`start_time cannot be in the future.`})]}),`\n`,_jsx(Heading,{level:`4`,id:`user-not-found`,children:`User Not Found`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`4`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`4`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"success\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`false`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"User not found.\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`This indicates an issue with your access token.`}),`\n`,_jsx(Heading,{level:`4`,id:`unsupported-emr`,children:`Unsupported EMR`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`4`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`4`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"success\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`false`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Creating encounters is not supported for [EMR Name].\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`Your EMR system may not currently support encounter creation.`}),`\n`,_jsx(Heading,{level:`3`,id:`webhook-notifications`,children:`Webhook Notifications`}),`\n`,_jsx(_components.p,{children:`When the encounter has finished processing, we send a webhook to your registered endpoint.`}),`\n`,_jsx(Heading,{level:`4`,id:`success`,children:`Success`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`15`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`15`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"\u003cid-of-webhook-response>\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"access_token_reference_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"\u003caccess-token-reference-id>\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"object\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"event\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"created\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2026-08-26T10:30:00.000Z\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"encounter.created\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"data\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"encounter_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"123e4567e89b12d3a456426614174000\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"emr_encounter_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"927341\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"emr_episode_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"88214\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"emr_status\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"COMPLETED\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"approved\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`false`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"patient_mrn\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"1234567\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`The webhook data includes:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`encounter_id`}),`: The Cobalt encounter ID you received in the response.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`emr_encounter_id`}),`: The encounter id in the EMR.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`emr_episode_id`}),`: The episode the encounter was written under.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`emr_status`}),`: The encounter status in the EMR after signing (for example `,_jsx(_components.code,{children:`COMPLETED`}),`). `,_jsx(_components.code,{children:`null`}),` if the status could not be read.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`approved`}),`: Whether the EMR approved the encounter on signing. Some EMR configurations approve an encounter automatically and others leave it unapproved; `,_jsx(_components.code,{children:`false`}),` means it still needs approval: approve it with `,_jsx(_components.a,{href:`/api-reference/encounters/update`,children:_jsx(_components.code,{children:`PATCH /v1/encounters/{id}`})}),`. `,_jsx(_components.code,{children:`null`}),` if the approval state could not be read.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`patient_mrn`}),`: The patient’s medical record number.`]}),`\n`]}),`\n`,_jsx(Heading,{level:`4`,id:`failure`,children:`Failure`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`13`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`13`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"\u003cid-of-webhook-response>\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"access_token_reference_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"\u003caccess-token-reference-id>\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"object\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"event\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"created\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2026-08-26T10:35:00.000Z\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"encounter.failed\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"data\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"encounter_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"123e4567e89b12d3a456426614174000\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"emr_encounter_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`null`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"patient_mrn\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"1234567\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"failure_reason\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Encounter type 'GAD-7' not available for client 1234567 (not in billing matrix)\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Transient problems are retried automatically and do not emit a webhook until they are resolved or the attempts are exhausted. A `,_jsx(_components.code,{children:`encounter.failed`}),` event is sent once, when the failure is permanent. Common `,_jsx(_components.code,{children:`failure_reason`}),` values:`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`Encounter type '\u003ctype>' not available for client \u003cmrn> (not in billing matrix)`}),` — the encounter type is not billable for the client.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`Missing required answers: \u003cquestion ids>`}),` — one or more required form questions were not answered.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`Location '\u003clocation>' is not in the service Location list for client \u003cmrn>.`}),` — the `,_jsx(_components.code,{children:`location`}),` does not match a location id or name in the EMR’s service Location list.`]}),`\n`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Create Encounter","openapi":"POST /encounters","description":"Queues an encounter (an episode visit with form documentation) for creation in the provider's EMR system.","href":"/api-reference/encounters/create"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"How an encounter is created","slug":"how-an-encounter-is-created","depth":3,"children":[]},{"title":"Request Parameters","slug":"request-parameters","depth":3,"children":[]},{"title":"Required Fields","slug":"required-fields","depth":4,"children":[]},{"title":"Optional Fields","slug":"optional-fields","depth":4,"children":[]},{"title":"Example Request","slug":"example-request","depth":3,"children":[]},{"title":"Example Response","slug":"example-response","depth":3,"children":[]},{"title":"Error Responses","slug":"error-responses","depth":3,"children":[]},{"title":"Missing Required Field","slug":"missing-required-field","depth":4,"children":[]},{"title":"Answers Not An Object","slug":"answers-not-an-object","depth":4,"children":[]},{"title":"Invalid Encounter Date","slug":"invalid-encounter-date","depth":4,"children":[]},{"title":"Invalid Service Times","slug":"invalid-service-times","depth":4,"children":[]},{"title":"User Not Found","slug":"user-not-found","depth":4,"children":[]},{"title":"Unsupported EMR","slug":"unsupported-emr","depth":4,"children":[]},{"title":"Webhook Notifications","slug":"webhook-notifications","depth":3,"children":[]},{"title":"Success","slug":"success","depth":4,"children":[]},{"title":"Failure","slug":"failure","depth":4,"children":[]}],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"operationId":"createEncounter","summary":"Create an encounter","description":"Queues an encounter (an episode visit with form documentation) for creation in the provider's EMR system.","tags":["Encounters"],"x-supported-emrs":["Credible","PracticeFusion"],"requestBody":"1c46f29c-2213-4b0f-989b-348abe0749b5","responses":{"200":"41cc1d83-3e77-4d42-9ab3-c0c4142c36bf","400":"586f27b3-1995-4692-b2c4-8e9d2dec3128","401":"3b05b743-947e-4ef4-87ce-002df3398f28","500":"355e86e1-1cc8-4922-937a-31441fbd508b"},"method":"post","type":"path","servers":["e4407ffe-32ea-4551-913c-867ca596e10f"],"security":["c17d9ebf-20e2-4aba-a0b7-cf1ebe195943"],"path":"/encounters","baseUrlOptions":["https://api.usecobalt.com/v1"],"title":"Create an encounter","codeSamples":[],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{},"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["encounter_type"],"properties":{"encounter_type":{"type":"string","x-supported-emrs":["Credible","PracticeFusion"],"description":"Encounter type to add, by name or EMR id (e.g. \"GAD-7\", \"Office Visit\").","example":"GAD-7","x-required-for-emrs":["Credible","PracticeFusion"],"isRequired":true,"uniqueKey":"encounter_type","typeLabel":"string"},"patient_mrn":{"type":"string","x-supported-emrs":["Credible","PracticeFusion"],"description":"Medical Record Number of the patient. With appointment_id it is taken from the appointment and, if sent, must match it.","example":"15539","x-required-for-emrs":["Credible"],"x-required-when":{"PracticeFusion":[{"field":"appointment_id","present":false}]},"uniqueKey":"patient_mrn","typeLabel":"string"},"episode_id":{"type":"string","x-supported-emrs":["Credible"],"description":"Episode (FHIR EpisodeOfCare) the encounter is created under. Pull the exact id from the patient episode payload and pass it here — the encounter attaches to this episode with no fallback. Assign the patient to a team first (a separate step) to open the episode.","example":"32340","x-required-for-emrs":["Credible"],"uniqueKey":"episode_id","typeLabel":"string"},"form_id":{"type":"string","x-supported-emrs":["Credible"],"description":"EMR form id whose answers are provided (from GET /v1/forms). Required when the encounter type documents a form.","example":"392","x-required-for-emrs":["Credible"],"uniqueKey":"form_id","typeLabel":"string"},"answers":{"type":"object","additionalProperties":{"oneOf":[{}],"uniqueKey":"answers.additionalProperties","typeLabel":"any"},"x-supported-emrs":["Credible"],"description":"Form answers keyed by EMR question id (from GET /v1/forms). Value by question format: single choice (radio, push button) and dropdown take the answer value or answer id; check box (multi-select) takes a list of answer values or ids; text box takes a string; date takes YYYY-MM-DD. An open-text narrative question takes the text as a string. To add notes to a choice (e.g. \"Other\"), send { \"value\": \"Other\", \"notes\": \"...\" }. For a scored questionnaire (e.g. GAD-7) provide the numeric score for each scored question; totals and risk bands are derived automatically. A conditional question (shown only after a trigger answer) is accepted only when its trigger answer is also supplied. An answer that does not match the form fails the request.","example":{"427919":{"value":"Other","notes":"School visit"},"427920":"Narrative text for the contact.","467752":"2026-09-24","467761":"Therapy","467762":"Reason for the referral.","467767":["Mornings","Afternoons"]},"x-required-for-emrs":["Credible"],"uniqueKey":"answers","typeLabel":"object"},"encounter_date":{"type":"string","x-supported-emrs":["Credible","PracticeFusion"],"description":"Encounter (service) date (YYYY-MM-DD), in the practice's local time. Cannot be in the future. With appointment_id it is taken from the appointment and, if sent, must match it. Where not required, defaults to today.","example":"2026-08-26","x-required-when":{"PracticeFusion":[{"field":"appointment_id","present":false}]},"uniqueKey":"encounter_date","typeLabel":"string"},"start_time":{"type":"string","format":"date-time","x-supported-emrs":["Credible"],"description":"Service start as an ISO 8601 date-time (e.g. \"2026-10-05T14:00:00-04:00\"). A value without an offset is read in the practice's local time. Sets the service date; when encounter_date is also given it must be the same date. Defaults to the current time.","example":"2026-10-05T14:00:00-04:00","uniqueKey":"start_time","typeLabel":"string\u003cdate-time>"},"end_time":{"type":"string","format":"date-time","x-supported-emrs":["Credible"],"description":"Service end as an ISO 8601 date-time, on the same day as start_time and after it. Defaults to one hour after start_time. Requires start_time.","example":"2026-10-05T15:00:00-04:00","uniqueKey":"end_time","typeLabel":"string\u003cdate-time>"},"location":{"type":"string","x-supported-emrs":["Credible","PracticeFusion"],"description":"Service location, by EMR location id (from GET /v1/locations) or, where the EMR lists locations on its service form, exact name (e.g. \"Broadway Office\"). With appointment_id, defaults to the appointment's location; otherwise defaults to the EMR's default location for the service where not required. An unknown location fails the request.","example":"Broadway Office","x-required-when":{"PracticeFusion":[{"field":"appointment_id","present":false}]},"uniqueKey":"location","typeLabel":"string"},"provider":{"type":"string","x-supported-emrs":["PracticeFusion"],"description":"EMR provider id (from GET /v1/providers) the encounter is seen by. With appointment_id, defaults to the appointment's provider.","example":"b2c3d4e5f6a1478899aabbccddeeff00","x-required-when":{"PracticeFusion":[{"field":"appointment_id","present":false}]},"uniqueKey":"provider","typeLabel":"string"},"appointment_id":{"type":"string","x-supported-emrs":["PracticeFusion"],"description":"Cobalt appointment id to link the new encounter to. The patient, date, location and provider default from the appointment. If the appointment already has an encounter linked, no encounter is created and the encounter.failed webhook carries it as existing_emr_encounter_id. The linked encounter is also returned on the appointment as encounter_ehr_id.","example":"a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4","uniqueKey":"appointment_id","typeLabel":"string"},"callback_urls":{"type":"array","items":{"type":"string","uniqueKey":"callback_urls.items.[INDEX]","typeLabel":"string"},"x-supported-emrs":["Credible","PracticeFusion"],"description":"URLs to receive the completion webhook for this encounter, in addition to the account webhook.","example":["https://example.com/webhooks/cobalt"],"uniqueKey":"callback_urls","typeLabel":"string[]"},"expires_at":{"oneOf":[{"type":"string","format":"date-time","x-supported-emrs":["Credible","PracticeFusion"],"description":"Optional ISO 8601 timestamp with an explicit timezone offset, in the future when submitted. Cobalt starts no new operation attempt after this deadline and reports reasons[].code EXPIRED. An attempt already in progress, including write reconciliation, may finish after it.","example":"2027-06-15T14:30:00Z","uniqueKey":"expires_at.oneOf.0","typeLabel":"string\u003cdate-time>"},{"type":"null","format":"date-time","x-supported-emrs":["Credible","PracticeFusion"],"description":"Optional ISO 8601 timestamp with an explicit timezone offset, in the future when submitted. Cobalt starts no new operation attempt after this deadline and reports reasons[].code EXPIRED. An attempt already in progress, including write reconciliation, may finish after it.","example":"2027-06-15T14:30:00Z","uniqueKey":"expires_at.oneOf.1","typeLabel":"null"}],"uniqueKey":"expires_at","typeLabel":"string\u003cdate-time> | null"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"encounter_type":"GAD-7","patient_mrn":"15539","episode_id":"32340","form_id":"392","answers":{"427919":{"value":"Other","notes":"School visit"},"427920":"Narrative text for the contact.","467752":"2026-09-24","467761":"Therapy","467762":"Reason for the referral.","467767":["Mornings","Afternoons"]},"encounter_date":"2026-08-26","start_time":"2026-10-05T14:00:00-04:00","end_time":"2026-10-05T15:00:00-04:00","location":"Broadway Office","provider":"b2c3d4e5f6a1478899aabbccddeeff00","appointment_id":"a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4","callback_urls":["https://example.com/webhooks/cobalt"],"expires_at":"2027-06-15T14:30:00Z"}}},"exampleType":"generated"}},"exampleType":"generated"},"responses":{"41cc1d83-3e77-4d42-9ab3-c0c4142c36bf":{"description":"Encounter queued for processing","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true,"isRequired":true,"uniqueKey":"success","typeLabel":"boolean"},"message":{"type":"string","example":"Encounter queued for processing","isRequired":true,"uniqueKey":"message","typeLabel":"string"},"encounter_id":{"type":"string","example":"f47ac10b58cc4372a5670e02b2c3d479","isRequired":true,"uniqueKey":"encounter_id","typeLabel":"string"},"job_id":{"type":"integer","example":12345,"isRequired":true,"uniqueKey":"job_id","typeLabel":"integer"}},"required":["success","message","encounter_id","job_id"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"success":true,"message":"Encounter queued for processing","encounter_id":"f47ac10b58cc4372a5670e02b2c3d479","job_id":12345}}},"exampleType":"generated"}},"exampleType":"generated"},"586f27b3-1995-4692-b2c4-8e9d2dec3128":{"description":"Bad request — missing or invalid parameters","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false],"example":false,"isRequired":true,"uniqueKey":"success","typeLabel":"enum\u003cboolean>"},"message":{"type":"string","example":"Request could not be completed.","isRequired":true,"uniqueKey":"message","typeLabel":"string"}},"required":["success","message"],"uniqueKey":"","typeLabel":"object"},"example":{"success":false,"message":"Bad request — missing or invalid parameters"},"examples":{"Example":{"title":"Example","value":{"success":false,"message":"Bad request — missing or invalid parameters"}}},"exampleType":"examples"}},"exampleType":"examples"},"3b05b743-947e-4ef4-87ce-002df3398f28":{"description":"Unauthorized — missing or invalid credentials","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false],"example":false,"isRequired":true,"uniqueKey":"success","typeLabel":"enum\u003cboolean>"},"message":{"type":"string","example":"Request could not be completed.","isRequired":true,"uniqueKey":"message","typeLabel":"string"}},"required":["success","message"],"uniqueKey":"","typeLabel":"object"},"example":{"success":false,"message":"Unauthorized — missing or invalid credentials"},"examples":{"Example":{"title":"Example","value":{"success":false,"message":"Unauthorized — missing or invalid credentials"}}},"exampleType":"examples"}},"exampleType":"examples"},"355e86e1-1cc8-4922-937a-31441fbd508b":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false],"example":false,"isRequired":true,"uniqueKey":"success","typeLabel":"enum\u003cboolean>"},"message":{"type":"string","example":"Request could not be completed.","isRequired":true,"uniqueKey":"message","typeLabel":"string"}},"required":["success","message"],"uniqueKey":"","typeLabel":"object"},"example":{"success":false,"message":"Internal server error"},"examples":{"Example":{"title":"Example","value":{"success":false,"message":"Internal server error"}}},"exampleType":"examples"}},"exampleType":"examples"}},"security":{"c17d9ebf-20e2-4aba-a0b7-cf1ebe195943":{"ClientCredentials":{"type":"apiKey","in":"header","name":"client_id","scopes":[],"schemeName":"ClientCredentials"},"ClientSecret":{"type":"apiKey","in":"header","name":"client_secret","scopes":[],"schemeName":"ClientSecret"},"AccessToken":{"type":"apiKey","in":"header","name":"access_token","scopes":[],"schemeName":"AccessToken"}}},"servers":{"e4407ffe-32ea-4551-913c-867ca596e10f":{"url":"https://api.usecobalt.com/v1","description":"Production"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"apiKey","in":"header","name":"client_id","scopes":[],"schemeName":"ClientCredentials"},"schema":{"title":"client_id","type":"string","isRequired":true,"typeLabel":"string","deprecated":false},"schemeName":"ClientCredentials","name":"client_id"},{"scheme":{"type":"apiKey","in":"header","name":"client_secret","scopes":[],"schemeName":"ClientSecret"},"schema":{"title":"client_secret","type":"string","isRequired":true,"typeLabel":"string","deprecated":false},"schemeName":"ClientSecret","name":"client_secret"},{"scheme":{"type":"apiKey","in":"header","name":"access_token","scopes":[],"schemeName":"AccessToken"},"schema":{"title":"access_token","type":"string","isRequired":true,"typeLabel":"string","deprecated":false},"schemeName":"AccessToken","name":"access_token"}],"title":"ClientCredentials \u0026 ClientSecret \u0026 AccessToken"}]},"originalFileLocation":"api-reference/openapi.json"},"subdomain":"cobalt-cd7844c1","siteName":"Cobalt","title":"Create Encounter - Cobalt","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-11-13T20:46:25.465Z","originalFileLocation":"api-reference/encounters/create.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Queues an encounter (an episode visit with form documentation) for creation in the provider\u0026#x27;s EMR system.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Cobalt\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/cobalt-cd7844c1/dfAt917AjSM3D_ey/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/cobalt-cd7844c1/dfAt917AjSM3D_ey/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/cobalt-cd7844c1/dfAt917AjSM3D_ey/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/cobalt-cd7844c1/dfAt917AjSM3D_ey/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/cobalt-cd7844c1/dfAt917AjSM3D_ey/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/cobalt-cd7844c1/dfAt917AjSM3D_ey/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/cobalt-cd7844c1/dfAt917AjSM3D_ey/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/cobalt-cd7844c1/dfAt917AjSM3D_ey/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/cobalt-cd7844c1/dfAt917AjSM3D_ey/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Create Encounter - Cobalt\">\u003cmeta data-mint-head property=\"og:description\" content=\"Queues an encounter (an episode visit with form documentation) for creation in the provider\u0026#x27;s EMR system.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Cobalt\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.usecobalt.com/api-reference/encounters/create\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://cobalt-cd7844c1.mintlify.site/_mintlify/api/og/v2?division=Encounters\u0026amp;title=Create+Encounter\u0026amp;description=Queues+an+encounter+%28an+episode+visit+with+form+documentation%29+for+creation+in+the+provider%27s+EMR+system.\u0026amp;theme=ffc7333b91b15631759a2f94\u0026amp;signature=f1258f5a748b5e2541467470cec13e17dbdf721d26ebaac93ef43132c18b4181\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Create Encounter - Cobalt\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Queues an encounter (an episode visit with form documentation) for creation in the provider\u0026#x27;s EMR system.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://cobalt-cd7844c1.mintlify.site/_mintlify/api/og/v2?division=Encounters\u0026amp;title=Create+Encounter\u0026amp;description=Queues+an+encounter+%28an+episode+visit+with+form+documentation%29+for+creation+in+the+provider%27s+EMR+system.\u0026amp;theme=ffc7333b91b15631759a2f94\u0026amp;signature=f1258f5a748b5e2541467470cec13e17dbdf721d26ebaac93ef43132c18b4181\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/cobalt-cd7844c1/dfAt917AjSM3D_ey/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Cobalt\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#576dee\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.usecobalt.com/api-reference/encounters/create\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/encounters/create.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.usecobalt.com/#organization\",\"name\":\"Cobalt\",\"url\":\"https://docs.usecobalt.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/cobalt-cd7844c1/ARV8r_xeyMO_zivG/logo/light.svg?fit=max\u0026auto=format\u0026n=ARV8r_xeyMO_zivG\u0026q=85\u0026s=de8566184dd7d19c926d1f0e5ee04d74\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.usecobalt.com#website\",\"name\":\"Cobalt\",\"url\":\"https://docs.usecobalt.com\",\"publisher\":{\"@id\":\"https://docs.usecobalt.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.usecobalt.com/api-reference/encounters/create#webpage\",\"url\":\"https://docs.usecobalt.com/api-reference/encounters/create\",\"name\":\"Create Encounter\",\"description\":\"Queues an encounter (an episode visit with form documentation) for creation in the provider's EMR system.\",\"dateModified\":\"2026-11-13T20:46:25.465Z\",\"isPartOf\":{\"@id\":\"https://docs.usecobalt.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.usecobalt.com/api-reference/encounters/create#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.usecobalt.com/api-reference/encounters/create#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Cobalt\",\"item\":\"https://docs.usecobalt.com\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Create Encounter\",\"item\":\"https://docs.usecobalt.com/api-reference/encounters/create\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.usecobalt.com/api-reference/encounters/create#apireference\",\"headline\":\"Create Encounter\",\"name\":\"Create Encounter\",\"description\":\"Queues an encounter (an episode visit with form documentation) for creation in the provider's EMR system.\",\"url\":\"https://docs.usecobalt.com/api-reference/encounters/create\",\"mainEntityOfPage\":{\"@id\":\"https://docs.usecobalt.com/api-reference/encounters/create#webpage\"},\"dateModified\":\"2026-11-13T20:46:25.465Z\",\"publisher\":{\"@id\":\"https://docs.usecobalt.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.usecobalt.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Cobalt\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Cobalt\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/api-reference/encounters/create.md","siteName":"Cobalt","nav":{"global":null,"tabs":[{"tab":"Guides","pages":[{"title":"Guides","href":"/docs/introduction"}]},{"tab":"API Reference","groups":[{"group":"API Documentation","pages":[{"title":"Introduction","href":"/api-reference/introduction"}]},{"group":"Account","pages":[{"title":"Activate Account","openapi":"POST /account/activate","href":"/api-reference/account/activate"},{"title":"Deactivate Account","openapi":"POST /account/deactivate","href":"/api-reference/account/deactivate"},{"title":"Lock Client","openapi":"POST /client/lock","href":"/api-reference/account/lock"},{"title":"Rotate Access Token","openapi":"POST /access-token/rotate","href":"/api-reference/account/rotate-access-token"},{"title":"Disable Credential","openapi":"PATCH /credentials/{credentialId}/disable","href":"/api-reference/account/disable-credential"},{"title":"Enable Credential","openapi":"PATCH /credentials/{credentialId}/enable","href":"/api-reference/account/enable-credential"},{"title":"Delete Credential","openapi":"DELETE /credentials/{credentialId}","href":"/api-reference/account/delete-credential"},{"title":"Get Last Schedule Sync","openapi":"GET /last-schedule-sync","href":"/api-reference/system/last-schedule-sync"}]},{"group":"Appointments","pages":[{"title":"Create Appointments","openapi":"POST /appointments","href":"/api-reference/appointments/create"},{"title":"Fetch Appointments","openapi":"POST /appointments/fetch","href":"/api-reference/appointments/fetch"},{"title":"Get Appointments","openapi":"GET /appointments","href":"/api-reference/appointments/get"},{"title":"Get Appointment by ID","openapi":"GET /appointments/{id}","href":"/api-reference/appointments/get-by-id"},{"title":"Update Appointment","openapi":"PATCH /appointments/{id}","href":"/api-reference/appointments/update"}]},{"group":"Availability","pages":[{"title":"Fetch Availability","openapi":"POST /availability/fetch","href":"/api-reference/availability/fetch"},{"title":"Get Availability","openapi":"GET /availability","href":"/api-reference/availability/get"}]},{"group":"Claims","pages":[{"title":"Create Claim","openapi":"POST /claims","href":"/api-reference/claims/create"},{"title":"Get Claims","openapi":"GET /claims","href":"/api-reference/claims/get"},{"title":"Get Claim by ID","openapi":"GET /claims/{id}","href":"/api-reference/claims/get-by-id"},{"title":"Fetch Claims","openapi":"POST /claims/fetch","href":"/api-reference/claims/fetch"}]},{"group":"Codes","pages":[{"title":"Add Diagnosis Codes","openapi":"POST /appointments/{appointment_id}/codes","href":"/api-reference/codes/add"},{"title":"Remove Diagnosis Codes","openapi":"DELETE /appointments/{appointment_id}/codes","href":"/api-reference/codes/remove"}]},{"group":"Documents","pages":[{"title":"List Documents","openapi":"GET /documents","href":"/api-reference/documents/list"},{"title":"Fetch Document","openapi":"POST /documents/fetch","href":"/api-reference/documents/fetch"},{"title":"Get Document","openapi":"GET /documents/{id}","href":"/api-reference/documents/get"},{"title":"Upload Document","openapi":"POST /documents","href":"/api-reference/documents/upload"}]},{"group":"Eligibility","pages":[{"title":"Get Eligibility Checks","openapi":"GET /eligibility-checks","href":"/api-reference/eligibility-checks/get"},{"title":"Get Eligibility Benefits","openapi":"GET /eligibility-checks/{id}/benefits","href":"/api-reference/eligibility-checks/benefits"}]},{"group":"Fee Schedules","pages":[{"title":"Get Fee Schedules","openapi":"GET /fee-schedules","href":"/api-reference/fee-schedules/get"},{"title":"Get Fee Schedule Items","openapi":"GET /fee-schedules/{feeScheduleId}/items","href":"/api-reference/fee-schedules/items"}]},{"group":"Forms","pages":[{"title":"List Forms","openapi":"GET /forms","href":"/api-reference/forms/get"},{"title":"Get Form","openapi":"GET /forms/{id}","href":"/api-reference/forms/get-by-id"},{"title":"Sync Forms","openapi":"POST /forms/fetch","href":"/api-reference/forms/fetch"}]},{"group":"Insurance","pages":[{"title":"Get Insurance Providers","openapi":"GET /insurance-providers","href":"/api-reference/insurance-providers/get"}]},{"group":"Link","pages":[{"title":"Create Link Token","openapi":"POST /link/token/create","href":"/api-reference/link/create-token"},{"title":"Exchange Public Token","openapi":"GET /link/token/exchange","href":"/api-reference/link/exchange-token"}]},{"group":"Locations","pages":[{"title":"Get Locations","openapi":"GET /locations","href":"/api-reference/locations/get"},{"title":"Update Location Status","openapi":"PATCH /locations/{id}","href":"/api-reference/locations/update"}]},{"group":"Messages","pages":[{"title":"Send Message","openapi":"POST /messages","href":"/api-reference/messages/create"}]},{"group":"Notes","pages":[{"title":"Create Note","openapi":"POST /notes","href":"/api-reference/notes/create"}]},{"group":"Orders","pages":[{"title":"Search Order Catalog","openapi":"POST /orders/catalog/fetch","href":"/api-reference/orders/catalog"},{"title":"Create Order","openapi":"POST /orders","href":"/api-reference/orders/create"},{"title":"Get Orders","openapi":"GET /orders","href":"/api-reference/orders/get"},{"title":"Get Order","openapi":"GET /orders/{id}","href":"/api-reference/orders/get-by-id"},{"title":"Update Order","openapi":"PATCH /orders/{id}","href":"/api-reference/orders/update"},{"title":"Create Order Results","openapi":"POST /orders/{id}/results","href":"/api-reference/orders/results"}]},{"group":"Org Settings","pages":[{"title":"Fetch Org Settings","openapi":"POST /org-settings/fetch","href":"/api-reference/org-settings/fetch"}]},{"group":"Patient Notes","pages":[{"title":"Create Patient Note","openapi":"POST /patient-notes","href":"/api-reference/patient-notes/create"}]},{"group":"Patients","pages":[{"title":"Create Patient","openapi":"POST /patients","href":"/api-reference/patients/create"},{"title":"Fetch Patients","openapi":"POST /patients/fetch","href":"/api-reference/patients/fetch"},{"title":"Get Patients","openapi":"GET /patients","href":"/api-reference/patients/get"},{"title":"Update Patient","openapi":"PATCH /patients/{id}","href":"/api-reference/patients/update"},{"group":"Insurance","pages":[{"title":"Add Patient Insurance","openapi":"POST /patients/{patient_mrn}/insurances","href":"/api-reference/patients/insurances/add"},{"title":"Update Patient Insurance","openapi":"PATCH /patients/{patient_mrn}/insurances/{emr_insurance_id}","href":"/api-reference/patients/insurances/update"}]}]},{"group":"Payments","pages":[{"title":"Create Payment","openapi":"POST /payments","href":"/api-reference/payments/create"},{"title":"Get Payments","openapi":"GET /payments","href":"/api-reference/payments/get"},{"title":"Get Payment by ID","openapi":"GET /payments/{id}","href":"/api-reference/payments/get-by-id"}]},{"group":"Pharmacies","pages":[{"title":"Get Pharmacies","openapi":"GET /pharmacies","href":"/api-reference/pharmacies/get"}]},{"group":"Providers","pages":[{"title":"Get Providers","openapi":"GET /providers","href":"/api-reference/providers/get"},{"title":"Update Provider","openapi":"PATCH /providers/{id}","href":"/api-reference/providers/update"},{"title":"Update Provider by EMR ID","openapi":"PATCH /providers/ehr/{ehr_id}","href":"/api-reference/providers/update-by-ehr"}]},{"group":"Recalls","pages":[{"title":"Get Recalls","openapi":"GET /recalls","href":"/api-reference/recalls/list"},{"title":"Create Recall","openapi":"POST /recalls","href":"/api-reference/recalls/create"},{"title":"Update Recall","openapi":"PATCH /recalls/{id}","href":"/api-reference/recalls/update"},{"title":"Add Action to Recall","openapi":"POST /recalls/{id}/actions","href":"/api-reference/recalls/create-action"}]},{"group":"Referrals","pages":[{"title":"Create Referral","openapi":"POST /referrals","href":"/api-reference/referrals/create"},{"title":"Get Referrals","openapi":"GET /referrals","href":"/api-reference/referrals/get"},{"title":"Update Referral","openapi":"PATCH /referrals/{id}","href":"/api-reference/referrals/update"}]},{"group":"Referring Providers","pages":[{"title":"Create Referring Provider","openapi":"POST /referring-providers","href":"/api-reference/referring-providers/create"},{"title":"Get Referring Providers","openapi":"GET /referring-providers","description":"Retrieve referring providers from the EMR system for your organization.","href":"/api-reference/referring-providers/get"}]},{"group":"Encounters","pages":[{"title":"Create Encounter","openapi":"POST /encounters","href":"/api-reference/encounters/create"},{"title":"Update Encounter","openapi":"PATCH /encounters/{id}","description":"Approves an existing encounter in the provider's EMR system.","href":"/api-reference/encounters/update"}]},{"group":"Settings","pages":[{"title":"Get Settings","openapi":"GET /settings","href":"/api-reference/settings/get"},{"title":"Update Settings","openapi":"POST /settings","href":"/api-reference/settings/update"}]},{"group":"Staff","pages":[{"title":"Get Staff","openapi":"GET /staff","href":"/api-reference/staff/get"}]},{"group":"Tasks","pages":[{"title":"Create Task","openapi":"POST /tasks","href":"/api-reference/tasks/create"},{"title":"Create Task Note","openapi":"POST /tasks/notes","href":"/api-reference/tasks/notes/create"}]},{"group":"Telephone Encounters","pages":[{"title":"List Telephone Encounters","openapi":"GET /telephone-encounters","href":"/api-reference/telephone-encounters/list"},{"title":"Create Telephone Encounter","openapi":"POST /telephone-encounters","href":"/api-reference/telephone-encounters/create"},{"title":"Add Action to Telephone Encounter","openapi":"POST /telephone-encounters/actions","href":"/api-reference/telephone-encounters/create-action"}]},{"group":"Visit Statuses","pages":[{"title":"Get Visit Statuses","openapi":"GET /visit-statuses","href":"/api-reference/visit-statuses/get"}]},{"group":"Visit Types","pages":[{"title":"Get Visit Types","openapi":"GET /visit-types","href":"/api-reference/visit-types/get"}]},{"group":"Webhooks","pages":[{"title":"Create Webhook","openapi":"POST /webhook","href":"/api-reference/webhooks/create"},{"title":"Delete Webhook","openapi":"DELETE /webhook/{id}","href":"/api-reference/webhooks/delete"},{"title":"Get Webhooks","openapi":"GET /webhook","href":"/api-reference/webhooks/get"},{"title":"Rotate Webhook Secret","openapi":"POST /webhook/rotate-secret","href":"/api-reference/webhooks/rotate-secret"},{"title":"Send Test Webhook","openapi":"POST /webhook/test","href":"/api-reference/webhooks/send-test-webhook"},{"title":"Get Webhook Events","openapi":"GET /webhook-events","href":"/api-reference/webhook-events/get"},{"title":"Get Webhook Event","openapi":"GET /webhook-events/{id}","href":"/api-reference/webhook-events/get-by-id"}]}]}]},"basePath":"","title":"Create Encounter - Cobalt","buildId":"dpl_Fyv1NbzwP68g2bEH2Roy98uY1zmE","deploymentId":"dpl_Fyv1NbzwP68g2bEH2Roy98uY1zmE","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-DdEMm2kG.js","utils-BMo572L7.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-C-4m9KAx.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-DPLK2Oq9.js","snippetPresets-BKjfJMC9.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","conditional-requirements-CFM0id0Q.js","ApiExamples-DTsgtCEj.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-C8vmhyQM.js","shallow-r9w8LQGS.js","getApiPlaygroundDisplay-DjPI64HQ.js","CodeSnippet-C8Bvhl16.js","CodeSnippets-BtWUwcMy.js","Page-BIYvYBgk.js","getPastedJson-Dcm_3Pgl.js","icon-BXwrTpjc.js","MethodPill-CcjfVmmy.js","DuplicateIcon-BuKIbXAQ.js","createIcon-DaL9yXsO.js","DynamicMarkdown-Co5nikxh.js","SectionHeading-P4UNTsMZ.js","axios-vUo_bRtp.js","Markdown-CEfymfIH.js","clsx-Dq9TQuNi.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-D2J8knkn.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink-BgZ2ThuU.js"]}