{"openapi":"3.1.0","info":{"title":"Ordinus REST API","version":"1.0.0","description":"Programmable scheduling + routing infrastructure. Authenticate with an\nAPI key (starts with `cb_`) obtained from the dashboard's developer\npage. Send it as `Authorization: Bearer cb_…`.\n\nRate limit: 100 requests/minute per API key. Exceeding returns 429 with\na `Retry-After` header (seconds). `X-RateLimit-Limit` is also sent on\nauthenticated requests that pass the per-key limit; `X-RateLimit-Reset`\naccompanies per-key 429 responses. Plan rate limits, monthly quotas and\nstricter per-operation limits can also return 429.\n\nAPI access depends on the billing owner's API entitlement and request quota,\nnot a plan name. API keys carry user, billing-owner and optional workspace\nauthority; requests cannot access another workspace's resources. Create\noperations for workspace resources require a workspace-scoped key.\n\nNative API errors have an `error` string or an `error` object with `code`\nand `message`; validation errors can include `details`. Inspect HTTP status\nbefore reading the response body.\n\nWebhook deliveries are signed: the `X-Webhook-Signature` header has the\nform `t=<unix_ts>,v1=<hex hmac_sha256(ts + \".\" + raw_body)>` computed\nwith the endpoint's `whsec_` secret. Reject signatures older than 5\nminutes.\n\nPermission scopes are stored on each API key. A key with scope `[\"*\"]`\ncan call anything. Otherwise the required scope per endpoint must be\npresent (e.g. `appointments:read`, `contacts:write`).\n"},"servers":[{"url":"https://api.ordinus.io","description":"This server"}],"security":[{"bearerAuth":[]}],"tags":[{"name":"Calendly-compatible","description":"Drop-in endpoints that mirror the Calendly API v2 response shapes, so tools built for Calendly work against Ordinus with minimal changes. Identifiers are Ordinus cuids (full uri values and bare ids both work). Read access plus webhook subscriptions only; use the native endpoints for full read/write."}],"paths":{"/api/v1/me":{"get":{"summary":"Current API key owner","tags":["User"],"responses":{"200":{"description":"User profile","content":{"application/json":{"schema":{"type":"object","properties":{"user":{"$ref":"#/components/schemas/User"}}}}}}}}},"/api/v1/availability":{"get":{"summary":"Available booking slots","tags":["Appointments"],"x-required-scope":"appointments:read","parameters":[{"name":"start","in":"query","schema":{"type":"string","format":"date-time"}},{"name":"end","in":"query","schema":{"type":"string","format":"date-time"}},{"name":"appointmentTypeId","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"List of slots"}}}},"/api/v1/appointments":{"get":{"summary":"List appointments","tags":["Appointments"],"x-required-scope":"appointments:read","parameters":[{"name":"status","in":"query","schema":{"type":"string"}},{"name":"start","in":"query","schema":{"type":"string","format":"date-time"}},{"name":"end","in":"query","schema":{"type":"string","format":"date-time"}},{"name":"limit","in":"query","schema":{"type":"integer","default":50,"maximum":100}},{"name":"offset","in":"query","schema":{"type":"integer","default":0}},{"name":"cursor","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"Appointments"}}},"post":{"summary":"Create an appointment","tags":["Appointments"],"x-required-scope":"appointments:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["startDateTime","clientEmail","clientName"],"properties":{"appointmentTypeId":{"type":"string","description":"Optional event type ID. Omit to use the existing default booking behavior."},"startDateTime":{"type":"string","format":"date-time"},"clientEmail":{"type":"string","format":"email"},"clientName":{"type":"string"},"clientNote":{"type":"string"}}}}}},"responses":{"201":{"description":"Created"},"429":{"description":"Rate limited"}}}},"/api/v1/appointments/{id}":{"get":{"summary":"Get an appointment","tags":["Appointments"],"x-required-scope":"appointments:read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Appointment"},"404":{"description":"Not found"}}},"patch":{"summary":"Update an appointment","tags":["Appointments"],"x-required-scope":"appointments:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"clientName":{"type":"string"},"clientEmail":{"type":"string","format":"email"},"clientNote":{"type":"string"},"startDateTime":{"type":"string","format":"date-time"},"endDateTime":{"type":"string","format":"date-time"},"status":{"type":"string","enum":["PENDING_VERIFICATION","PENDING_PAYMENT","SCHEDULED","COMPLETED","CANCELED","NO_SHOW"]}}}}}},"responses":{"200":{"description":"Updated"},"404":{"description":"Not found"}}},"delete":{"summary":"Cancel an appointment (sets status CANCELED)","tags":["Appointments"],"x-required-scope":"appointments:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Canceled","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}}}}}}}}},"/api/v1/appointments/{id}/cancel":{"post":{"summary":"Cancel an appointment (full pipeline incl. notifications)","tags":["Appointments"],"x-required-scope":"appointments:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","maxLength":500}}}}}},"responses":{"200":{"description":"Canceled"},"404":{"description":"Not found"},"409":{"description":"Not cancellable in current state"}}}},"/api/v1/appointment-types":{"get":{"deprecated":true,"summary":"List appointment types (alias of event types)","tags":["Event Types"],"x-required-scope":"appointments:read","parameters":[{"name":"take","in":"query","schema":{"type":"integer","default":50,"maximum":100}},{"name":"cursor","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"Appointment types ({ appointmentTypes, nextCursor })"}}}},"/api/v1/event-types":{"get":{"summary":"List event types","tags":["Event Types"],"x-required-scope":"event-types:read","parameters":[{"name":"take","in":"query","schema":{"type":"integer","default":50,"maximum":100}},{"name":"cursor","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"Event types ({ eventTypes, nextCursor })"}}},"post":{"summary":"Create a personal single-host event type","tags":["Event Types"],"x-required-scope":"event-types:write","description":"Requires a workspace-scoped API key.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventTypeCreate"}}}},"responses":{"201":{"description":"Created ({ eventType })"},"400":{"description":"Invalid payload or workspace context"},"409":{"description":"Slug already exists"}}}},"/api/v1/event-types/{id}":{"get":{"summary":"Get an event type","tags":["Event Types"],"x-required-scope":"event-types:read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Event type"},"404":{"description":"Not found"}}},"patch":{"summary":"Update an event type","tags":["Event Types"],"x-required-scope":"event-types:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventTypePatch"}}}},"responses":{"200":{"description":"Updated ({ eventType })"},"400":{"description":"Invalid payload or workspace context"},"404":{"description":"Not found within the API key scope"}}},"delete":{"summary":"Delete an event type","tags":["Event Types"],"x-required-scope":"event-types:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Deleted (no response body)"},"404":{"description":"Not found within the API key scope"}}}},"/api/v1/routing-forms":{"get":{"summary":"List routing forms","tags":["Routing"],"x-required-scope":"routing:read","x-alternative-scopes":["routing:read","routing-forms:read"],"parameters":[{"name":"take","in":"query","schema":{"type":"integer","minimum":1,"default":50,"maximum":100}},{"name":"cursor","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"{ routingForms, nextCursor }"}}},"post":{"summary":"Create a routing form","tags":["Routing"],"x-required-scope":"routing:write","x-alternative-scopes":["routing:write","routing-forms:write"],"description":"Requires a workspace-scoped API key.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoutingFormCreate"}}}},"responses":{"201":{"description":"Created ({ routingForm })"},"400":{"description":"Invalid payload or workspace context"},"409":{"description":"Slug already exists"}}}},"/api/v1/routing-forms/{id}":{"get":{"summary":"Get a routing form (with questions + rules)","tags":["Routing"],"x-required-scope":"routing:read","x-alternative-scopes":["routing:read","routing-forms:read"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Form"}}},"patch":{"summary":"Update a routing form","tags":["Routing"],"x-required-scope":"routing:write","x-alternative-scopes":["routing:write","routing-forms:write"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoutingFormPatch"}}}},"responses":{"200":{"description":"Updated ({ routingForm }); at least one field is required"},"400":{"description":"Invalid payload or workspace context"},"404":{"description":"Not found within the API key scope"}}},"delete":{"summary":"Delete a routing form","tags":["Routing"],"x-required-scope":"routing:write","x-alternative-scopes":["routing:write","routing-forms:write"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Deleted ({ success })"},"404":{"description":"Not found within the API key scope"}}}},"/api/v1/routing-forms/{id}/submit":{"post":{"summary":"Submit answers and resolve routing","tags":["Routing"],"x-required-scope":"routing:write","x-alternative-scopes":["routing:write","routing-forms:write"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoutingSubmission"}}}},"responses":{"200":{"description":"Routing result ({ data })"},"400":{"description":"Invalid payload or workspace context"},"403":{"description":"Submission is not allowed"},"404":{"description":"Not found within the API key scope"},"429":{"description":"Rate limited (at most 60 submissions per minute)"}}}},"/api/v1/pools":{"get":{"summary":"List assignment pools","tags":["Pools"],"x-required-scope":"pools:read","parameters":[{"name":"take","in":"query","schema":{"type":"integer","minimum":1,"default":50,"maximum":100}},{"name":"cursor","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"{ pools, nextCursor }"}}},"post":{"summary":"Create an assignment pool","tags":["Pools"],"x-required-scope":"pools:write","description":"Requires a workspace-scoped API key.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PoolCreate"}}}},"responses":{"201":{"description":"Created ({ pool })"},"400":{"description":"Invalid payload or workspace context"}}}},"/api/v1/pools/{id}":{"get":{"summary":"Get a pool with members","tags":["Pools"],"x-required-scope":"pools:read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Pool"}}},"patch":{"summary":"Update an assignment pool","tags":["Pools"],"x-required-scope":"pools:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PoolPatch"}}}},"responses":{"200":{"description":"Updated ({ pool }); at least one field is required"},"400":{"description":"Invalid payload or workspace context"},"404":{"description":"Not found within the API key scope"}}},"delete":{"summary":"Delete an assignment pool","tags":["Pools"],"x-required-scope":"pools:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Deleted ({ success })"},"404":{"description":"Not found within the API key scope"}}}},"/api/v1/contacts":{"get":{"summary":"List contacts","tags":["Contacts"],"x-required-scope":"contacts:read","parameters":[{"name":"email","in":"query","schema":{"type":"string","format":"email"}},{"name":"limit","in":"query","schema":{"type":"integer","default":25,"maximum":100}},{"name":"cursor","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"Contacts"}}},"post":{"summary":"Upsert a contact (by email)","tags":["Contacts"],"x-required-scope":"contacts:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["email"],"properties":{"email":{"type":"string","format":"email"},"name":{"type":"string"},"phone":{"type":"string"},"timezone":{"type":"string"},"notes":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}}}}}}},"responses":{"200":{"description":"Upserted"}}}},"/api/v1/contacts/{id}":{"get":{"summary":"Get a contact","tags":["Contacts"],"x-required-scope":"contacts:read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Contact"}}},"patch":{"summary":"Update a contact","tags":["Contacts"],"x-required-scope":"contacts:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Updated"}}}},"/api/v1/workflows":{"get":{"summary":"List workflows","tags":["Workflows"],"x-required-scope":"workflows:read","parameters":[{"name":"take","in":"query","schema":{"type":"integer","minimum":1,"default":50,"maximum":100}},{"name":"cursor","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"{ workflows, nextCursor }"}}},"post":{"summary":"Create a workflow","tags":["Workflows"],"x-required-scope":"workflows:write","description":"Requires a workspace-scoped API key.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowCreate"}}}},"responses":{"201":{"description":"Created ({ workflow })"},"400":{"description":"Invalid payload or workspace context"},"404":{"description":"Event type not found within the API key scope"}}}},"/api/v1/workflows/{id}":{"get":{"summary":"Get a workflow (with actions)","tags":["Workflows"],"x-required-scope":"workflows:read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Workflow"}}},"patch":{"summary":"Update workflow details or activation","tags":["Workflows"],"x-required-scope":"workflows:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowPatch"}}}},"responses":{"200":{"description":"Updated ({ workflow })"},"400":{"description":"Invalid payload or workspace context"},"404":{"description":"Not found within the API key scope"}}}},"/api/v1/webhooks":{"get":{"summary":"List webhook endpoints","tags":["Webhooks"],"x-required-scope":"webhooks:read","parameters":[{"name":"take","in":"query","schema":{"type":"integer","default":50,"maximum":100}},{"name":"cursor","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"Webhooks ({ webhooks, nextCursor })"}}},"post":{"summary":"Create a webhook endpoint (secret returned once)","tags":["Webhooks"],"x-required-scope":"webhooks:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["url","events"],"properties":{"url":{"type":"string","format":"uri","description":"Public http(s) URL. Private/reserved addresses are rejected."},"events":{"type":"array","items":{"$ref":"#/components/schemas/WebhookEvent"}}}}}}},"responses":{"201":{"description":"Created (includes one-time `secret`)"},"400":{"description":"Invalid payload","blocked URL":null,"or limit reached":null}}}},"/api/v1/webhooks/{id}":{"patch":{"summary":"Update a webhook endpoint","tags":["Webhooks"],"x-required-scope":"webhooks:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"events":{"type":"array","items":{"$ref":"#/components/schemas/WebhookEvent"}},"isActive":{"type":"boolean"}}}}}},"responses":{"200":{"description":"Updated"},"404":{"description":"Not found"}}},"delete":{"summary":"Delete a webhook endpoint","tags":["Webhooks"],"x-required-scope":"webhooks:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Deleted"}}}},"/api/v1/users/me":{"get":{"tags":["Calendly-compatible"],"summary":"Calendly: get the authenticated user","responses":{"200":{"description":"The current user resource"}}}},"/api/v1/event_types":{"get":{"tags":["Calendly-compatible"],"summary":"Calendly: list event types","parameters":[{"name":"user","in":"query","schema":{"type":"string"}},{"name":"organization","in":"query","schema":{"type":"string"}},{"name":"active","in":"query","schema":{"type":"string","enum":["true","false"]}},{"name":"count","in":"query","schema":{"type":"integer"}},{"name":"page_token","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"A page of event types"}}}},"/api/v1/event_types/{uuid}":{"get":{"tags":["Calendly-compatible"],"summary":"Calendly: get an event type","parameters":[{"name":"uuid","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The event type resource"},"404":{"description":"Not found"}}}},"/api/v1/scheduled_events":{"get":{"tags":["Calendly-compatible"],"summary":"Calendly: list scheduled events","parameters":[{"name":"user","in":"query","schema":{"type":"string"}},{"name":"organization","in":"query","schema":{"type":"string"}},{"name":"min_start_time","in":"query","schema":{"type":"string","format":"date-time"}},{"name":"max_start_time","in":"query","schema":{"type":"string","format":"date-time"}},{"name":"status","in":"query","schema":{"type":"string","enum":["active","canceled"]}},{"name":"sort","in":"query","schema":{"type":"string","enum":["start_time:asc","start_time:desc"]}},{"name":"count","in":"query","schema":{"type":"integer"}},{"name":"page_token","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"A page of scheduled events"}}}},"/api/v1/scheduled_events/{uuid}":{"get":{"tags":["Calendly-compatible"],"summary":"Calendly: get a scheduled event","parameters":[{"name":"uuid","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The scheduled event resource"},"404":{"description":"Not found"}}}},"/api/v1/scheduled_events/{uuid}/invitees":{"get":{"tags":["Calendly-compatible"],"summary":"Calendly: list invitees for a scheduled event","parameters":[{"name":"uuid","in":"path","required":true,"schema":{"type":"string"}},{"name":"email","in":"query","schema":{"type":"string"}},{"name":"status","in":"query","schema":{"type":"string","enum":["active","canceled"]}},{"name":"count","in":"query","schema":{"type":"integer"}},{"name":"page_token","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"A page of invitees"}}}},"/api/v1/webhook_subscriptions":{"get":{"tags":["Calendly-compatible"],"summary":"Calendly: list webhook subscriptions","parameters":[{"name":"organization","in":"query","schema":{"type":"string"}},{"name":"user","in":"query","schema":{"type":"string"}},{"name":"scope","in":"query","schema":{"type":"string","enum":["organization","user"]}},{"name":"count","in":"query","schema":{"type":"integer"}},{"name":"page_token","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"A page of webhook subscriptions"}}},"post":{"tags":["Calendly-compatible"],"summary":"Calendly: create a webhook subscription","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["url","events"],"properties":{"url":{"type":"string","format":"uri"},"events":{"type":"array","items":{"type":"string","enum":["invitee.created","invitee.canceled"]}},"organization":{"type":"string"},"user":{"type":"string"},"scope":{"type":"string","enum":["organization","user"]}}}}}},"responses":{"201":{"description":"The created subscription. Includes signing_secret once."}}}},"/api/v1/webhook_subscriptions/{uuid}":{"get":{"tags":["Calendly-compatible"],"summary":"Calendly: get a webhook subscription","parameters":[{"name":"uuid","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The webhook subscription resource"},"404":{"description":"Not found"}}},"delete":{"tags":["Calendly-compatible"],"summary":"Calendly: delete a webhook subscription","parameters":[{"name":"uuid","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Deleted"},"404":{"description":"Not found"}}}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"cb_…"}},"schemas":{"User":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string","nullable":true},"email":{"type":"string","format":"email"},"username":{"type":"string","nullable":true}}},"Error":{"type":"object","properties":{"error":{"oneOf":[{"type":"string"},{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"required":{"type":"string"}}}]},"message":{"type":"string"},"details":{}}},"WebhookEvent":{"type":"string","enum":["appointment.created","appointment.canceled","appointment.completed","appointment.rescheduled","appointment.no_show","routing.form_submitted","routing.form_resolved","workflow.triggered","workflow.completed","workflow.failed","payment.succeeded","payment.failed","payment.refunded","contact.created","contact.updated"]},"EventTypeCreate":{"type":"object","required":["name"],"properties":{"name":{"type":"string","minLength":1,"maxLength":120},"slug":{"type":"string","maxLength":120,"description":"Generated from the name when omitted"},"description":{"type":"string","maxLength":2000},"durationMinutes":{"type":"integer","minimum":5,"maximum":480,"default":30},"price":{"type":"integer","minimum":0,"default":0,"description":"Price in minor currency units"},"currency":{"type":"string","minLength":3,"maxLength":3,"default":"EUR"},"location":{"type":"string","maxLength":200},"color":{"type":"string","maxLength":20},"isActive":{"type":"boolean","default":true}}},"EventTypePatch":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"description":{"type":["string","null"],"maxLength":2000},"durationMinutes":{"type":"integer","minimum":5,"maximum":480},"price":{"type":"integer","minimum":0,"description":"Price in minor currency units"},"currency":{"type":"string","minLength":3,"maxLength":3},"location":{"type":["string","null"],"maxLength":200},"color":{"type":["string","null"],"maxLength":20},"isActive":{"type":"boolean"}}},"RoutingFormCreate":{"type":"object","required":["name","slug"],"properties":{"name":{"type":"string","minLength":1,"maxLength":200},"slug":{"type":"string","minLength":1,"maxLength":200},"isActive":{"type":"boolean","default":true}}},"RoutingFormPatch":{"type":"object","minProperties":1,"properties":{"name":{"type":"string","minLength":1,"maxLength":200},"slug":{"type":"string","minLength":1,"maxLength":200},"isActive":{"type":"boolean"}}},"RoutingSubmission":{"type":"object","required":["answers"],"properties":{"answers":{"type":"object","additionalProperties":true,"description":"Question IDs mapped to answer values"},"submitterEmail":{"type":"string","format":"email"},"submitterName":{"type":"string","maxLength":200},"source":{"type":"string","maxLength":200},"territory":{"type":"string","maxLength":120}}},"PoolCreate":{"type":"object","required":["name"],"properties":{"name":{"type":"string","minLength":1,"maxLength":200},"selectionMode":{"type":"string","enum":["ROUND_ROBIN","WEIGHTED","PRIORITY","PERFORMANCE"],"default":"ROUND_ROBIN"},"slaHours":{"type":["integer","null"],"minimum":0},"dailyCap":{"type":["integer","null"],"minimum":0},"fallbackPoolId":{"type":["string","null"],"description":"Pool ID in the same workspace"}}},"PoolPatch":{"type":"object","minProperties":1,"properties":{"name":{"type":"string","minLength":1,"maxLength":200},"selectionMode":{"type":"string","enum":["ROUND_ROBIN","WEIGHTED","PRIORITY","PERFORMANCE"]},"slaHours":{"type":["integer","null"],"minimum":0},"dailyCap":{"type":["integer","null"],"minimum":0},"fallbackPoolId":{"type":["string","null"],"description":"Pool ID in the same workspace; null removes the fallback"}}},"WorkflowCreate":{"type":"object","required":["name","trigger"],"properties":{"name":{"type":"string","minLength":1,"maxLength":120},"description":{"type":"string","maxLength":500},"trigger":{"type":"string","enum":["BOOKING_CREATED","BOOKING_CONFIRMED","BOOKING_CANCELED","BOOKING_RESCHEDULED","BOOKING_COMPLETED","PAYMENT_SUCCEEDED","PAYMENT_FAILED","NO_SHOW_DETECTED","REMINDER_1H","REMINDER_24H"]},"appointmentTypeId":{"type":"string","description":"Event type owned by the key user in the same workspace"},"isActive":{"type":"boolean","default":true}}},"WorkflowPatch":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"description":{"type":["string","null"],"maxLength":500},"isActive":{"type":"boolean"}}}}}}