Update Organization Metadata
curl --request PUT \
--url https://allomia.com/api/organization/{id}/metadata \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '{
"metadata": {}
}'import requests
url = "https://allomia.com/api/organization/{id}/metadata"
payload = { "metadata": {} }
headers = {
"Authorization": "<authorization>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: '<authorization>', 'Content-Type': 'application/json'},
body: JSON.stringify({metadata: {}})
};
fetch('https://allomia.com/api/organization/{id}/metadata', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://allomia.com/api/organization/{id}/metadata",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'metadata' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://allomia.com/api/organization/{id}/metadata"
payload := strings.NewReader("{\n \"metadata\": {}\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "<authorization>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://allomia.com/api/organization/{id}/metadata")
.header("Authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"metadata\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://allomia.com/api/organization/{id}/metadata")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = '<authorization>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"metadata\": {}\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"organizationId": "<string>",
"version": 123,
"metadata": {},
"createdAt": "<string>",
"createdBy": "<string>"
}Organizations (Tenant Only)
Update Organization Metadata
Updates the organization metadata
PUT
/
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": {}
}'import requests
url = "https://allomia.com/api/organization/{id}/metadata"
payload = { "metadata": {} }
headers = {
"Authorization": "<authorization>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: '<authorization>', 'Content-Type': 'application/json'},
body: JSON.stringify({metadata: {}})
};
fetch('https://allomia.com/api/organization/{id}/metadata', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://allomia.com/api/organization/{id}/metadata",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'metadata' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://allomia.com/api/organization/{id}/metadata"
payload := strings.NewReader("{\n \"metadata\": {}\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "<authorization>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://allomia.com/api/organization/{id}/metadata")
.header("Authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"metadata\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://allomia.com/api/organization/{id}/metadata")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = '<authorization>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"metadata\": {}\n}"
response = http.request(request)
puts response.read_body{
"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
string
required
API key is required. Enter your tenant-specific API key in the format ‘Bearer
YOUR-API-KEY’
Path Parameters
string
required
The unique identifier of the organization
Body Parameters
object
required
The metadata object that should match the schema stored in
organizationMetadata
Response
string
The unique identifier for the metadata record
string
The organization ID that this metadata belongs to
integer
The version number of the metadata record
object
The metadata object containing the custom data
string
The timestamp when the metadata was created (ISO 8601 format:
“2025-06-01T14:23:45Z”)
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
400: Invalid metadata - Schema validation failed
400: Invalid metadata - Schema validation failed
{
"error": "Schema validation failed: missing required field 'specialties'"
}
401: Unauthorized
401: Unauthorized
{
"error": "Invalid or missing API key"
}
404: Organization metadata not found
404: Organization metadata not found
{
"error": "Organization metadata not found for the provided ID"
}
500: Error
500: Error
{
"error": "Internal server error occurred"
}