Skip to main content
PUT
https://allomia.com
/
api
/
organization
/
{id}
/
metadata
Update Organization Metadata
curl --request PUT \
  --url https://allomia.com/api/organization/{id}/metadata \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: application/json' \
  --data '{
  "metadata": {}
}'
{
  "id": "<string>",
  "organizationId": "<string>",
  "version": 123,
  "metadata": {},
  "createdAt": "<string>",
  "createdBy": "<string>"
}

Update Organization Metadata

Updates the organization metadata and validates it against the stored schema. This endpoint requires a valid tenant API key for authentication.

Headers

Authorization
string
required
API key is required. Enter your tenant-specific API key in the format ‘Bearer YOUR-API-KEY’

Path Parameters

id
string
required
The unique identifier of the organization

Body Parameters

metadata
object
required
The metadata object that should match the schema stored in organizationMetadata

Response

id
string
The unique identifier for the metadata record
organizationId
string
The organization ID that this metadata belongs to
version
integer
The version number of the metadata record
metadata
object
The metadata object containing the custom data
createdAt
string
The timestamp when the metadata was created (ISO 8601 format: “2025-06-01T14:23:45Z”)
createdBy
string
The ID of the user who created the metadata

Example Request

curl -X PUT https://allomia.com/api/organization/a1b2c3d4-e5f6-7890-abcd-123456789012/metadata \
  -H "Authorization: Bearer YOUR-API-KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "metadata": {
      "specialties": ["cardiology", "neurology"],
      "emrSystem": "Epic",
      "operatingHours": {
        "monday": "9:00-17:00",
        "tuesday": "9:00-17:00",
        "wednesday": "9:00-17:00",
        "thursday": "9:00-17:00",
        "friday": "9:00-17:00"
      },
      "services": {
        "telehealth": true,
        "inPersonVisits": true,
        "emergencyCare": false
      }
    }
  }'

Example Response

{
  "id": "c3d4e5f6-a7b8-9012-cdef-345678901234",
  "organizationId": "a1b2c3d4-e5f6-7890-abcd-123456789012",
  "version": 1,
  "metadata": {
    "specialties": ["cardiology", "neurology"],
    "emrSystem": "Epic",
    "operatingHours": {
      "monday": "9:00-17:00",
      "tuesday": "9:00-17:00",
      "wednesday": "9:00-17:00",
      "thursday": "9:00-17:00",
      "friday": "9:00-17:00"
    },
    "services": {
      "telehealth": true,
      "inPersonVisits": true,
      "emergencyCare": false
    }
  },
  "createdAt": "2025-06-01T14:23:45Z",
  "createdBy": "b2c3d4e5-f6a7-8901-bcde-234567890123"
}

Error Responses

{
  "error": "Schema validation failed: missing required field 'specialties'"
}
{
  "error": "Invalid or missing API key"
}
{
  "error": "Organization metadata not found for the provided ID"
}
{
  "error": "Internal server error occurred"
}