curl --request POST \
--url https://api.brelio.app/v1/appointments \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"patientId": "9e2d4c6b-1a3f-4b5d-8c7e-6f5a4b3c2d1e",
"professionalId": "2c4e6a8b-0d1f-4a3c-9e5b-7d9f1b3d5f7a",
"serviceId": "4d6f8b0c-2e4a-4c6e-8a0c-2e4a6c8e0a2c",
"start": "2026-11-11T09:00:00Z"
}
'const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
patientId: '9e2d4c6b-1a3f-4b5d-8c7e-6f5a4b3c2d1e',
professionalId: '2c4e6a8b-0d1f-4a3c-9e5b-7d9f1b3d5f7a',
serviceId: '4d6f8b0c-2e4a-4c6e-8a0c-2e4a6c8e0a2c',
start: '2026-11-11T09:00:00Z'
})
};
fetch('https://api.brelio.app/v1/appointments', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.brelio.app/v1/appointments"
payload = {
"patientId": "9e2d4c6b-1a3f-4b5d-8c7e-6f5a4b3c2d1e",
"professionalId": "2c4e6a8b-0d1f-4a3c-9e5b-7d9f1b3d5f7a",
"serviceId": "4d6f8b0c-2e4a-4c6e-8a0c-2e4a6c8e0a2c",
"start": "2026-11-11T09:00:00Z"
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": "<string>",
"seriesId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"start": "2023-11-07T05:31:56Z",
"end": "2023-11-07T05:31:56Z",
"durationMinutes": 0,
"status": "scheduled",
"professionalId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"serviceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"patientId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"centerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"recurring": true,
"version": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"detail": "<string>",
"request_id": "<string>",
"params": {},
"hint": "<string>",
"retryAfterSeconds": 123
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"detail": "<string>",
"request_id": "<string>",
"params": {},
"hint": "<string>",
"retryAfterSeconds": 123
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"detail": "<string>",
"request_id": "<string>",
"params": {},
"hint": "<string>",
"retryAfterSeconds": 123
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"detail": "<string>",
"request_id": "<string>",
"params": {},
"hint": "<string>",
"retryAfterSeconds": 123
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"detail": "<string>",
"request_id": "<string>",
"params": {},
"hint": "<string>",
"retryAfterSeconds": 123
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"detail": "<string>",
"request_id": "<string>",
"params": {},
"hint": "<string>",
"retryAfterSeconds": 123
}Create appointment
Books a patient with a professional for a service, with the same rules as Brelio’s agenda.
When to use it: After choosing a time with availability.search. If the time is no longer free the answer is 409: search again.
curl --request POST \
--url https://api.brelio.app/v1/appointments \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"patientId": "9e2d4c6b-1a3f-4b5d-8c7e-6f5a4b3c2d1e",
"professionalId": "2c4e6a8b-0d1f-4a3c-9e5b-7d9f1b3d5f7a",
"serviceId": "4d6f8b0c-2e4a-4c6e-8a0c-2e4a6c8e0a2c",
"start": "2026-11-11T09:00:00Z"
}
'const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
patientId: '9e2d4c6b-1a3f-4b5d-8c7e-6f5a4b3c2d1e',
professionalId: '2c4e6a8b-0d1f-4a3c-9e5b-7d9f1b3d5f7a',
serviceId: '4d6f8b0c-2e4a-4c6e-8a0c-2e4a6c8e0a2c',
start: '2026-11-11T09:00:00Z'
})
};
fetch('https://api.brelio.app/v1/appointments', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.brelio.app/v1/appointments"
payload = {
"patientId": "9e2d4c6b-1a3f-4b5d-8c7e-6f5a4b3c2d1e",
"professionalId": "2c4e6a8b-0d1f-4a3c-9e5b-7d9f1b3d5f7a",
"serviceId": "4d6f8b0c-2e4a-4c6e-8a0c-2e4a6c8e0a2c",
"start": "2026-11-11T09:00:00Z"
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": "<string>",
"seriesId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"start": "2023-11-07T05:31:56Z",
"end": "2023-11-07T05:31:56Z",
"durationMinutes": 0,
"status": "scheduled",
"professionalId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"serviceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"patientId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"centerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"recurring": true,
"version": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"detail": "<string>",
"request_id": "<string>",
"params": {},
"hint": "<string>",
"retryAfterSeconds": 123
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"detail": "<string>",
"request_id": "<string>",
"params": {},
"hint": "<string>",
"retryAfterSeconds": 123
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"detail": "<string>",
"request_id": "<string>",
"params": {},
"hint": "<string>",
"retryAfterSeconds": 123
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"detail": "<string>",
"request_id": "<string>",
"params": {},
"hint": "<string>",
"retryAfterSeconds": 123
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"detail": "<string>",
"request_id": "<string>",
"params": {},
"hint": "<string>",
"retryAfterSeconds": 123
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"detail": "<string>",
"request_id": "<string>",
"params": {},
"hint": "<string>",
"retryAfterSeconds": 123
}Authorizations
Brelio API key (organization or user) or a WorkOS access token.
Headers
Unique per command; reuse it only to retry the same call.
8 - 255Body
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$When it starts, ISO 8601. Take it from availability.search.
^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$Defaults to the service’s duration.
5 <= x <= 480Required when the organization has more than one center.
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$Response
Success
The occurrence id, as agenda.list returns it.
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$ISO 8601, UTC.
^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ISO 8601, UTC.
^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$-9007199254740991 <= x <= 9007199254740991scheduled, checked_in, in_progress, needs_review, completed, cancelled, no_show, voided ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$The patient; null when the caller may not see patient data.
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$Part of a recurring series; such appointments cannot be changed through the API yet.
Opaque version token. Send it back as expectedVersion to change this appointment; do not parse it.
ISO 8601, UTC.
^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$ISO 8601, UTC.
^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$