Skip to main content
PUT
Replaces a clinic’s metadata with the object you send. Use it to keep AlloMia in step with the clinic’s information in your system. Requires a partner key whose creator is the partner account owner or a Tenant Admin. See Authentication.

Before you start

This endpoint only works for a clinic that has a metadata record. A clinic has one when both of these are true:
  1. AlloMia has set up an integration, with its JSON Schema, for your partner account. Ask AlloMia to set it up and to share the schema with you.
  2. The clinic was created with an externalId, through Create organization or with the External ID field in the dashboard.
For any other clinic, the endpoint returns 404. See Metadata.

What happens on each call

  1. AlloMia checks that metadata is a JSON object.
  2. It checks the object against your integration’s JSON Schema and reports every rule it breaks.
  3. If the object is valid, it replaces the clinic’s metadata (it doesn’t merge with the old object), adds 1 to version, and marks the sync as successful.
  4. It then refreshes the context of each of the clinic’s active agents.
If the body isn’t valid JSON, or the object breaks the schema, AlloMia marks the clinic’s sync as failed and emails your partner account’s email address (the one saved in Tenant Settings, on the Tenant Information tab).

Headers

string
required
Bearer followed by your partner key, for example Bearer sk-….
string
required
application/json

Path parameters

string
required
The clinic’s organization ID. See Finding IDs.

Body

object
required
The clinic’s complete metadata, as a JSON object (not an array or a string). It must match your integration’s JSON Schema. Send every field you want to keep: fields you leave out are removed.

Response

Returns 200 with the clinic’s metadata record.
string
ID of the metadata record.
string
The clinic’s organization ID.
integer
The metadata version. It goes up by 1 on each successful update.
object
The metadata you sent, as stored.
string
When the metadata record was first created (with the clinic), ISO 8601 in UTC. It doesn’t change on updates.
string
ID of the person who created the metadata record.

Errors

In details for a schema error, instancePath points to the field (empty for the top level), keyword names the rule, params gives specifics such as missingProperty, and message explains it. See Errors for the full list.