Skip to main content
POST
Fetch Org Settings
Cobalt automatically syncs org settings nightly for every organization. You do not need to call this endpoint on a schedule — the nightly sync already keeps providers, locations, visit types, and the rest of your org settings up to date. Use this endpoint sparingly, only when you need a refresh sooner than the next nightly run (for example, right after adding a new provider or location in your EMR and wanting it reflected immediately).
This is an asynchronous operation. It returns immediately with a job_execution_id and delivers an org_settings.synced webhook when the sync finishes. To read the synced values, use the corresponding read endpoints such as Get Providers, Get Locations, Get Visit Types, Get Visit Statuses, and Get Settings.

What Gets Synced

A single sync refreshes the full set of organization settings from the EMR:
  • Providers
  • Locations
  • Visit types
  • Visit statuses
  • Insurance companies
  • Pharmacies
  • Referring providers
  • Timezone
  • Required patient fields

Concurrency

Only one org settings sync can be in flight per linked account at a time. If a sync is already running when you call this endpoint, the request returns 409 with the job_execution_id of the in-flight sync so you can wait for it to finish rather than queuing a duplicate.

Example Request

Routing the completion webhook

The completion webhook is delivered to your account’s registered webhook URLs by default. To route this specific sync’s org_settings.synced event elsewhere, include a callback_urls array (see Webhook setup). Each URL must use HTTPS.

Example Response

Webhook Notification

When the sync completes, Cobalt sends an org_settings.synced webhook to your registered endpoint (or to callback_urls if you supplied them). The payload is intentionally minimal — it signals completion and reports counts of what changed. Re-fetch the synced values from the read endpoints listed above.
You must be subscribed to the org_settings.synced event for the webhook to be delivered. See Webhook setup to manage your subscriptions.

Authorizations

client_id
string
header
required
client_secret
string
header
required
access_token
string
header
required

Body

application/json
callback_urls
string<uri>[]

Optional. One or more HTTPS URLs to receive the org_settings.synced completion webhook for this request instead of your account's registered webhook URLs. Accepts a single string or an array of strings. Each URL must use HTTPS.

Response

Sync accepted and queued for processing

success
boolean
Example:

true

status
string
Example:

"queued"

message
string
Example:

"Org settings sync started. An org_settings.synced webhook will be sent when it completes."

job_execution_id
string

Identifier for the queued sync job.