{"openapi":"3.1.0","info":{"title":"Surfing Dog Inbox","description":"Typed inbox for people and AI agents. Public routes need no auth; /v1/owner needs an owner API key.","version":"0.1.0"},"components":{"securitySchemes":{"ownerKey":{"type":"http","scheme":"bearer","description":"An owner or integration key (sdi_own_…), an OAuth access token from /oauth, or the owner app's session."}},"schemas":{"__schema0":{"anyOf":[{"type":"object","properties":{"all":{"maxItems":20,"type":"array","items":{"$ref":"#/components/schemas/__schema0"}}},"required":["all"]},{"type":"object","properties":{"any":{"maxItems":20,"type":"array","items":{"$ref":"#/components/schemas/__schema0"}}},"required":["any"]},{"type":"object","properties":{"not":{"$ref":"#/components/schemas/__schema0"}},"required":["not"]},{"type":"object","properties":{"path":{"type":"string","minLength":1,"maxLength":120},"op":{"type":"string","enum":["eq","neq","lt","lte","gt","gte","in","nin","contains","startsWith","exists","empty","between"]},"value":{}},"required":["path","op"]},{"type":"object","properties":{"fn":{"type":"string","enum":["slot_is_free","within_business_hours","party_verified","text_has_keywords","is_sandbox","person_trusted","person_tier_on","customer_known","within_customer_limit"]},"args":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["fn"]}]}}},"paths":{"/v1/owner/items":{"get":{"operationId":"getV1OwnerItems","tags":["owner"],"summary":"List items, newest change first","responses":{"200":{"description":"Items","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"item":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["message","quote_request","booking","order","refund"]},"state":{"type":"string"},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"partyId":{"type":"string"},"locationId":{"type":["string","null"]},"channel":{"type":"string"},"subject":{"type":["string","null"]},"flags":{"type":"object","properties":{"needsHuman":{"type":"boolean"},"sandbox":{"type":"boolean"},"priority":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["needsHuman","sandbox","priority"],"additionalProperties":{}},"linkedItemId":{"type":["string","null"]},"createdAt":{"type":"string","description":"ISO 8601 instant"},"updatedAt":{"type":"string","description":"ISO 8601 instant"},"closedAt":{"anyOf":[{"type":"string","description":"ISO 8601 instant"},{"type":"null"}]},"payload":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["id","type","state","version","partyId","locationId","channel","subject","flags","linkedItemId","createdAt","updatedAt","closedAt","payload"],"additionalProperties":{}},"transitions":{"type":"array","items":{"type":"object","properties":{"event":{"type":"string"},"label":{"type":"string"}},"required":["event","label"]}},"human":{"type":"string"},"party":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":["string","null"]},"kind":{"type":"string"},"email":{"type":"string"},"phone":{"type":"string"},"verified":{"type":"boolean"}},"required":["id","name","kind","verified"],"additionalProperties":{}},"receipts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string"}},"required":["id","kind"],"additionalProperties":{}}},"identity":{"description":"On the status door: who the inbox takes the customer for.","type":"object","properties":{},"additionalProperties":{}}},"required":["item","transitions","human"],"additionalProperties":{}}},"next_cursor":{"type":["string","null"]}},"required":["items","next_cursor"]}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"401":{"description":"No owner credentials: send an owner key, an integration key or an OAuth token."},"403":{"description":"Not allowed: the problem document says why."},"422":{"description":"Invalid input: the problem document names the fields to fix."}},"security":[{"ownerKey":[]}],"parameters":[{"in":"query","name":"type","schema":{"type":"string","enum":["message","quote_request","booking","order","refund"]}},{"in":"query","name":"state","schema":{"type":"string","maxLength":40}},{"in":"query","name":"needs_human","schema":{"type":"string"}},{"in":"query","name":"open_only","schema":{"type":"string"},"description":"Hide closed items."},{"in":"query","name":"sandbox","schema":{"type":"string"}},{"in":"query","name":"q","schema":{"type":"string","maxLength":200},"description":"Full-text search over the conversation."},{"in":"query","name":"cursor","schema":{"type":"string","maxLength":200}},{"in":"query","name":"limit","schema":{"default":50,"type":"integer","minimum":1,"maximum":100}}]}},"/v1/owner/items/{id}":{"get":{"operationId":"getV1OwnerItemsById","tags":["owner"],"summary":"One item with its events (who caused each, and through which door) and conversation","responses":{"200":{"description":"Item detail","content":{"application/json":{"schema":{"type":"object","properties":{"item":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["message","quote_request","booking","order","refund"]},"state":{"type":"string"},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"partyId":{"type":"string"},"locationId":{"type":["string","null"]},"channel":{"type":"string"},"subject":{"type":["string","null"]},"flags":{"type":"object","properties":{"needsHuman":{"type":"boolean"},"sandbox":{"type":"boolean"},"priority":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["needsHuman","sandbox","priority"],"additionalProperties":{}},"linkedItemId":{"type":["string","null"]},"createdAt":{"type":"string","description":"ISO 8601 instant"},"updatedAt":{"type":"string","description":"ISO 8601 instant"},"closedAt":{"anyOf":[{"type":"string","description":"ISO 8601 instant"},{"type":"null"}]},"payload":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["id","type","state","version","partyId","locationId","channel","subject","flags","linkedItemId","createdAt","updatedAt","closedAt","payload"],"additionalProperties":{}},"transitions":{"type":"array","items":{"type":"object","properties":{"event":{"type":"string"},"label":{"type":"string"}},"required":["event","label"]}},"human":{"type":"string"},"party":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":["string","null"]},"kind":{"type":"string"},"email":{"type":"string"},"phone":{"type":"string"},"verified":{"type":"boolean"}},"required":["id","name","kind","verified"],"additionalProperties":{}},"receipts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string"}},"required":["id","kind"],"additionalProperties":{}}},"identity":{"description":"On the status door: who the inbox takes the customer for.","type":"object","properties":{},"additionalProperties":{}},"events":{"type":"array","items":{"type":"object","properties":{"seq":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"event":{"type":"string"},"from":{"type":["string","null"]},"to":{"type":"string"},"actor":{"type":"string"},"by":{"type":"object","properties":{"kind":{"type":"string","description":"owner, owner_ai, integration, connector, rule, system, customer_agent or customer_human"},"id":{"description":"The user, AI app or key id; null for a customer and for a receipt.","type":["string","null"]},"name":{"description":"The key's or AI app's name.","type":"string"}},"required":["kind","id"]},"channel":{"type":["string","null"]},"reason":{"type":["string","null"]},"at":{"type":"string","description":"ISO 8601 instant"}},"required":["seq","event","from","to","actor","by","channel","reason","at"],"additionalProperties":{}}},"thread":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"direction":{"type":"string"},"channel":{"type":"string"},"actor":{"type":"string"},"body":{"type":"string"},"at":{"type":"string","description":"ISO 8601 instant"}},"required":["id","direction","channel","actor","body","at"],"additionalProperties":{}}}},"required":["item","transitions","human","events","thread"],"additionalProperties":{}}}}},"401":{"description":"No owner credentials: send an owner key, an integration key or an OAuth token."},"403":{"description":"Not allowed: the problem document says why."},"422":{"description":"Invalid input: the problem document names the fields to fix."}},"security":[{"ownerKey":[]}],"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}]}},"/v1/owner/items/{id}/transitions":{"post":{"operationId":"postV1OwnerItemsByIdTransitions","tags":["owner"],"summary":"Move an item to its next state","responses":{"200":{"description":"Item","content":{"application/json":{"schema":{"type":"object","properties":{"view":{"type":"object","properties":{"item":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["message","quote_request","booking","order","refund"]},"state":{"type":"string"},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"partyId":{"type":"string"},"locationId":{"type":["string","null"]},"channel":{"type":"string"},"subject":{"type":["string","null"]},"flags":{"type":"object","properties":{"needsHuman":{"type":"boolean"},"sandbox":{"type":"boolean"},"priority":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["needsHuman","sandbox","priority"],"additionalProperties":{}},"linkedItemId":{"type":["string","null"]},"createdAt":{"type":"string","description":"ISO 8601 instant"},"updatedAt":{"type":"string","description":"ISO 8601 instant"},"closedAt":{"anyOf":[{"type":"string","description":"ISO 8601 instant"},{"type":"null"}]},"payload":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["id","type","state","version","partyId","locationId","channel","subject","flags","linkedItemId","createdAt","updatedAt","closedAt","payload"],"additionalProperties":{}},"transitions":{"type":"array","items":{"type":"object","properties":{"event":{"type":"string"},"label":{"type":"string"}},"required":["event","label"]}},"human":{"type":"string"},"party":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":["string","null"]},"kind":{"type":"string"},"email":{"type":"string"},"phone":{"type":"string"},"verified":{"type":"boolean"}},"required":["id","name","kind","verified"],"additionalProperties":{}},"receipts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string"}},"required":["id","kind"],"additionalProperties":{}}},"identity":{"description":"On the status door: who the inbox takes the customer for.","type":"object","properties":{},"additionalProperties":{}}},"required":["item","transitions","human"],"additionalProperties":{}},"linked":{"type":"object","properties":{"item":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["message","quote_request","booking","order","refund"]},"state":{"type":"string"},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"partyId":{"type":"string"},"locationId":{"type":["string","null"]},"channel":{"type":"string"},"subject":{"type":["string","null"]},"flags":{"type":"object","properties":{"needsHuman":{"type":"boolean"},"sandbox":{"type":"boolean"},"priority":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["needsHuman","sandbox","priority"],"additionalProperties":{}},"linkedItemId":{"type":["string","null"]},"createdAt":{"type":"string","description":"ISO 8601 instant"},"updatedAt":{"type":"string","description":"ISO 8601 instant"},"closedAt":{"anyOf":[{"type":"string","description":"ISO 8601 instant"},{"type":"null"}]},"payload":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["id","type","state","version","partyId","locationId","channel","subject","flags","linkedItemId","createdAt","updatedAt","closedAt","payload"],"additionalProperties":{}},"transitions":{"type":"array","items":{"type":"object","properties":{"event":{"type":"string"},"label":{"type":"string"}},"required":["event","label"]}},"human":{"type":"string"},"party":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":["string","null"]},"kind":{"type":"string"},"email":{"type":"string"},"phone":{"type":"string"},"verified":{"type":"boolean"}},"required":["id","name","kind","verified"],"additionalProperties":{}},"receipts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string"}},"required":["id","kind"],"additionalProperties":{}}},"identity":{"description":"On the status door: who the inbox takes the customer for.","type":"object","properties":{},"additionalProperties":{}}},"required":["item","transitions","human"],"additionalProperties":{}},"replayed":{"type":"boolean"}},"required":["view","replayed"]}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"401":{"description":"No owner credentials: send an owner key, an integration key or an OAuth token."},"403":{"description":"Not allowed: the problem document says why."},"422":{"description":"Invalid input: the problem document names the fields to fix."}},"security":[{"ownerKey":[]}],"parameters":[{"in":"header","name":"Idempotency-Key","required":false,"description":"Any string up to 200 characters, new for each new request. Sending the same key and body again returns the first answer (with Idempotent-Replayed: true) instead of doing it twice; the same key with a different body is refused. Keys are kept for 30 days.","schema":{"type":"string","maxLength":200}},{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"event":{"type":"string","minLength":1,"maxLength":60},"input":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"reason":{"type":"string","maxLength":2000},"expected_version":{"type":"integer","minimum":1,"maximum":9007199254740991},"idempotency_key":{"description":"Same key + same request = same answer. Required for agents.","type":"string","minLength":1,"maxLength":200}},"required":["event"]}}}}}},"/v1/owner/items/{id}/replies":{"post":{"operationId":"postV1OwnerItemsByIdReplies","tags":["owner"],"summary":"Reply to the customer or add a note","responses":{"200":{"description":"Item","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":{}}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"401":{"description":"No owner credentials: send an owner key, an integration key or an OAuth token."},"403":{"description":"Not allowed: the problem document says why."},"422":{"description":"Invalid input: the problem document names the fields to fix."}},"security":[{"ownerKey":[]}],"parameters":[{"in":"header","name":"Idempotency-Key","required":false,"description":"Any string up to 200 characters, new for each new request. Sending the same key and body again returns the first answer (with Idempotent-Replayed: true) instead of doing it twice; the same key with a different body is refused. Keys are kept for 30 days.","schema":{"type":"string","maxLength":200}},{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"body":{"type":"string","minLength":1,"maxLength":20000},"internal":{"default":false,"description":"A private note for the team instead of a reply to the customer.","type":"boolean"},"idempotency_key":{"description":"Same key + same request = same answer. Required for agents.","type":"string","minLength":1,"maxLength":200}},"required":["body"]}}}}}},"/v1/owner/settings":{"get":{"operationId":"getV1OwnerSettings","tags":["owner"],"summary":"The settings document, secrets left out (named in redacted)","responses":{"200":{"description":"Settings","content":{"application/json":{"schema":{"type":"object","properties":{"doc":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"redacted":{"type":"array","items":{"type":"string"},"description":"Settings paths that hold a secret this read leaves out."}},"required":["doc","version","redacted"]}}}},"401":{"description":"No owner credentials: send an owner key, an integration key or an OAuth token."},"403":{"description":"Not allowed: the problem document says why."},"422":{"description":"Invalid input: the problem document names the fields to fix."}},"security":[{"ownerKey":[]}]},"put":{"operationId":"putV1OwnerSettings","tags":["owner"],"summary":"Change settings","description":"The document you send is merged over the current one: sections and keys left out keep their values, and null removes a key so its default applies again. Networks are a map keyed by https origin; adding one leaves the others as they are. The security section can only be changed by the owner in the owner app.","responses":{"200":{"description":"Settings","content":{"application/json":{"schema":{"type":"object","properties":{"doc":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"redacted":{"type":"array","items":{"type":"string"},"description":"Settings paths that hold a secret this read leaves out."}},"required":["doc","version","redacted"]}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"401":{"description":"No owner credentials: send an owner key, an integration key or an OAuth token."},"403":{"description":"Not allowed: the problem document says why."},"422":{"description":"Invalid input: the problem document names the fields to fix."}},"security":[{"ownerKey":[]}],"parameters":[{"in":"header","name":"Idempotency-Key","required":false,"description":"Any string up to 200 characters, new for each new request. Sending the same key and body again returns the first answer (with Idempotent-Replayed: true) instead of doing it twice; the same key with a different body is refused. Keys are kept for 30 days.","schema":{"type":"string","maxLength":200}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"doc":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"The changes, merged over the current settings: objects merge key by key, anything you leave out keeps its value, null removes a key (its default applies again), and arrays replace. Networks are a map keyed by https origin, e.g. {\"networks\": {\"https://network.example.com\": {\"enabled\": true}}}: that adds or switches on one network and leaves the others as they are; {\"enabled\": false} switches one off. At most 8."},"expected_version":{"description":"The version you read; a write over a newer version is refused instead of overwriting it.","type":"integer","minimum":1,"maximum":9007199254740991}},"required":["doc"]}}}}}},"/v1/owner/receipts":{"get":{"operationId":"getV1OwnerReceipts","tags":["owner"],"summary":"Whether this instance issues receipts, and how many it has","responses":{"200":{"description":"Receipt status","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":{}}}}},"401":{"description":"No owner credentials: send an owner key, an integration key or an OAuth token."},"403":{"description":"Not allowed: the problem document says why."},"422":{"description":"Invalid input: the problem document names the fields to fix."}},"security":[{"ownerKey":[]}]}},"/v1/owner/networks":{"get":{"operationId":"getV1OwnerNetworks","tags":["owner"],"summary":"The networks this inbox reports to, and how each one is doing","description":"Every network in settings, switched on or not: what it is sent, whether it has verified this instance, the last ping it took, the last error in a few words, and how many receipts it has. Add, switch on or switch off a network with PUT /settings and `networks` keyed by origin.","responses":{"200":{"description":"Networks","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":{}}}}},"401":{"description":"No owner credentials: send an owner key, an integration key or an OAuth token."},"403":{"description":"Not allowed: the problem document says why."},"422":{"description":"Invalid input: the problem document names the fields to fix."}},"security":[{"ownerKey":[]}]}},"/v1/owner/profile":{"get":{"operationId":"getV1OwnerProfile","tags":["setup"],"summary":"Business profile","responses":{"200":{"description":"Profile","content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"domain":{"type":["string","null"]},"timezone":{"type":"string"},"currency":{"type":"string"},"languages":{"type":"array","items":{"type":"string"}}},"required":["name","domain","timezone","currency","languages"]}}}},"401":{"description":"No owner credentials: send an owner key, an integration key or an OAuth token."},"403":{"description":"Not allowed: the problem document says why."},"422":{"description":"Invalid input: the problem document names the fields to fix."}},"security":[{"ownerKey":[]}]},"put":{"operationId":"putV1OwnerProfile","tags":["setup"],"summary":"Update the business profile","responses":{"200":{"description":"Profile","content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"domain":{"type":["string","null"]},"timezone":{"type":"string"},"currency":{"type":"string"},"languages":{"type":"array","items":{"type":"string"}}},"required":["name","domain","timezone","currency","languages"]}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"401":{"description":"No owner credentials: send an owner key, an integration key or an OAuth token."},"403":{"description":"Not allowed: the problem document says why."},"422":{"description":"Invalid input: the problem document names the fields to fix."}},"security":[{"ownerKey":[]}],"parameters":[{"in":"header","name":"Idempotency-Key","required":false,"description":"Any string up to 200 characters, new for each new request. Sending the same key and body again returns the first answer (with Idempotent-Replayed: true) instead of doing it twice; the same key with a different body is refused. Keys are kept for 30 days.","schema":{"type":"string","maxLength":200}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"domain":{"anyOf":[{"type":"string","maxLength":253,"pattern":"^(?!-)[a-z0-9-]{1,63}(?<!-)(\\.(?!-)[a-z0-9-]{1,63}(?<!-))+$"},{"type":"null"}]},"timezone":{"description":"IANA name, e.g. Europe/Lisbon","type":"string","minLength":1,"maxLength":64},"currency":{"type":"string","minLength":3,"maxLength":3},"languages":{"minItems":1,"maxItems":10,"type":"array","items":{"type":"string","minLength":2,"maxLength":12}}}}}}}}},"/v1/owner/services":{"get":{"operationId":"getV1OwnerServices","tags":["setup"],"summary":"All services, archived included","responses":{"200":{"description":"Services","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"durationMin":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"bufferBeforeMin":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"bufferAfterMin":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"capacity":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"granularityMin":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"price":{"anyOf":[{"type":"object","properties":{"model":{"type":"string"},"value":{"type":"number"},"currency":{"type":"string"}},"required":["model"],"additionalProperties":{}},{"type":"null"}]},"active":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"sort":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["id","name","description","durationMin","bufferBeforeMin","bufferAfterMin","capacity","granularityMin","price","active","sort"],"additionalProperties":{}}}},"required":["items"]}}}},"401":{"description":"No owner credentials: send an owner key, an integration key or an OAuth token."},"403":{"description":"Not allowed: the problem document says why."},"422":{"description":"Invalid input: the problem document names the fields to fix."}},"security":[{"ownerKey":[]}]},"post":{"operationId":"postV1OwnerServices","tags":["setup"],"summary":"Add a bookable service","responses":{"201":{"description":"Service","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"durationMin":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"bufferBeforeMin":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"bufferAfterMin":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"capacity":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"granularityMin":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"price":{"anyOf":[{"type":"object","properties":{"model":{"type":"string"},"value":{"type":"number"},"currency":{"type":"string"}},"required":["model"],"additionalProperties":{}},{"type":"null"}]},"active":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"sort":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["id","name","description","durationMin","bufferBeforeMin","bufferAfterMin","capacity","granularityMin","price","active","sort"],"additionalProperties":{}}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"401":{"description":"No owner credentials: send an owner key, an integration key or an OAuth token."},"403":{"description":"Not allowed: the problem document says why."},"422":{"description":"Invalid input: the problem document names the fields to fix."}},"security":[{"ownerKey":[]}],"parameters":[{"in":"header","name":"Idempotency-Key","required":false,"description":"Any string up to 200 characters, new for each new request. Sending the same key and body again returns the first answer (with Idempotent-Replayed: true) instead of doing it twice; the same key with a different body is refused. Keys are kept for 30 days.","schema":{"type":"string","maxLength":200}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"description":{"type":"string","maxLength":1000},"duration_min":{"default":60,"type":"integer","minimum":5,"maximum":1440},"buffer_before_min":{"default":0,"type":"integer","minimum":0,"maximum":240},"buffer_after_min":{"default":0,"type":"integer","minimum":0,"maximum":240},"capacity":{"default":1,"description":"How many bookings can share one slot.","type":"integer","minimum":1,"maximum":100},"granularity_min":{"default":15,"description":"Slots start every N minutes.","type":"integer","minimum":5,"maximum":240},"price":{"type":"object","properties":{"model":{"type":"string","enum":["fixed","from","quote"],"description":"fixed = this price; from = starting at; quote = priced per request"},"value":{"description":"Minor units (cents).","type":"integer","minimum":0,"maximum":9007199254740991},"currency":{"type":"string","minLength":3,"maxLength":3}},"required":["model"]},"active":{"default":true,"type":"boolean"},"sort":{"default":0,"type":"integer","minimum":0,"maximum":10000}},"required":["name"]}}}}}},"/v1/owner/services/{id}":{"patch":{"operationId":"patchV1OwnerServicesById","tags":["setup"],"summary":"Change a service","responses":{"200":{"description":"Service","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"durationMin":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"bufferBeforeMin":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"bufferAfterMin":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"capacity":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"granularityMin":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"price":{"anyOf":[{"type":"object","properties":{"model":{"type":"string"},"value":{"type":"number"},"currency":{"type":"string"}},"required":["model"],"additionalProperties":{}},{"type":"null"}]},"active":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"sort":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["id","name","description","durationMin","bufferBeforeMin","bufferAfterMin","capacity","granularityMin","price","active","sort"],"additionalProperties":{}}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"401":{"description":"No owner credentials: send an owner key, an integration key or an OAuth token."},"403":{"description":"Not allowed: the problem document says why."},"422":{"description":"Invalid input: the problem document names the fields to fix."}},"security":[{"ownerKey":[]}],"parameters":[{"in":"header","name":"Idempotency-Key","required":false,"description":"Any string up to 200 characters, new for each new request. Sending the same key and body again returns the first answer (with Idempotent-Replayed: true) instead of doing it twice; the same key with a different body is refused. Keys are kept for 30 days.","schema":{"type":"string","maxLength":200}},{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"description":{"type":"string","maxLength":1000},"duration_min":{"default":60,"type":"integer","minimum":5,"maximum":1440},"buffer_before_min":{"default":0,"type":"integer","minimum":0,"maximum":240},"buffer_after_min":{"default":0,"type":"integer","minimum":0,"maximum":240},"capacity":{"default":1,"description":"How many bookings can share one slot.","type":"integer","minimum":1,"maximum":100},"granularity_min":{"default":15,"description":"Slots start every N minutes.","type":"integer","minimum":5,"maximum":240},"price":{"type":"object","properties":{"model":{"type":"string","enum":["fixed","from","quote"],"description":"fixed = this price; from = starting at; quote = priced per request"},"value":{"description":"Minor units (cents).","type":"integer","minimum":0,"maximum":9007199254740991},"currency":{"type":"string","minLength":3,"maxLength":3}},"required":["model"]},"active":{"default":true,"type":"boolean"},"sort":{"default":0,"type":"integer","minimum":0,"maximum":10000}}}}}}},"delete":{"operationId":"deleteV1OwnerServicesById","tags":["setup"],"summary":"Archive a service","responses":{"200":{"description":"Service","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"durationMin":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"bufferBeforeMin":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"bufferAfterMin":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"capacity":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"granularityMin":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"price":{"anyOf":[{"type":"object","properties":{"model":{"type":"string"},"value":{"type":"number"},"currency":{"type":"string"}},"required":["model"],"additionalProperties":{}},{"type":"null"}]},"active":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"sort":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["id","name","description","durationMin","bufferBeforeMin","bufferAfterMin","capacity","granularityMin","price","active","sort"],"additionalProperties":{}}}}},"401":{"description":"No owner credentials: send an owner key, an integration key or an OAuth token."},"403":{"description":"Not allowed: the problem document says why."},"422":{"description":"Invalid input: the problem document names the fields to fix."}},"security":[{"ownerKey":[]}],"parameters":[{"in":"header","name":"Idempotency-Key","required":false,"description":"Any string up to 200 characters, new for each new request. Sending the same key and body again returns the first answer (with Idempotent-Replayed: true) instead of doing it twice; the same key with a different body is refused. Keys are kept for 30 days.","schema":{"type":"string","maxLength":200}},{"schema":{"type":"string"},"in":"path","name":"id","required":true}]}},"/v1/owner/products":{"get":{"operationId":"getV1OwnerProducts","tags":["setup"],"summary":"All products, archived included","responses":{"200":{"description":"Products","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"sku":{"type":["string","null"]},"name":{"type":"string"},"description":{"type":["string","null"]},"price":{"type":"object","properties":{"value":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"currency":{"type":"string"}},"required":["value","currency"]},"stock":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"active":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["id","sku","name","description","price","stock","active"],"additionalProperties":{}}}},"required":["items"]}}}},"401":{"description":"No owner credentials: send an owner key, an integration key or an OAuth token."},"403":{"description":"Not allowed: the problem document says why."},"422":{"description":"Invalid input: the problem document names the fields to fix."}},"security":[{"ownerKey":[]}]},"post":{"operationId":"postV1OwnerProducts","tags":["setup"],"summary":"Add a product","responses":{"201":{"description":"Product","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"sku":{"type":["string","null"]},"name":{"type":"string"},"description":{"type":["string","null"]},"price":{"type":"object","properties":{"value":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"currency":{"type":"string"}},"required":["value","currency"]},"stock":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"active":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["id","sku","name","description","price","stock","active"],"additionalProperties":{}}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"401":{"description":"No owner credentials: send an owner key, an integration key or an OAuth token."},"403":{"description":"Not allowed: the problem document says why."},"422":{"description":"Invalid input: the problem document names the fields to fix."}},"security":[{"ownerKey":[]}],"parameters":[{"in":"header","name":"Idempotency-Key","required":false,"description":"Any string up to 200 characters, new for each new request. Sending the same key and body again returns the first answer (with Idempotent-Replayed: true) instead of doing it twice; the same key with a different body is refused. Keys are kept for 30 days.","schema":{"type":"string","maxLength":200}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"sku":{"type":"string","maxLength":64},"name":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string","maxLength":2000},"price":{"type":"object","properties":{"value":{"type":"integer","minimum":0,"maximum":9007199254740991},"currency":{"type":"string","minLength":3,"maxLength":3}},"required":["value","currency"]},"stock":{"description":"null = not tracked","anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"active":{"default":true,"type":"boolean"}},"required":["name","price"]}}}}}},"/v1/owner/products/{id}":{"patch":{"operationId":"patchV1OwnerProductsById","tags":["setup"],"summary":"Change a product","responses":{"200":{"description":"Product","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"sku":{"type":["string","null"]},"name":{"type":"string"},"description":{"type":["string","null"]},"price":{"type":"object","properties":{"value":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"currency":{"type":"string"}},"required":["value","currency"]},"stock":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"active":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["id","sku","name","description","price","stock","active"],"additionalProperties":{}}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"401":{"description":"No owner credentials: send an owner key, an integration key or an OAuth token."},"403":{"description":"Not allowed: the problem document says why."},"422":{"description":"Invalid input: the problem document names the fields to fix."}},"security":[{"ownerKey":[]}],"parameters":[{"in":"header","name":"Idempotency-Key","required":false,"description":"Any string up to 200 characters, new for each new request. Sending the same key and body again returns the first answer (with Idempotent-Replayed: true) instead of doing it twice; the same key with a different body is refused. Keys are kept for 30 days.","schema":{"type":"string","maxLength":200}},{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"sku":{"type":"string","maxLength":64},"name":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string","maxLength":2000},"price":{"type":"object","properties":{"value":{"type":"integer","minimum":0,"maximum":9007199254740991},"currency":{"type":"string","minLength":3,"maxLength":3}},"required":["value","currency"]},"stock":{"description":"null = not tracked","anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"active":{"default":true,"type":"boolean"}}}}}}},"delete":{"operationId":"deleteV1OwnerProductsById","tags":["setup"],"summary":"Archive a product","responses":{"200":{"description":"Product","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"sku":{"type":["string","null"]},"name":{"type":"string"},"description":{"type":["string","null"]},"price":{"type":"object","properties":{"value":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"currency":{"type":"string"}},"required":["value","currency"]},"stock":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"active":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["id","sku","name","description","price","stock","active"],"additionalProperties":{}}}}},"401":{"description":"No owner credentials: send an owner key, an integration key or an OAuth token."},"403":{"description":"Not allowed: the problem document says why."},"422":{"description":"Invalid input: the problem document names the fields to fix."}},"security":[{"ownerKey":[]}],"parameters":[{"in":"header","name":"Idempotency-Key","required":false,"description":"Any string up to 200 characters, new for each new request. Sending the same key and body again returns the first answer (with Idempotent-Replayed: true) instead of doing it twice; the same key with a different body is refused. Keys are kept for 30 days.","schema":{"type":"string","maxLength":200}},{"schema":{"type":"string"},"in":"path","name":"id","required":true}]}},"/v1/owner/availability":{"get":{"operationId":"getV1OwnerAvailability","tags":["setup"],"summary":"Opening hours, per-service overrides and closures","responses":{"200":{"description":"Availability","content":{"application/json":{"schema":{"type":"object","properties":{"timezone":{"type":"string"},"weekly":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"overrides":{"type":"array","items":{"type":"object","properties":{"service_id":{"type":"string"}},"required":["service_id"],"additionalProperties":{}}},"closures":{"type":"array","items":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"}},"required":["from","to"],"additionalProperties":{}}}},"required":["timezone","weekly","overrides","closures"],"additionalProperties":{}}}}},"401":{"description":"No owner credentials: send an owner key, an integration key or an OAuth token."},"403":{"description":"Not allowed: the problem document says why."},"422":{"description":"Invalid input: the problem document names the fields to fix."}},"security":[{"ownerKey":[]}]},"put":{"operationId":"putV1OwnerAvailability","tags":["setup"],"summary":"Set the weekly opening hours (business-wide or for one service)","responses":{"200":{"description":"Availability","content":{"application/json":{"schema":{"type":"object","properties":{"timezone":{"type":"string"},"weekly":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"overrides":{"type":"array","items":{"type":"object","properties":{"service_id":{"type":"string"}},"required":["service_id"],"additionalProperties":{}}},"closures":{"type":"array","items":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"}},"required":["from","to"],"additionalProperties":{}}}},"required":["timezone","weekly","overrides","closures"],"additionalProperties":{}}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"401":{"description":"No owner credentials: send an owner key, an integration key or an OAuth token."},"403":{"description":"Not allowed: the problem document says why."},"422":{"description":"Invalid input: the problem document names the fields to fix."}},"security":[{"ownerKey":[]}],"parameters":[{"in":"header","name":"Idempotency-Key","required":false,"description":"Any string up to 200 characters, new for each new request. Sending the same key and body again returns the first answer (with Idempotent-Replayed: true) instead of doing it twice; the same key with a different body is refused. Keys are kept for 30 days.","schema":{"type":"string","maxLength":200}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"weekly":{"type":"object","properties":{"mon":{"maxItems":6,"type":"array","items":{"type":"array","prefixItems":[{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"}],"items":false,"minItems":2,"maxItems":2}},"tue":{"maxItems":6,"type":"array","items":{"type":"array","prefixItems":[{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"}],"items":false,"minItems":2,"maxItems":2}},"wed":{"maxItems":6,"type":"array","items":{"type":"array","prefixItems":[{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"}],"items":false,"minItems":2,"maxItems":2}},"thu":{"maxItems":6,"type":"array","items":{"type":"array","prefixItems":[{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"}],"items":false,"minItems":2,"maxItems":2}},"fri":{"maxItems":6,"type":"array","items":{"type":"array","prefixItems":[{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"}],"items":false,"minItems":2,"maxItems":2}},"sat":{"maxItems":6,"type":"array","items":{"type":"array","prefixItems":[{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"}],"items":false,"minItems":2,"maxItems":2}},"sun":{"maxItems":6,"type":"array","items":{"type":"array","prefixItems":[{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"}],"items":false,"minItems":2,"maxItems":2}}},"description":"Opening windows per weekday, e.g. {\"mon\": [[\"09:00\",\"13:00\"],[\"14:00\",\"18:00\"]]}. Missing days are closed."},"service_id":{"description":"Override the hours for one service; omit for the whole business.","type":"string","minLength":1}},"required":["weekly"]}}}}}},"/v1/owner/availability/{serviceId}":{"delete":{"operationId":"deleteV1OwnerAvailabilityByServiceId","tags":["setup"],"summary":"Remove a service's own hours so it follows the business hours","responses":{"200":{"description":"Availability","content":{"application/json":{"schema":{"type":"object","properties":{"timezone":{"type":"string"},"weekly":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"overrides":{"type":"array","items":{"type":"object","properties":{"service_id":{"type":"string"}},"required":["service_id"],"additionalProperties":{}}},"closures":{"type":"array","items":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"}},"required":["from","to"],"additionalProperties":{}}}},"required":["timezone","weekly","overrides","closures"],"additionalProperties":{}}}}},"401":{"description":"No owner credentials: send an owner key, an integration key or an OAuth token."},"403":{"description":"Not allowed: the problem document says why."},"422":{"description":"Invalid input: the problem document names the fields to fix."}},"security":[{"ownerKey":[]}],"parameters":[{"in":"header","name":"Idempotency-Key","required":false,"description":"Any string up to 200 characters, new for each new request. Sending the same key and body again returns the first answer (with Idempotent-Replayed: true) instead of doing it twice; the same key with a different body is refused. Keys are kept for 30 days.","schema":{"type":"string","maxLength":200}},{"schema":{"type":"string"},"in":"path","name":"serviceId","required":true}]}},"/v1/owner/availability/closures":{"put":{"operationId":"putV1OwnerAvailabilityClosures","tags":["setup"],"summary":"Replace the list of closed days","responses":{"200":{"description":"Availability","content":{"application/json":{"schema":{"type":"object","properties":{"timezone":{"type":"string"},"weekly":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"overrides":{"type":"array","items":{"type":"object","properties":{"service_id":{"type":"string"}},"required":["service_id"],"additionalProperties":{}}},"closures":{"type":"array","items":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"}},"required":["from","to"],"additionalProperties":{}}}},"required":["timezone","weekly","overrides","closures"],"additionalProperties":{}}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"401":{"description":"No owner credentials: send an owner key, an integration key or an OAuth token."},"403":{"description":"Not allowed: the problem document says why."},"422":{"description":"Invalid input: the problem document names the fields to fix."}},"security":[{"ownerKey":[]}],"parameters":[{"in":"header","name":"Idempotency-Key","required":false,"description":"Any string up to 200 characters, new for each new request. Sending the same key and body again returns the first answer (with Idempotent-Replayed: true) instead of doing it twice; the same key with a different body is refused. Keys are kept for 30 days.","schema":{"type":"string","maxLength":200}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"closures":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"from":{"type":"string","format":"date","pattern":"^(?:(?:\\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])))$","description":"First closed day, YYYY-MM-DD in the business time zone."},"to":{"type":"string","format":"date","pattern":"^(?:(?:\\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])))$","description":"Last closed day, inclusive."},"reason":{"type":"string","maxLength":200}},"required":["from","to"]}}},"required":["closures"]}}}}}},"/v1/owner/rules":{"get":{"operationId":"getV1OwnerRules","tags":["setup"],"summary":"The rules, highest priority first, each with a plain-English summary","responses":{"200":{"description":"Rules","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"priority":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"enabled":{"type":"boolean"},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"definition":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"summary":{"type":"string"},"created_at":{"type":"string","description":"ISO 8601 instant"},"updated_at":{"type":"string","description":"ISO 8601 instant"}},"required":["id","name","priority","enabled","version","definition","summary","created_at","updated_at"],"additionalProperties":{}}}},"required":["items"]}}}},"401":{"description":"No owner credentials: send an owner key, an integration key or an OAuth token."},"403":{"description":"Not allowed: the problem document says why."},"422":{"description":"Invalid input: the problem document names the fields to fix."}},"security":[{"ownerKey":[]}]},"post":{"operationId":"postV1OwnerRules","tags":["setup"],"summary":"Add a rule","responses":{"201":{"description":"Rule","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"priority":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"enabled":{"type":"boolean"},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"definition":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"summary":{"type":"string"},"created_at":{"type":"string","description":"ISO 8601 instant"},"updated_at":{"type":"string","description":"ISO 8601 instant"}},"required":["id","name","priority","enabled","version","definition","summary","created_at","updated_at"],"additionalProperties":{}}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"401":{"description":"No owner credentials: send an owner key, an integration key or an OAuth token."},"403":{"description":"Not allowed: the problem document says why."},"422":{"description":"Invalid input: the problem document names the fields to fix."}},"security":[{"ownerKey":[]}],"parameters":[{"in":"header","name":"Idempotency-Key","required":false,"description":"Any string up to 200 characters, new for each new request. Sending the same key and body again returns the first answer (with Idempotent-Replayed: true) instead of doing it twice; the same key with a different body is refused. Keys are kept for 30 days.","schema":{"type":"string","maxLength":200}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":160},"priority":{"default":0,"description":"Higher runs first.","type":"integer","minimum":-1000,"maximum":1000},"enabled":{"default":true,"type":"boolean"},"definition":{"type":"object","properties":{"on":{"minItems":1,"maxItems":10,"type":"array","items":{"anyOf":[{"type":"string","enum":["item.created","item.transitioned","thread.inbound"]},{"type":"string","pattern":"^item\\.transitioned:[a-z_]+$"}]}},"if":{"$ref":"#/components/schemas/__schema0"},"actions":{"minItems":1,"maxItems":10,"type":"array","items":{"oneOf":[{"type":"object","properties":{"action":{"type":"string","const":"transition"},"event":{"type":"string","minLength":1,"maxLength":60},"input":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"reason":{"type":"string","maxLength":500}},"required":["action","event"]},{"type":"object","properties":{"action":{"type":"string","const":"set_flags"},"needsHuman":{"type":"boolean"},"priority":{"type":"integer","minimum":0,"maximum":3}},"required":["action"]},{"type":"object","properties":{"action":{"type":"string","const":"reply"},"template":{"type":"string","minLength":1,"maxLength":4000},"internal":{"default":false,"type":"boolean"}},"required":["action","template"]},{"type":"object","properties":{"action":{"type":"string","const":"enqueue"},"job":{"type":"string","minLength":1,"maxLength":60},"payload":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"delayMin":{"type":"integer","minimum":0,"maximum":43200}},"required":["action","job"]},{"type":"object","properties":{"action":{"type":"string","const":"stop"}},"required":["action"]}]}},"stop":{"default":false,"type":"boolean"},"maxRunsPerItem":{"default":5,"type":"integer","minimum":1,"maximum":50}},"required":["on","if","actions"]}},"required":["name","definition"]}}}}}},"/v1/owner/rules/presets":{"get":{"operationId":"getV1OwnerRulesPresets","tags":["setup"],"summary":"Rule presets per kind of business","responses":{"200":{"description":"Presets","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{},"additionalProperties":{}}}},"required":["items"]}}}},"401":{"description":"No owner credentials: send an owner key, an integration key or an OAuth token."},"403":{"description":"Not allowed: the problem document says why."},"422":{"description":"Invalid input: the problem document names the fields to fix."}},"security":[{"ownerKey":[]}]}},"/v1/owner/rules/presets/{key}":{"post":{"operationId":"postV1OwnerRulesPresetsByKey","tags":["setup"],"summary":"Apply a preset's rules","responses":{"200":{"description":"Rules","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"priority":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"enabled":{"type":"boolean"},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"definition":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"summary":{"type":"string"},"created_at":{"type":"string","description":"ISO 8601 instant"},"updated_at":{"type":"string","description":"ISO 8601 instant"}},"required":["id","name","priority","enabled","version","definition","summary","created_at","updated_at"],"additionalProperties":{}}}},"required":["items"]}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"401":{"description":"No owner credentials: send an owner key, an integration key or an OAuth token."},"403":{"description":"Not allowed: the problem document says why."},"422":{"description":"Invalid input: the problem document names the fields to fix."}},"security":[{"ownerKey":[]}],"parameters":[{"in":"header","name":"Idempotency-Key","required":false,"description":"Any string up to 200 characters, new for each new request. Sending the same key and body again returns the first answer (with Idempotent-Replayed: true) instead of doing it twice; the same key with a different body is refused. Keys are kept for 30 days.","schema":{"type":"string","maxLength":200}},{"schema":{"type":"string"},"in":"path","name":"key","required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"replace":{"default":false,"description":"Remove the existing rules first.","type":"boolean"}}}}}}}},"/v1/owner/rules/test":{"post":{"operationId":"postV1OwnerRulesTest","tags":["setup"],"summary":"Evaluate a rule against an existing item without changing anything","responses":{"200":{"description":"Test result","content":{"application/json":{"schema":{"type":"object","properties":{"matched":{"type":"boolean"},"summary":{"type":"string"},"would":{"type":"array","items":{"type":"string"}},"skipped":{"description":"What a run would hold back on this item, in plain words: a rule reading a customer's record only helps.","type":"array","items":{"type":"string"}}},"required":["matched","summary","would"],"additionalProperties":{}}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"401":{"description":"No owner credentials: send an owner key, an integration key or an OAuth token."},"403":{"description":"Not allowed: the problem document says why."},"422":{"description":"Invalid input: the problem document names the fields to fix."}},"security":[{"ownerKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"definition":{"type":"object","properties":{"on":{"minItems":1,"maxItems":10,"type":"array","items":{"anyOf":[{"type":"string","enum":["item.created","item.transitioned","thread.inbound"]},{"type":"string","pattern":"^item\\.transitioned:[a-z_]+$"}]}},"if":{"$ref":"#/components/schemas/__schema0"},"actions":{"minItems":1,"maxItems":10,"type":"array","items":{"oneOf":[{"type":"object","properties":{"action":{"type":"string","const":"transition"},"event":{"type":"string","minLength":1,"maxLength":60},"input":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"reason":{"type":"string","maxLength":500}},"required":["action","event"]},{"type":"object","properties":{"action":{"type":"string","const":"set_flags"},"needsHuman":{"type":"boolean"},"priority":{"type":"integer","minimum":0,"maximum":3}},"required":["action"]},{"type":"object","properties":{"action":{"type":"string","const":"reply"},"template":{"type":"string","minLength":1,"maxLength":4000},"internal":{"default":false,"type":"boolean"}},"required":["action","template"]},{"type":"object","properties":{"action":{"type":"string","const":"enqueue"},"job":{"type":"string","minLength":1,"maxLength":60},"payload":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"delayMin":{"type":"integer","minimum":0,"maximum":43200}},"required":["action","job"]},{"type":"object","properties":{"action":{"type":"string","const":"stop"}},"required":["action"]}]}},"stop":{"default":false,"type":"boolean"},"maxRunsPerItem":{"default":5,"type":"integer","minimum":1,"maximum":50}},"required":["on","if","actions"]},"item_id":{"type":"string","minLength":1,"description":"An existing item to evaluate the conditions against; nothing is changed."},"name":{"description":"The rule's name, for the words the test answers with.","type":"string","maxLength":200}},"required":["definition","item_id"]}}}}}},"/v1/owner/rules/{id}":{"patch":{"operationId":"patchV1OwnerRulesById","tags":["setup"],"summary":"Change a rule (pass expected_version to avoid racing a colleague)","responses":{"200":{"description":"Rule","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"priority":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"enabled":{"type":"boolean"},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"definition":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"summary":{"type":"string"},"created_at":{"type":"string","description":"ISO 8601 instant"},"updated_at":{"type":"string","description":"ISO 8601 instant"}},"required":["id","name","priority","enabled","version","definition","summary","created_at","updated_at"],"additionalProperties":{}}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"401":{"description":"No owner credentials: send an owner key, an integration key or an OAuth token."},"403":{"description":"Not allowed: the problem document says why."},"422":{"description":"Invalid input: the problem document names the fields to fix."}},"security":[{"ownerKey":[]}],"parameters":[{"in":"header","name":"Idempotency-Key","required":false,"description":"Any string up to 200 characters, new for each new request. Sending the same key and body again returns the first answer (with Idempotent-Replayed: true) instead of doing it twice; the same key with a different body is refused. Keys are kept for 30 days.","schema":{"type":"string","maxLength":200}},{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":160},"priority":{"default":0,"description":"Higher runs first.","type":"integer","minimum":-1000,"maximum":1000},"enabled":{"default":true,"type":"boolean"},"definition":{"type":"object","properties":{"on":{"minItems":1,"maxItems":10,"type":"array","items":{"anyOf":[{"type":"string","enum":["item.created","item.transitioned","thread.inbound"]},{"type":"string","pattern":"^item\\.transitioned:[a-z_]+$"}]}},"if":{"$ref":"#/components/schemas/__schema0"},"actions":{"minItems":1,"maxItems":10,"type":"array","items":{"oneOf":[{"type":"object","properties":{"action":{"type":"string","const":"transition"},"event":{"type":"string","minLength":1,"maxLength":60},"input":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"reason":{"type":"string","maxLength":500}},"required":["action","event"]},{"type":"object","properties":{"action":{"type":"string","const":"set_flags"},"needsHuman":{"type":"boolean"},"priority":{"type":"integer","minimum":0,"maximum":3}},"required":["action"]},{"type":"object","properties":{"action":{"type":"string","const":"reply"},"template":{"type":"string","minLength":1,"maxLength":4000},"internal":{"default":false,"type":"boolean"}},"required":["action","template"]},{"type":"object","properties":{"action":{"type":"string","const":"enqueue"},"job":{"type":"string","minLength":1,"maxLength":60},"payload":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"delayMin":{"type":"integer","minimum":0,"maximum":43200}},"required":["action","job"]},{"type":"object","properties":{"action":{"type":"string","const":"stop"}},"required":["action"]}]}},"stop":{"default":false,"type":"boolean"},"maxRunsPerItem":{"default":5,"type":"integer","minimum":1,"maximum":50}},"required":["on","if","actions"]},"expected_version":{"type":"integer","minimum":1,"maximum":9007199254740991}}}}}}},"delete":{"operationId":"deleteV1OwnerRulesById","tags":["setup"],"summary":"Delete a rule","responses":{"200":{"description":"Deleted","content":{"application/json":{"schema":{"type":"object","properties":{"deleted":{"type":"boolean","const":true}},"required":["deleted"]}}}},"401":{"description":"No owner credentials: send an owner key, an integration key or an OAuth token."},"403":{"description":"Not allowed: the problem document says why."},"422":{"description":"Invalid input: the problem document names the fields to fix."}},"security":[{"ownerKey":[]}],"parameters":[{"in":"header","name":"Idempotency-Key","required":false,"description":"Any string up to 200 characters, new for each new request. Sending the same key and body again returns the first answer (with Idempotent-Replayed: true) instead of doing it twice; the same key with a different body is refused. Keys are kept for 30 days.","schema":{"type":"string","maxLength":200}},{"schema":{"type":"string"},"in":"path","name":"id","required":true}]}},"/v1/owner/webhooks":{"get":{"operationId":"getV1OwnerWebhooks","tags":["integrations"],"summary":"The endpoints events are sent to, each with a delivery summary. Never the secret.","responses":{"200":{"description":"Webhooks","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"events":{"type":"array","items":{"type":"string"}},"payload_style":{"type":"string","enum":["thin","full"]},"headers":{"type":"array","items":{"type":"string"},"description":"The names of the extra headers; values are never returned."},"active":{"type":"boolean"},"failing_since":{"anyOf":[{"type":"string","description":"ISO 8601 instant"},{"type":"null"}]},"disabled_at":{"anyOf":[{"type":"string","description":"ISO 8601 instant"},{"type":"null"}]},"last_error":{"type":["string","null"]},"created_at":{"type":"string","description":"ISO 8601 instant"},"updated_at":{"type":"string","description":"ISO 8601 instant"},"deliveries":{"type":"object","properties":{"pending":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"delivered":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"failed":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"last_delivery_at":{"anyOf":[{"type":"string","description":"ISO 8601 instant"},{"type":"null"}]}},"required":["pending","delivered","failed","last_delivery_at"]}},"required":["id","url","events","payload_style","headers","active","failing_since","disabled_at","last_error","created_at","updated_at","deliveries"],"additionalProperties":{}}}},"required":["items"]}}}},"401":{"description":"No owner credentials: send an owner key, an integration key or an OAuth token."},"403":{"description":"Not allowed: the problem document says why."},"422":{"description":"Invalid input: the problem document names the fields to fix."}},"security":[{"ownerKey":[]}]},"post":{"operationId":"postV1OwnerWebhooks","tags":["integrations"],"summary":"Add an endpoint. The signing secret is in this response and in no other: store it now.","responses":{"201":{"description":"Webhook and its secret","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"events":{"type":"array","items":{"type":"string"}},"payload_style":{"type":"string","enum":["thin","full"]},"headers":{"type":"array","items":{"type":"string"},"description":"The names of the extra headers; values are never returned."},"active":{"type":"boolean"},"failing_since":{"anyOf":[{"type":"string","description":"ISO 8601 instant"},{"type":"null"}]},"disabled_at":{"anyOf":[{"type":"string","description":"ISO 8601 instant"},{"type":"null"}]},"last_error":{"type":["string","null"]},"created_at":{"type":"string","description":"ISO 8601 instant"},"updated_at":{"type":"string","description":"ISO 8601 instant"},"deliveries":{"type":"object","properties":{"pending":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"delivered":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"failed":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"last_delivery_at":{"anyOf":[{"type":"string","description":"ISO 8601 instant"},{"type":"null"}]}},"required":["pending","delivered","failed","last_delivery_at"]},"secret":{"description":"The signing secret, in this answer and in no other.","type":["string","null"]},"secret_note":{"type":"string"},"previous_secret_until":{"anyOf":[{"type":"string","description":"ISO 8601 instant"},{"type":"null"}]}},"required":["id","url","events","payload_style","headers","active","failing_since","disabled_at","last_error","created_at","updated_at","deliveries","secret","secret_note","previous_secret_until"],"additionalProperties":{}}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"401":{"description":"No owner credentials: send an owner key, an integration key or an OAuth token."},"403":{"description":"Not allowed: the problem document says why."},"422":{"description":"Invalid input: the problem document names the fields to fix."}},"security":[{"ownerKey":[]}],"parameters":[{"in":"header","name":"Idempotency-Key","required":false,"description":"Any string up to 200 characters, new for each new request. Sending the same key and body again returns the first answer (with Idempotent-Replayed: true) instead of doing it twice; the same key with a different body is refused. Keys are kept for 30 days.","schema":{"type":"string","maxLength":200}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","maxLength":2000,"format":"uri","description":"https URL on a public host. Every event is POSTed here, signed with Standard Webhooks."},"events":{"default":["*"],"description":"Which events to send, e.g. [\"booking.*\", \"order.*\"]. Default: everything.","minItems":1,"maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":80,"pattern":"^(\\*|[a-z][a-z0-9_]*)(\\.(\\*|[a-z][a-z0-9_]*))?$"}},"payload_style":{"default":"thin","type":"string","enum":["thin","full"],"description":"thin sends a pointer — id, type, state, version and a URL — and never goes stale or leaks. full also sends the customer's data to this address."},"headers":{"type":"object","propertyNames":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9-]{0,63}$"},"additionalProperties":{"type":"string","minLength":1,"maxLength":1024,"pattern":"^[\\t\\x20-\\x7e]*$"},"description":"Up to 5 extra headers sent with every delivery, e.g. {\"Authorization\": \"Bearer …\"} for an n8n or Make webhook that checks a header. The values are sealed like the signing secret and never shown again; only the names are."}},"required":["url"]}}}}}},"/v1/owner/webhooks/{id}":{"patch":{"operationId":"patchV1OwnerWebhooksById","tags":["integrations"],"summary":"Change an endpoint's URL, events, payload style or extra headers, or wake it after a failure run","responses":{"200":{"description":"Webhook","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"events":{"type":"array","items":{"type":"string"}},"payload_style":{"type":"string","enum":["thin","full"]},"headers":{"type":"array","items":{"type":"string"},"description":"The names of the extra headers; values are never returned."},"active":{"type":"boolean"},"failing_since":{"anyOf":[{"type":"string","description":"ISO 8601 instant"},{"type":"null"}]},"disabled_at":{"anyOf":[{"type":"string","description":"ISO 8601 instant"},{"type":"null"}]},"last_error":{"type":["string","null"]},"created_at":{"type":"string","description":"ISO 8601 instant"},"updated_at":{"type":"string","description":"ISO 8601 instant"},"deliveries":{"type":"object","properties":{"pending":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"delivered":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"failed":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"last_delivery_at":{"anyOf":[{"type":"string","description":"ISO 8601 instant"},{"type":"null"}]}},"required":["pending","delivered","failed","last_delivery_at"]}},"required":["id","url","events","payload_style","headers","active","failing_since","disabled_at","last_error","created_at","updated_at","deliveries"],"additionalProperties":{}}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"401":{"description":"No owner credentials: send an owner key, an integration key or an OAuth token."},"403":{"description":"Not allowed: the problem document says why."},"422":{"description":"Invalid input: the problem document names the fields to fix."}},"security":[{"ownerKey":[]}],"parameters":[{"in":"header","name":"Idempotency-Key","required":false,"description":"Any string up to 200 characters, new for each new request. Sending the same key and body again returns the first answer (with Idempotent-Replayed: true) instead of doing it twice; the same key with a different body is refused. Keys are kept for 30 days.","schema":{"type":"string","maxLength":200}},{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","maxLength":2000,"format":"uri"},"events":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":80,"pattern":"^(\\*|[a-z][a-z0-9_]*)(\\.(\\*|[a-z][a-z0-9_]*))?$"}},"payload_style":{"type":"string","enum":["thin","full"],"description":"thin sends a pointer — id, type, state, version and a URL — and never goes stale or leaks. full also sends the customer's data to this address."},"active":{"description":"Setting it back to true also clears a failure run, so deliveries resume.","type":"boolean"},"headers":{"description":"Changes to the extra headers, merged: a name with a value sets or replaces it, a name with null removes it, and headers you leave out keep their values. At most 5 in all.","type":"object","propertyNames":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9-]{0,63}$"},"additionalProperties":{"anyOf":[{"type":"string","minLength":1,"maxLength":1024,"pattern":"^[\\t\\x20-\\x7e]*$"},{"type":"null"}]}}}}}}}},"delete":{"operationId":"deleteV1OwnerWebhooksById","tags":["integrations"],"summary":"Remove an endpoint and its delivery log","responses":{"200":{"description":"Deleted","content":{"application/json":{"schema":{"type":"object","properties":{"deleted":{"type":"boolean","const":true}},"required":["deleted"]}}}},"401":{"description":"No owner credentials: send an owner key, an integration key or an OAuth token."},"403":{"description":"Not allowed: the problem document says why."},"422":{"description":"Invalid input: the problem document names the fields to fix."}},"security":[{"ownerKey":[]}],"parameters":[{"in":"header","name":"Idempotency-Key","required":false,"description":"Any string up to 200 characters, new for each new request. Sending the same key and body again returns the first answer (with Idempotent-Replayed: true) instead of doing it twice; the same key with a different body is refused. Keys are kept for 30 days.","schema":{"type":"string","maxLength":200}},{"schema":{"type":"string"},"in":"path","name":"id","required":true}]}},"/v1/owner/feeds":{"get":{"operationId":"getV1OwnerFeeds","tags":["integrations"],"summary":"The product feeds this inbox imports, with when each last ran and what went wrong","responses":{"200":{"description":"Feeds","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"url":{"type":"string"},"status":{"type":"string"}},"required":["id","name","url","status"],"additionalProperties":{}}}},"required":["items"]}}}},"401":{"description":"No owner credentials: send an owner key, an integration key or an OAuth token."},"403":{"description":"Not allowed: the problem document says why."},"422":{"description":"Invalid input: the problem document names the fields to fix."}},"security":[{"ownerKey":[]}]},"post":{"operationId":"postV1OwnerFeeds","tags":["integrations"],"summary":"Connect a product feed by URL. No credentials. The first import starts immediately.","responses":{"201":{"description":"Feed","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"url":{"type":"string"},"status":{"type":"string"}},"required":["id","name","url","status"],"additionalProperties":{}}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"401":{"description":"No owner credentials: send an owner key, an integration key or an OAuth token."},"403":{"description":"Not allowed: the problem document says why."},"422":{"description":"Invalid input: the problem document names the fields to fix."}},"security":[{"ownerKey":[]}],"parameters":[{"in":"header","name":"Idempotency-Key","required":false,"description":"Any string up to 200 characters, new for each new request. Sending the same key and body again returns the first answer (with Idempotent-Replayed: true) instead of doing it twice; the same key with a different body is refused. Keys are kept for 30 days.","schema":{"type":"string","maxLength":200}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","minLength":1,"maxLength":2000,"description":"The feed URL, as the shop's platform gives it. A comma-separated export or a Google Merchant XML feed."},"name":{"description":"What to call it. Defaults to the host it is fetched from.","type":"string","maxLength":120},"currency":{"description":"Used for prices the feed states with no currency of their own. Defaults to the business currency.","type":"string","minLength":3,"maxLength":3},"deactivate_missing":{"description":"Deactivate products that stop appearing in the feed. On by default; they are never deleted.","type":"boolean"}},"required":["url"]}}}}}},"/v1/owner/feeds/{id}":{"get":{"operationId":"getV1OwnerFeedsById","tags":["integrations"],"summary":"One feed","responses":{"200":{"description":"Feed","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"url":{"type":"string"},"status":{"type":"string"}},"required":["id","name","url","status"],"additionalProperties":{}}}}},"401":{"description":"No owner credentials: send an owner key, an integration key or an OAuth token."},"403":{"description":"Not allowed: the problem document says why."},"422":{"description":"Invalid input: the problem document names the fields to fix."}},"security":[{"ownerKey":[]}],"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}]},"delete":{"operationId":"deleteV1OwnerFeedsById","tags":["integrations"],"summary":"Disconnect a feed. Its products are deactivated, never deleted.","responses":{"200":{"description":"Removed","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":{}}}}},"401":{"description":"No owner credentials: send an owner key, an integration key or an OAuth token."},"403":{"description":"Not allowed: the problem document says why."},"422":{"description":"Invalid input: the problem document names the fields to fix."}},"security":[{"ownerKey":[]}],"parameters":[{"in":"header","name":"Idempotency-Key","required":false,"description":"Any string up to 200 characters, new for each new request. Sending the same key and body again returns the first answer (with Idempotent-Replayed: true) instead of doing it twice; the same key with a different body is refused. Keys are kept for 30 days.","schema":{"type":"string","maxLength":200}},{"schema":{"type":"string"},"in":"path","name":"id","required":true}]}},"/v1/owner/feeds/{id}/import":{"post":{"operationId":"postV1OwnerFeedsByIdImport","tags":["integrations"],"summary":"Import now rather than waiting for the next scheduled run","responses":{"200":{"description":"Queued","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":{}}}}},"401":{"description":"No owner credentials: send an owner key, an integration key or an OAuth token."},"403":{"description":"Not allowed: the problem document says why."},"422":{"description":"Invalid input: the problem document names the fields to fix."}},"security":[{"ownerKey":[]}],"parameters":[{"in":"header","name":"Idempotency-Key","required":false,"description":"Any string up to 200 characters, new for each new request. Sending the same key and body again returns the first answer (with Idempotent-Replayed: true) instead of doing it twice; the same key with a different body is refused. Keys are kept for 30 days.","schema":{"type":"string","maxLength":200}},{"schema":{"type":"string"},"in":"path","name":"id","required":true}]}},"/v1/owner/webhooks/{id}/rotate-secret":{"post":{"operationId":"postV1OwnerWebhooksByIdRotateSecret","tags":["integrations"],"summary":"Mint a new signing secret, shown once. The old one keeps verifying for 24 hours.","responses":{"200":{"description":"Webhook and its new secret","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"events":{"type":"array","items":{"type":"string"}},"payload_style":{"type":"string","enum":["thin","full"]},"headers":{"type":"array","items":{"type":"string"},"description":"The names of the extra headers; values are never returned."},"active":{"type":"boolean"},"failing_since":{"anyOf":[{"type":"string","description":"ISO 8601 instant"},{"type":"null"}]},"disabled_at":{"anyOf":[{"type":"string","description":"ISO 8601 instant"},{"type":"null"}]},"last_error":{"type":["string","null"]},"created_at":{"type":"string","description":"ISO 8601 instant"},"updated_at":{"type":"string","description":"ISO 8601 instant"},"deliveries":{"type":"object","properties":{"pending":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"delivered":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"failed":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"last_delivery_at":{"anyOf":[{"type":"string","description":"ISO 8601 instant"},{"type":"null"}]}},"required":["pending","delivered","failed","last_delivery_at"]},"secret":{"description":"The signing secret, in this answer and in no other.","type":["string","null"]},"secret_note":{"type":"string"},"previous_secret_until":{"anyOf":[{"type":"string","description":"ISO 8601 instant"},{"type":"null"}]}},"required":["id","url","events","payload_style","headers","active","failing_since","disabled_at","last_error","created_at","updated_at","deliveries","secret","secret_note","previous_secret_until"],"additionalProperties":{}}}}},"401":{"description":"No owner credentials: send an owner key, an integration key or an OAuth token."},"403":{"description":"Not allowed: the problem document says why."},"422":{"description":"Invalid input: the problem document names the fields to fix."}},"security":[{"ownerKey":[]}],"parameters":[{"in":"header","name":"Idempotency-Key","required":false,"description":"Any string up to 200 characters, new for each new request. Sending the same key and body again returns the first answer (with Idempotent-Replayed: true) instead of doing it twice; the same key with a different body is refused. Keys are kept for 30 days.","schema":{"type":"string","maxLength":200}},{"schema":{"type":"string"},"in":"path","name":"id","required":true}]}},"/v1/owner/webhooks/{id}/test":{"post":{"operationId":"postV1OwnerWebhooksByIdTest","tags":["integrations"],"summary":"Send a real, signed, clearly marked test delivery now, with the endpoint's extra headers, and report the HTTP status it got","responses":{"200":{"description":"Test result","content":{"application/json":{"schema":{"type":"object","properties":{"delivered":{"type":"boolean"},"status":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"duration_ms":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"error":{"type":["string","null"]},"event":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","description":"<item type>.<event>, e.g. booking.confirm"},"timestamp":{"type":"string","description":"ISO 8601 instant"},"data":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"},"state":{"type":"string"},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"url":{"type":"string"},"actor":{"type":"object","properties":{"kind":{"type":"string","description":"owner, owner_ai, integration, connector, rule, system, customer_agent or customer_human"},"id":{"description":"The user, AI app or key id; null for a customer and for a receipt.","type":["string","null"]},"name":{"description":"The key's or AI app's name.","type":"string"}},"required":["kind","id"]},"channel":{"type":["string","null"]},"sandbox":{"type":"boolean"}},"required":["id","type","state","version","url","actor","channel","sandbox"],"additionalProperties":{}},"test":{"type":"boolean","const":true},"message":{"type":"string"}},"required":["id","type","timestamp","data","test","message"]},"delivery":{"type":"object","properties":{"id":{"type":"string"},"webhook_id":{"type":"string"},"event_id":{"type":"string"},"event_type":{"type":"string"},"status":{"type":"string","enum":["pending","delivered","failed"]},"attempts":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"last_status":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"last_error":{"type":["string","null"]},"duration_ms":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"created_at":{"type":"string","description":"ISO 8601 instant"},"delivered_at":{"anyOf":[{"type":"string","description":"ISO 8601 instant"},{"type":"null"}]},"next_attempt_at":{"anyOf":[{"type":"string","description":"ISO 8601 instant"},{"type":"null"}]}},"required":["id","webhook_id","event_id","event_type","status","attempts","last_status","last_error","duration_ms","created_at","delivered_at","next_attempt_at"],"additionalProperties":{}}},"required":["delivered","status","duration_ms","error","event","delivery"],"additionalProperties":{}}}}},"401":{"description":"No owner credentials: send an owner key, an integration key or an OAuth token."},"403":{"description":"Not allowed: the problem document says why."},"422":{"description":"Invalid input: the problem document names the fields to fix."}},"security":[{"ownerKey":[]}],"parameters":[{"in":"header","name":"Idempotency-Key","required":false,"description":"Any string up to 200 characters, new for each new request. Sending the same key and body again returns the first answer (with Idempotent-Replayed: true) instead of doing it twice; the same key with a different body is refused. Keys are kept for 30 days.","schema":{"type":"string","maxLength":200}},{"schema":{"type":"string"},"in":"path","name":"id","required":true}]}},"/v1/owner/webhooks/{id}/replay":{"post":{"operationId":"postV1OwnerWebhooksByIdReplay","tags":["integrations"],"summary":"Re-queue every matching event since an instant that this endpoint never received","responses":{"200":{"description":"Replay report","content":{"application/json":{"schema":{"type":"object","properties":{"webhook_id":{"type":"string"},"matched":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"queued":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"truncated":{"type":"boolean"},"next_after":{"type":["string","null"]}},"required":["webhook_id","matched","queued","truncated","next_after"]}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"401":{"description":"No owner credentials: send an owner key, an integration key or an OAuth token."},"403":{"description":"Not allowed: the problem document says why."},"422":{"description":"Invalid input: the problem document names the fields to fix."}},"security":[{"ownerKey":[]}],"parameters":[{"in":"header","name":"Idempotency-Key","required":false,"description":"Any string up to 200 characters, new for each new request. Sending the same key and body again returns the first answer (with Idempotent-Replayed: true) instead of doing it twice; the same key with a different body is refused. Keys are kept for 30 days.","schema":{"type":"string","maxLength":200}},{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"since":{"type":"string","format":"date-time","pattern":"^(?:(?:\\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)))$","description":"Re-send every matching event from this instant that this endpoint never received."},"after":{"description":"The next_after of your last call. One call scans at most 500 events from `since`; when the result is truncated, pass its next_after back here to take the next window.","type":"string","maxLength":200}},"required":["since"]}}}}}},"/v1/owner/webhooks/{id}/deliveries":{"get":{"operationId":"getV1OwnerWebhooksByIdDeliveries","tags":["integrations"],"summary":"One endpoint's deliveries, newest first","responses":{"200":{"description":"Deliveries","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"webhook_id":{"type":"string"},"event_id":{"type":"string"},"event_type":{"type":"string"},"status":{"type":"string","enum":["pending","delivered","failed"]},"attempts":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"last_status":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"last_error":{"type":["string","null"]},"duration_ms":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"created_at":{"type":"string","description":"ISO 8601 instant"},"delivered_at":{"anyOf":[{"type":"string","description":"ISO 8601 instant"},{"type":"null"}]},"next_attempt_at":{"anyOf":[{"type":"string","description":"ISO 8601 instant"},{"type":"null"}]}},"required":["id","webhook_id","event_id","event_type","status","attempts","last_status","last_error","duration_ms","created_at","delivered_at","next_attempt_at"],"additionalProperties":{}}},"next_cursor":{"type":["string","null"]}},"required":["items","next_cursor"]}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"401":{"description":"No owner credentials: send an owner key, an integration key or an OAuth token."},"403":{"description":"Not allowed: the problem document says why."},"422":{"description":"Invalid input: the problem document names the fields to fix."}},"security":[{"ownerKey":[]}],"parameters":[{"in":"query","name":"status","schema":{"type":"string","enum":["pending","delivered","failed"]}},{"in":"query","name":"cursor","schema":{"type":"string","maxLength":200}},{"in":"query","name":"limit","schema":{"default":50,"type":"integer","minimum":1,"maximum":100}},{"schema":{"type":"string"},"in":"path","name":"id","required":true}]}},"/v1/owner/deliveries":{"get":{"operationId":"getV1OwnerDeliveries","tags":["integrations"],"summary":"Deliveries across every endpoint, newest first, keyset paginated","responses":{"200":{"description":"Deliveries","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"webhook_id":{"type":"string"},"event_id":{"type":"string"},"event_type":{"type":"string"},"status":{"type":"string","enum":["pending","delivered","failed"]},"attempts":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"last_status":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"last_error":{"type":["string","null"]},"duration_ms":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"created_at":{"type":"string","description":"ISO 8601 instant"},"delivered_at":{"anyOf":[{"type":"string","description":"ISO 8601 instant"},{"type":"null"}]},"next_attempt_at":{"anyOf":[{"type":"string","description":"ISO 8601 instant"},{"type":"null"}]}},"required":["id","webhook_id","event_id","event_type","status","attempts","last_status","last_error","duration_ms","created_at","delivered_at","next_attempt_at"],"additionalProperties":{}}},"next_cursor":{"type":["string","null"]}},"required":["items","next_cursor"]}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"401":{"description":"No owner credentials: send an owner key, an integration key or an OAuth token."},"403":{"description":"Not allowed: the problem document says why."},"422":{"description":"Invalid input: the problem document names the fields to fix."}},"security":[{"ownerKey":[]}],"parameters":[{"in":"query","name":"webhook_id","schema":{"type":"string","minLength":1},"description":"Omit to see every endpoint's deliveries."},{"in":"query","name":"status","schema":{"type":"string","enum":["pending","delivered","failed"]}},{"in":"query","name":"cursor","schema":{"type":"string","maxLength":200}},{"in":"query","name":"limit","schema":{"default":50,"type":"integer","minimum":1,"maximum":100}}]}},"/v1/owner/deliveries/{id}/replay":{"post":{"operationId":"postV1OwnerDeliveriesByIdReplay","tags":["integrations"],"summary":"Send one delivery again, on the row it already has","responses":{"200":{"description":"Delivery","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"webhook_id":{"type":"string"},"event_id":{"type":"string"},"event_type":{"type":"string"},"status":{"type":"string","enum":["pending","delivered","failed"]},"attempts":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"last_status":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"last_error":{"type":["string","null"]},"duration_ms":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"created_at":{"type":"string","description":"ISO 8601 instant"},"delivered_at":{"anyOf":[{"type":"string","description":"ISO 8601 instant"},{"type":"null"}]},"next_attempt_at":{"anyOf":[{"type":"string","description":"ISO 8601 instant"},{"type":"null"}]}},"required":["id","webhook_id","event_id","event_type","status","attempts","last_status","last_error","duration_ms","created_at","delivered_at","next_attempt_at"],"additionalProperties":{}}}}},"401":{"description":"No owner credentials: send an owner key, an integration key or an OAuth token."},"403":{"description":"Not allowed: the problem document says why."},"422":{"description":"Invalid input: the problem document names the fields to fix."}},"security":[{"ownerKey":[]}],"parameters":[{"in":"header","name":"Idempotency-Key","required":false,"description":"Any string up to 200 characters, new for each new request. Sending the same key and body again returns the first answer (with Idempotent-Replayed: true) instead of doing it twice; the same key with a different body is refused. Keys are kept for 30 days.","schema":{"type":"string","maxLength":200}},{"schema":{"type":"string"},"in":"path","name":"id","required":true}]}},"/v1/owner/events":{"get":{"operationId":"getV1OwnerEvents","tags":["integrations"],"summary":"The event stream, oldest first: every booking, order, quote and message event as the same thin event a webhook carries, with who caused it (data.actor), the door (data.channel) and whether it is a sandbox item. Pass the next_cursor of your last page as cursor. The stream trails live by a few seconds, which is what makes that cursor safe as a watermark. For anyone who cannot receive a webhook.","responses":{"200":{"description":"Events and the next cursor","content":{"application/json":{"schema":{"type":"object","properties":{"events":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","description":"<item type>.<event>, e.g. booking.confirm"},"timestamp":{"type":"string","description":"ISO 8601 instant"},"data":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"},"state":{"type":"string"},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"url":{"type":"string"},"actor":{"type":"object","properties":{"kind":{"type":"string","description":"owner, owner_ai, integration, connector, rule, system, customer_agent or customer_human"},"id":{"description":"The user, AI app or key id; null for a customer and for a receipt.","type":["string","null"]},"name":{"description":"The key's or AI app's name.","type":"string"}},"required":["kind","id"]},"channel":{"type":["string","null"]},"sandbox":{"type":"boolean"}},"required":["id","type","state","version","url","actor","channel","sandbox"],"additionalProperties":{}}},"required":["id","type","timestamp","data"]}},"next_cursor":{"type":["string","null"]}},"required":["events","next_cursor"]}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"401":{"description":"No owner credentials: send an owner key, an integration key or an OAuth token."},"403":{"description":"Not allowed: the problem document says why."},"422":{"description":"Invalid input: the problem document names the fields to fix."}},"security":[{"ownerKey":[]}],"parameters":[{"in":"query","name":"cursor","schema":{"type":"string","maxLength":200},"description":"The next_cursor of your last page. Omit to start at the beginning of time."},{"in":"query","name":"limit","schema":{"default":50,"type":"integer","minimum":1,"maximum":100}},{"in":"query","name":"types","schema":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":80,"pattern":"^(\\*|[a-z][a-z0-9_]*)(\\.(\\*|[a-z][a-z0-9_]*))?$"}},"description":"Only these event types, patterns allowed: \"booking.*,order.record_payment\", or types repeated."},{"in":"query","name":"since","schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\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)))$"},"description":"Only events from this instant onwards."}]}},"/v1/owner/api-keys":{"get":{"operationId":"getV1OwnerApiKeys","tags":["keys"],"summary":"The owner and integration keys, with their scopes, when each was last used, and every call each made outside its scopes; the AI apps' such calls too","responses":{"200":{"description":"Keys","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"kind":{"type":"string","enum":["owner","integration"]},"hint":{"type":"string"},"scopes":{"type":"array","items":{"type":"string"}},"active":{"type":"boolean"},"created_at":{"type":"string","description":"ISO 8601 instant"},"created_by":{"type":["string","null"]},"last_used_at":{"anyOf":[{"type":"string","description":"ISO 8601 instant"},{"type":"null"}]},"expires_at":{"anyOf":[{"type":"string","description":"ISO 8601 instant"},{"type":"null"}]},"revoked_at":{"anyOf":[{"type":"string","description":"ISO 8601 instant"},{"type":"null"}]},"refusals":{"type":"array","items":{"type":"object","properties":{"operation":{"type":"string"},"scope":{"type":"string"},"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"enforced":{"type":"boolean"},"first_at":{"type":"string","description":"ISO 8601 instant"},"last_at":{"type":"string","description":"ISO 8601 instant"}},"required":["operation","scope","count","enforced","first_at","last_at"]}}},"required":["id","name","kind","hint","scopes","active","created_at","created_by","last_used_at","expires_at","revoked_at","refusals"]}},"ai_clients":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string"},"id":{"type":"string"},"name":{"type":["string","null"]},"refusals":{"type":"array","items":{"type":"object","properties":{"operation":{"type":"string"},"scope":{"type":"string"},"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"enforced":{"type":"boolean"},"first_at":{"type":"string","description":"ISO 8601 instant"},"last_at":{"type":"string","description":"ISO 8601 instant"}},"required":["operation","scope","count","enforced","first_at","last_at"]}}},"required":["kind","id","name","refusals"]}},"scopes":{"type":"array","items":{"type":"object","properties":{"scope":{"type":"string"},"label":{"type":"string"}},"required":["scope","label"]}},"presets":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"name":{"type":"string"},"scopes":{"type":"array","items":{"type":"string"}}},"required":["key","name","scopes"],"additionalProperties":{}}},"security":{"type":"object","properties":{"ai_may_create_keys":{"type":"boolean"},"enforce_scopes":{"type":"boolean"}},"required":["ai_may_create_keys","enforce_scopes"]}},"required":["items","ai_clients","scopes","presets","security"]}}}},"401":{"description":"No owner credentials: send an owner key, an integration key or an OAuth token."},"403":{"description":"Not allowed: the problem document says why."},"422":{"description":"Invalid input: the problem document names the fields to fix."}},"security":[{"ownerKey":[]}]},"post":{"operationId":"postV1OwnerApiKeys","tags":["keys"],"summary":"Create an integration key: named, scoped, revocable. The key is in this response and in no other: store it now.","description":"Give a preset (automation, shop_sync, calendar_sync, read_only) or scopes, or both. The owner's AI may create a key only once the owner has switched on security.aiMayCreateKeys in the owner app, and never one with settings:write; an integration key cannot create keys.","responses":{"201":{"description":"The key, shown once","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"kind":{"type":"string","enum":["owner","integration"]},"hint":{"type":"string"},"scopes":{"type":"array","items":{"type":"string"}},"active":{"type":"boolean"},"created_at":{"type":"string","description":"ISO 8601 instant"},"created_by":{"type":["string","null"]},"last_used_at":{"anyOf":[{"type":"string","description":"ISO 8601 instant"},{"type":"null"}]},"expires_at":{"anyOf":[{"type":"string","description":"ISO 8601 instant"},{"type":"null"}]},"revoked_at":{"anyOf":[{"type":"string","description":"ISO 8601 instant"},{"type":"null"}]},"refusals":{"type":"array","items":{"type":"object","properties":{"operation":{"type":"string"},"scope":{"type":"string"},"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"enforced":{"type":"boolean"},"first_at":{"type":"string","description":"ISO 8601 instant"},"last_at":{"type":"string","description":"ISO 8601 instant"}},"required":["operation","scope","count","enforced","first_at","last_at"]}},"key":{"description":"The key, in this answer and in no other.","type":["string","null"]},"key_note":{"type":"string"}},"required":["id","name","kind","hint","scopes","active","created_at","created_by","last_used_at","expires_at","revoked_at","refusals","key","key_note"]}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"401":{"description":"No owner credentials: send an owner key, an integration key or an OAuth token."},"403":{"description":"Not allowed: the problem document says why."},"422":{"description":"Invalid input: the problem document names the fields to fix."}},"security":[{"ownerKey":[]}],"parameters":[{"in":"header","name":"Idempotency-Key","required":false,"description":"Any string up to 200 characters, new for each new request. Sending the same key and body again returns the first answer (with Idempotent-Replayed: true) instead of doing it twice; the same key with a different body is refused. Keys are kept for 30 days.","schema":{"type":"string","maxLength":200}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80,"description":"What the key is for, as the owner will recognise it: the system it goes into, e.g. \"Zapier\"."},"preset":{"description":"A ready-made scope set: automation, shop_sync, calendar_sync or read_only. Give this or scopes (or both: they add up).","type":"string","enum":["automation","shop_sync","calendar_sync","read_only"]},"scopes":{"description":"The scopes, as narrow as the system needs. Never keys:write; settings:write only from the owner.","maxItems":9,"type":"array","items":{"type":"string","enum":["inbox:read","inbox:write","events:read","catalogue:write","availability:write","settings:read","settings:write","setup:run","integrations:write"]}},"expires_at":{"description":"When the key stops working. Omit for a key that works until revoked.","type":"string","format":"date-time","pattern":"^(?:(?:\\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)))$"}},"required":["name"]}}}}}},"/v1/owner/api-keys/{id}":{"delete":{"operationId":"deleteV1OwnerApiKeysById","tags":["keys"],"summary":"Revoke a key, at once and for good","responses":{"200":{"description":"Key","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"kind":{"type":"string","enum":["owner","integration"]},"hint":{"type":"string"},"scopes":{"type":"array","items":{"type":"string"}},"active":{"type":"boolean"},"created_at":{"type":"string","description":"ISO 8601 instant"},"created_by":{"type":["string","null"]},"last_used_at":{"anyOf":[{"type":"string","description":"ISO 8601 instant"},{"type":"null"}]},"expires_at":{"anyOf":[{"type":"string","description":"ISO 8601 instant"},{"type":"null"}]},"revoked_at":{"anyOf":[{"type":"string","description":"ISO 8601 instant"},{"type":"null"}]},"refusals":{"type":"array","items":{"type":"object","properties":{"operation":{"type":"string"},"scope":{"type":"string"},"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"enforced":{"type":"boolean"},"first_at":{"type":"string","description":"ISO 8601 instant"},"last_at":{"type":"string","description":"ISO 8601 instant"}},"required":["operation","scope","count","enforced","first_at","last_at"]}}},"required":["id","name","kind","hint","scopes","active","created_at","created_by","last_used_at","expires_at","revoked_at","refusals"]}}}},"401":{"description":"No owner credentials: send an owner key, an integration key or an OAuth token."},"403":{"description":"Not allowed: the problem document says why."},"422":{"description":"Invalid input: the problem document names the fields to fix."}},"security":[{"ownerKey":[]}],"parameters":[{"in":"header","name":"Idempotency-Key","required":false,"description":"Any string up to 200 characters, new for each new request. Sending the same key and body again returns the first answer (with Idempotent-Replayed: true) instead of doing it twice; the same key with a different body is refused. Keys are kept for 30 days.","schema":{"type":"string","maxLength":200}},{"schema":{"type":"string"},"in":"path","name":"id","required":true}]}},"/v1/business":{"get":{"operationId":"getV1Business","tags":["public"],"summary":"The business profile","responses":{"200":{"description":"Profile","content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"domain":{"type":["string","null"]},"timezone":{"type":"string"},"currency":{"type":"string"},"languages":{"type":"array","items":{"type":"string"}},"item_types":{"type":"array","items":{"type":"string"}}},"required":["name","domain","timezone","currency","languages","item_types"]}}}},"422":{"description":"Invalid input: the problem document names the fields to fix."}}}},"/v1/services":{"get":{"operationId":"getV1Services","tags":["public"],"summary":"Services with duration and price model. Pass next_cursor back as cursor for the next page.","responses":{"200":{"description":"Services","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"durationMin":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"bufferBeforeMin":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"bufferAfterMin":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"capacity":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"granularityMin":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"price":{"anyOf":[{"type":"object","properties":{"model":{"type":"string"},"value":{"type":"number"},"currency":{"type":"string"}},"required":["model"],"additionalProperties":{}},{"type":"null"}]},"active":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"sort":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["id","name","description","durationMin","bufferBeforeMin","bufferAfterMin","capacity","granularityMin","price","active","sort"],"additionalProperties":{}}},"next_cursor":{"type":["string","null"]}},"required":["items","next_cursor"]}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"422":{"description":"Invalid input: the problem document names the fields to fix."}},"parameters":[{"in":"query","name":"cursor","schema":{"type":"string","maxLength":200}},{"in":"query","name":"limit","schema":{"default":50,"type":"integer","minimum":1,"maximum":100}}]}},"/v1/products":{"get":{"operationId":"getV1Products","tags":["public"],"summary":"Products. Pass next_cursor back as cursor for the next page.","responses":{"200":{"description":"Products","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"sku":{"type":["string","null"]},"name":{"type":"string"},"description":{"type":["string","null"]},"price":{"type":"object","properties":{"value":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"currency":{"type":"string"}},"required":["value","currency"]},"stock":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"active":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["id","sku","name","description","price","stock","active"],"additionalProperties":{}}},"next_cursor":{"type":["string","null"]}},"required":["items","next_cursor"]}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"422":{"description":"Invalid input: the problem document names the fields to fix."}},"parameters":[{"in":"query","name":"cursor","schema":{"type":"string","maxLength":200}},{"in":"query","name":"limit","schema":{"default":50,"type":"integer","minimum":1,"maximum":100}},{"in":"query","name":"q","schema":{"type":"string","maxLength":100}}]}},"/v1/availability":{"get":{"operationId":"getV1Availability","tags":["public"],"summary":"Free slots for a service","responses":{"200":{"description":"Slots","content":{"application/json":{"schema":{"type":"object","properties":{"service":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"durationMin":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["id","name","durationMin"],"additionalProperties":{}},"slots":{"type":"array","items":{"type":"object","properties":{"startTime":{"type":"string"}},"required":["startTime"],"additionalProperties":{}}}},"required":["service","slots"],"additionalProperties":{}}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"422":{"description":"Invalid input: the problem document names the fields to fix."}},"parameters":[{"in":"query","name":"service_id","schema":{"type":"string","minLength":1},"required":true},{"in":"query","name":"from","schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\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)))$"},"required":true,"description":"Start of the window to search, ISO 8601."},{"in":"query","name":"to","schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\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)))$"},"required":true,"description":"End of the window, at most 14 days after from."},{"in":"query","name":"party_size","schema":{"type":"integer","minimum":1,"maximum":9007199254740991}}]}},"/v1/quotes":{"post":{"operationId":"postV1Quotes","tags":["public"],"summary":"Request a quote","responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","properties":{"view":{"type":"object","properties":{"item":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["message","quote_request","booking","order","refund"]},"state":{"type":"string"},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"partyId":{"type":"string"},"locationId":{"type":["string","null"]},"channel":{"type":"string"},"subject":{"type":["string","null"]},"flags":{"type":"object","properties":{"needsHuman":{"type":"boolean"},"sandbox":{"type":"boolean"},"priority":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["needsHuman","sandbox","priority"],"additionalProperties":{}},"linkedItemId":{"type":["string","null"]},"createdAt":{"type":"string","description":"ISO 8601 instant"},"updatedAt":{"type":"string","description":"ISO 8601 instant"},"closedAt":{"anyOf":[{"type":"string","description":"ISO 8601 instant"},{"type":"null"}]},"payload":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["id","type","state","version","partyId","locationId","channel","subject","flags","linkedItemId","createdAt","updatedAt","closedAt","payload"],"additionalProperties":{}},"transitions":{"type":"array","items":{"type":"object","properties":{"event":{"type":"string"},"label":{"type":"string"}},"required":["event","label"]}},"human":{"type":"string"},"party":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":["string","null"]},"kind":{"type":"string"},"email":{"type":"string"},"phone":{"type":"string"},"verified":{"type":"boolean"}},"required":["id","name","kind","verified"],"additionalProperties":{}},"receipts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string"}},"required":["id","kind"],"additionalProperties":{}}},"identity":{"description":"On the status door: who the inbox takes the customer for.","type":"object","properties":{},"additionalProperties":{}}},"required":["item","transitions","human"],"additionalProperties":{}},"accessToken":{"description":"Shown once, to an anonymous creator: keep it to read or cancel the item.","type":"string"},"replayed":{"type":"boolean"},"identity":{"type":"object","properties":{"recognised":{"type":"string","enum":["strong","weak","none"],"description":"strong: a customer the business knows, proven; weak: same email or phone, not proven; none."},"passes":{"type":"array","items":{"type":"object","properties":{"network":{"type":"string"},"pass":{"type":"string"}},"required":["network","pass"]},"description":"Passes to keep for the person, one per network: present them next time (pass or Sdi-Pass)."},"verify":{"type":"object","properties":{"available":{"type":"boolean","description":"A one-time code can prove the customer: POST /v1/customers/verify."},"sent_to":{"description":"The masked address a code went to.","type":["string","null"]}},"required":["available","sent_to"]},"networks":{"type":"array","items":{"type":"object","properties":{"network":{"type":"string"},"state":{"type":"string"}},"required":["network","state"]}},"guide":{"type":"string","description":"How an agent identifies itself and its person: https://surfingdog.ai/for-agents.md"}},"required":["recognised","passes","verify","networks","guide"],"additionalProperties":{}}},"required":["view","replayed"]}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"422":{"description":"Invalid input: the problem document names the fields to fix."}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"payload":{"type":"object","properties":{"itemOffered":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"sku":{"type":"string","maxLength":100},"serviceId":{"type":"string"},"productId":{"type":"string"}},"required":["name"]},"quantity":{"type":"integer","minimum":1,"maximum":9007199254740991},"description":{"type":"string","minLength":1,"maxLength":5000},"budget":{"type":"object","properties":{"value":{"type":"integer","minimum":0,"maximum":9007199254740991},"currency":{"type":"string","minLength":3,"maxLength":3}},"required":["value","currency"]},"requestedFor":{"type":"string","format":"date-time","pattern":"^(?:(?:\\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)))$"},"deliveryAddress":{"type":"object","properties":{"streetAddress":{"type":"string","maxLength":200},"addressLocality":{"type":"string","maxLength":100},"addressRegion":{"type":"string","maxLength":100},"postalCode":{"type":"string","maxLength":20},"addressCountry":{"type":"string","minLength":2,"maxLength":2}}}},"required":["itemOffered","description"]},"contact":{"type":"object","properties":{"name":{"type":"string","maxLength":200},"email":{"type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"phone":{"type":"string","maxLength":40},"locale":{"type":"string","maxLength":12}}},"message":{"type":"string","maxLength":20000},"idempotency_key":{"description":"Same key + same request = same answer. Required for agents.","type":"string","minLength":1,"maxLength":200},"pass":{"description":"The person's passes (sdpass1_…), space-separated, at most 8: presented to the network that issued each, so the business recognises the customer. Or send them in the Sdi-Pass header. Never stored.","type":"string","maxLength":1608},"key":{"description":"The person's key (sdkey1_…), if that is all you have: it is exchanged once for a pass, which comes back in identity.passes — keep the pass and send it next time instead. Never stored.","type":"string","maxLength":200}},"required":["payload"]}}}}}},"/v1/bookings":{"post":{"operationId":"postV1Bookings","tags":["public"],"summary":"Request a booking","responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","properties":{"view":{"type":"object","properties":{"item":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["message","quote_request","booking","order","refund"]},"state":{"type":"string"},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"partyId":{"type":"string"},"locationId":{"type":["string","null"]},"channel":{"type":"string"},"subject":{"type":["string","null"]},"flags":{"type":"object","properties":{"needsHuman":{"type":"boolean"},"sandbox":{"type":"boolean"},"priority":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["needsHuman","sandbox","priority"],"additionalProperties":{}},"linkedItemId":{"type":["string","null"]},"createdAt":{"type":"string","description":"ISO 8601 instant"},"updatedAt":{"type":"string","description":"ISO 8601 instant"},"closedAt":{"anyOf":[{"type":"string","description":"ISO 8601 instant"},{"type":"null"}]},"payload":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["id","type","state","version","partyId","locationId","channel","subject","flags","linkedItemId","createdAt","updatedAt","closedAt","payload"],"additionalProperties":{}},"transitions":{"type":"array","items":{"type":"object","properties":{"event":{"type":"string"},"label":{"type":"string"}},"required":["event","label"]}},"human":{"type":"string"},"party":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":["string","null"]},"kind":{"type":"string"},"email":{"type":"string"},"phone":{"type":"string"},"verified":{"type":"boolean"}},"required":["id","name","kind","verified"],"additionalProperties":{}},"receipts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string"}},"required":["id","kind"],"additionalProperties":{}}},"identity":{"description":"On the status door: who the inbox takes the customer for.","type":"object","properties":{},"additionalProperties":{}}},"required":["item","transitions","human"],"additionalProperties":{}},"accessToken":{"description":"Shown once, to an anonymous creator: keep it to read or cancel the item.","type":"string"},"replayed":{"type":"boolean"},"identity":{"type":"object","properties":{"recognised":{"type":"string","enum":["strong","weak","none"],"description":"strong: a customer the business knows, proven; weak: same email or phone, not proven; none."},"passes":{"type":"array","items":{"type":"object","properties":{"network":{"type":"string"},"pass":{"type":"string"}},"required":["network","pass"]},"description":"Passes to keep for the person, one per network: present them next time (pass or Sdi-Pass)."},"verify":{"type":"object","properties":{"available":{"type":"boolean","description":"A one-time code can prove the customer: POST /v1/customers/verify."},"sent_to":{"description":"The masked address a code went to.","type":["string","null"]}},"required":["available","sent_to"]},"networks":{"type":"array","items":{"type":"object","properties":{"network":{"type":"string"},"state":{"type":"string"}},"required":["network","state"]}},"guide":{"type":"string","description":"How an agent identifies itself and its person: https://surfingdog.ai/for-agents.md"}},"required":["recognised","passes","verify","networks","guide"],"additionalProperties":{}}},"required":["view","replayed"]}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"422":{"description":"Invalid input: the problem document names the fields to fix."}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"payload":{"type":"object","properties":{"reservationFor":{"type":"object","properties":{"serviceId":{"type":"string","minLength":1},"name":{"type":"string","minLength":1,"maxLength":200}},"required":["serviceId","name"]},"startTime":{"type":"string","format":"date-time","pattern":"^(?:(?:\\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)))$"},"endTime":{"type":"string","format":"date-time","pattern":"^(?:(?:\\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)))$"},"partySize":{"type":"integer","minimum":1,"maximum":1000},"totalPrice":{"type":"object","properties":{"value":{"type":"integer","minimum":0,"maximum":9007199254740991},"currency":{"type":"string","minLength":3,"maxLength":3}},"required":["value","currency"]},"resourceId":{"type":"string"},"notes":{"type":"string","maxLength":5000}},"required":["reservationFor","startTime","endTime"]},"contact":{"type":"object","properties":{"name":{"type":"string","maxLength":200},"email":{"type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"phone":{"type":"string","maxLength":40},"locale":{"type":"string","maxLength":12}}},"message":{"type":"string","maxLength":20000},"idempotency_key":{"description":"Same key + same request = same answer. Required for agents.","type":"string","minLength":1,"maxLength":200},"pass":{"description":"The person's passes (sdpass1_…), space-separated, at most 8: presented to the network that issued each, so the business recognises the customer. Or send them in the Sdi-Pass header. Never stored.","type":"string","maxLength":1608},"key":{"description":"The person's key (sdkey1_…), if that is all you have: it is exchanged once for a pass, which comes back in identity.passes — keep the pass and send it next time instead. Never stored.","type":"string","maxLength":200}},"required":["payload"]}}}}}},"/v1/orders":{"post":{"operationId":"postV1Orders","tags":["public"],"summary":"Place an order","responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","properties":{"view":{"type":"object","properties":{"item":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["message","quote_request","booking","order","refund"]},"state":{"type":"string"},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"partyId":{"type":"string"},"locationId":{"type":["string","null"]},"channel":{"type":"string"},"subject":{"type":["string","null"]},"flags":{"type":"object","properties":{"needsHuman":{"type":"boolean"},"sandbox":{"type":"boolean"},"priority":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["needsHuman","sandbox","priority"],"additionalProperties":{}},"linkedItemId":{"type":["string","null"]},"createdAt":{"type":"string","description":"ISO 8601 instant"},"updatedAt":{"type":"string","description":"ISO 8601 instant"},"closedAt":{"anyOf":[{"type":"string","description":"ISO 8601 instant"},{"type":"null"}]},"payload":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["id","type","state","version","partyId","locationId","channel","subject","flags","linkedItemId","createdAt","updatedAt","closedAt","payload"],"additionalProperties":{}},"transitions":{"type":"array","items":{"type":"object","properties":{"event":{"type":"string"},"label":{"type":"string"}},"required":["event","label"]}},"human":{"type":"string"},"party":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":["string","null"]},"kind":{"type":"string"},"email":{"type":"string"},"phone":{"type":"string"},"verified":{"type":"boolean"}},"required":["id","name","kind","verified"],"additionalProperties":{}},"receipts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string"}},"required":["id","kind"],"additionalProperties":{}}},"identity":{"description":"On the status door: who the inbox takes the customer for.","type":"object","properties":{},"additionalProperties":{}}},"required":["item","transitions","human"],"additionalProperties":{}},"accessToken":{"description":"Shown once, to an anonymous creator: keep it to read or cancel the item.","type":"string"},"replayed":{"type":"boolean"},"identity":{"type":"object","properties":{"recognised":{"type":"string","enum":["strong","weak","none"],"description":"strong: a customer the business knows, proven; weak: same email or phone, not proven; none."},"passes":{"type":"array","items":{"type":"object","properties":{"network":{"type":"string"},"pass":{"type":"string"}},"required":["network","pass"]},"description":"Passes to keep for the person, one per network: present them next time (pass or Sdi-Pass)."},"verify":{"type":"object","properties":{"available":{"type":"boolean","description":"A one-time code can prove the customer: POST /v1/customers/verify."},"sent_to":{"description":"The masked address a code went to.","type":["string","null"]}},"required":["available","sent_to"]},"networks":{"type":"array","items":{"type":"object","properties":{"network":{"type":"string"},"state":{"type":"string"}},"required":["network","state"]}},"guide":{"type":"string","description":"How an agent identifies itself and its person: https://surfingdog.ai/for-agents.md"}},"required":["recognised","passes","verify","networks","guide"],"additionalProperties":{}}},"required":["view","replayed"]}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"422":{"description":"Invalid input: the problem document names the fields to fix."}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"payload":{"type":"object","properties":{"orderedItem":{"minItems":1,"maxItems":200,"type":"array","items":{"type":"object","properties":{"productId":{"type":"string"},"sku":{"type":"string","maxLength":100},"name":{"type":"string","minLength":1,"maxLength":200},"quantity":{"type":"integer","minimum":1,"maximum":9007199254740991},"price":{"type":"object","properties":{"value":{"type":"integer","minimum":0,"maximum":9007199254740991},"currency":{"type":"string","minLength":3,"maxLength":3}},"required":["value","currency"]}},"required":["name","quantity","price"]}},"totalPrice":{"type":"object","properties":{"value":{"type":"integer","minimum":0,"maximum":9007199254740991},"currency":{"type":"string","minLength":3,"maxLength":3}},"required":["value","currency"]},"billingAddress":{"type":"object","properties":{"streetAddress":{"type":"string","maxLength":200},"addressLocality":{"type":"string","maxLength":100},"addressRegion":{"type":"string","maxLength":100},"postalCode":{"type":"string","maxLength":20},"addressCountry":{"type":"string","minLength":2,"maxLength":2}}},"shippingAddress":{"type":"object","properties":{"streetAddress":{"type":"string","maxLength":200},"addressLocality":{"type":"string","maxLength":100},"addressRegion":{"type":"string","maxLength":100},"postalCode":{"type":"string","maxLength":20},"addressCountry":{"type":"string","minLength":2,"maxLength":2}}},"delivery":{"type":"object","properties":{"method":{"type":"string","enum":["pickup","delivery","digital"]},"when":{"type":"string","format":"date-time","pattern":"^(?:(?:\\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)))$"}},"required":["method"]},"paymentMethod":{"type":"string","maxLength":60},"notes":{"type":"string","maxLength":5000}},"required":["orderedItem","totalPrice"]},"contact":{"type":"object","properties":{"name":{"type":"string","maxLength":200},"email":{"type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"phone":{"type":"string","maxLength":40},"locale":{"type":"string","maxLength":12}}},"message":{"type":"string","maxLength":20000},"idempotency_key":{"description":"Same key + same request = same answer. Required for agents.","type":"string","minLength":1,"maxLength":200},"pass":{"description":"The person's passes (sdpass1_…), space-separated, at most 8: presented to the network that issued each, so the business recognises the customer. Or send them in the Sdi-Pass header. Never stored.","type":"string","maxLength":1608},"key":{"description":"The person's key (sdkey1_…), if that is all you have: it is exchanged once for a pass, which comes back in identity.passes — keep the pass and send it next time instead. Never stored.","type":"string","maxLength":200}},"required":["payload"]}}}}}},"/v1/items/{id}":{"get":{"operationId":"getV1ItemsById","tags":["public"],"summary":"Status of your item","responses":{"200":{"description":"Item","content":{"application/json":{"schema":{"type":"object","properties":{"item":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["message","quote_request","booking","order","refund"]},"state":{"type":"string"},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"partyId":{"type":"string"},"locationId":{"type":["string","null"]},"channel":{"type":"string"},"subject":{"type":["string","null"]},"flags":{"type":"object","properties":{"needsHuman":{"type":"boolean"},"sandbox":{"type":"boolean"},"priority":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["needsHuman","sandbox","priority"],"additionalProperties":{}},"linkedItemId":{"type":["string","null"]},"createdAt":{"type":"string","description":"ISO 8601 instant"},"updatedAt":{"type":"string","description":"ISO 8601 instant"},"closedAt":{"anyOf":[{"type":"string","description":"ISO 8601 instant"},{"type":"null"}]},"payload":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["id","type","state","version","partyId","locationId","channel","subject","flags","linkedItemId","createdAt","updatedAt","closedAt","payload"],"additionalProperties":{}},"transitions":{"type":"array","items":{"type":"object","properties":{"event":{"type":"string"},"label":{"type":"string"}},"required":["event","label"]}},"human":{"type":"string"},"party":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":["string","null"]},"kind":{"type":"string"},"email":{"type":"string"},"phone":{"type":"string"},"verified":{"type":"boolean"}},"required":["id","name","kind","verified"],"additionalProperties":{}},"receipts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string"}},"required":["id","kind"],"additionalProperties":{}}},"identity":{"description":"On the status door: who the inbox takes the customer for.","type":"object","properties":{},"additionalProperties":{}}},"required":["item","transitions","human"],"additionalProperties":{}}}}},"422":{"description":"Invalid input: the problem document names the fields to fix."}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}]}},"/v1/items/{id}/cancel":{"post":{"operationId":"postV1ItemsByIdCancel","tags":["public"],"summary":"Cancel your item","responses":{"200":{"description":"Item","content":{"application/json":{"schema":{"type":"object","properties":{"view":{"type":"object","properties":{"item":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["message","quote_request","booking","order","refund"]},"state":{"type":"string"},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"partyId":{"type":"string"},"locationId":{"type":["string","null"]},"channel":{"type":"string"},"subject":{"type":["string","null"]},"flags":{"type":"object","properties":{"needsHuman":{"type":"boolean"},"sandbox":{"type":"boolean"},"priority":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["needsHuman","sandbox","priority"],"additionalProperties":{}},"linkedItemId":{"type":["string","null"]},"createdAt":{"type":"string","description":"ISO 8601 instant"},"updatedAt":{"type":"string","description":"ISO 8601 instant"},"closedAt":{"anyOf":[{"type":"string","description":"ISO 8601 instant"},{"type":"null"}]},"payload":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["id","type","state","version","partyId","locationId","channel","subject","flags","linkedItemId","createdAt","updatedAt","closedAt","payload"],"additionalProperties":{}},"transitions":{"type":"array","items":{"type":"object","properties":{"event":{"type":"string"},"label":{"type":"string"}},"required":["event","label"]}},"human":{"type":"string"},"party":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":["string","null"]},"kind":{"type":"string"},"email":{"type":"string"},"phone":{"type":"string"},"verified":{"type":"boolean"}},"required":["id","name","kind","verified"],"additionalProperties":{}},"receipts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string"}},"required":["id","kind"],"additionalProperties":{}}},"identity":{"description":"On the status door: who the inbox takes the customer for.","type":"object","properties":{},"additionalProperties":{}}},"required":["item","transitions","human"],"additionalProperties":{}},"linked":{"type":"object","properties":{"item":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["message","quote_request","booking","order","refund"]},"state":{"type":"string"},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"partyId":{"type":"string"},"locationId":{"type":["string","null"]},"channel":{"type":"string"},"subject":{"type":["string","null"]},"flags":{"type":"object","properties":{"needsHuman":{"type":"boolean"},"sandbox":{"type":"boolean"},"priority":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["needsHuman","sandbox","priority"],"additionalProperties":{}},"linkedItemId":{"type":["string","null"]},"createdAt":{"type":"string","description":"ISO 8601 instant"},"updatedAt":{"type":"string","description":"ISO 8601 instant"},"closedAt":{"anyOf":[{"type":"string","description":"ISO 8601 instant"},{"type":"null"}]},"payload":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["id","type","state","version","partyId","locationId","channel","subject","flags","linkedItemId","createdAt","updatedAt","closedAt","payload"],"additionalProperties":{}},"transitions":{"type":"array","items":{"type":"object","properties":{"event":{"type":"string"},"label":{"type":"string"}},"required":["event","label"]}},"human":{"type":"string"},"party":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":["string","null"]},"kind":{"type":"string"},"email":{"type":"string"},"phone":{"type":"string"},"verified":{"type":"boolean"}},"required":["id","name","kind","verified"],"additionalProperties":{}},"receipts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string"}},"required":["id","kind"],"additionalProperties":{}}},"identity":{"description":"On the status door: who the inbox takes the customer for.","type":"object","properties":{},"additionalProperties":{}}},"required":["item","transitions","human"],"additionalProperties":{}},"replayed":{"type":"boolean"}},"required":["view","replayed"]}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"422":{"description":"Invalid input: the problem document names the fields to fix."}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","maxLength":2000},"access_token":{"description":"Capability secret returned when the item was created without an account.","type":"string","minLength":16,"maxLength":200},"idempotency_key":{"description":"Same key + same request = same answer. Required for agents.","type":"string","minLength":1,"maxLength":200},"pass":{"description":"The person's passes (sdpass1_…), space-separated, at most 8: presented to the network that issued each, so the business recognises the customer. Or send them in the Sdi-Pass header. Never stored.","type":"string","maxLength":1608},"key":{"description":"The person's key (sdkey1_…), if that is all you have: it is exchanged once for a pass, which comes back in identity.passes — keep the pass and send it next time instead. Never stored.","type":"string","maxLength":200}}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}]}},"/v1/messages":{"post":{"operationId":"postV1Messages","tags":["public"],"summary":"Send a message, or reply on your item","responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","properties":{"view":{"type":"object","properties":{"item":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["message","quote_request","booking","order","refund"]},"state":{"type":"string"},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"partyId":{"type":"string"},"locationId":{"type":["string","null"]},"channel":{"type":"string"},"subject":{"type":["string","null"]},"flags":{"type":"object","properties":{"needsHuman":{"type":"boolean"},"sandbox":{"type":"boolean"},"priority":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["needsHuman","sandbox","priority"],"additionalProperties":{}},"linkedItemId":{"type":["string","null"]},"createdAt":{"type":"string","description":"ISO 8601 instant"},"updatedAt":{"type":"string","description":"ISO 8601 instant"},"closedAt":{"anyOf":[{"type":"string","description":"ISO 8601 instant"},{"type":"null"}]},"payload":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["id","type","state","version","partyId","locationId","channel","subject","flags","linkedItemId","createdAt","updatedAt","closedAt","payload"],"additionalProperties":{}},"transitions":{"type":"array","items":{"type":"object","properties":{"event":{"type":"string"},"label":{"type":"string"}},"required":["event","label"]}},"human":{"type":"string"},"party":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":["string","null"]},"kind":{"type":"string"},"email":{"type":"string"},"phone":{"type":"string"},"verified":{"type":"boolean"}},"required":["id","name","kind","verified"],"additionalProperties":{}},"receipts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string"}},"required":["id","kind"],"additionalProperties":{}}},"identity":{"description":"On the status door: who the inbox takes the customer for.","type":"object","properties":{},"additionalProperties":{}}},"required":["item","transitions","human"],"additionalProperties":{}},"accessToken":{"description":"Shown once, to an anonymous creator: keep it to read or cancel the item.","type":"string"},"replayed":{"type":"boolean"},"identity":{"type":"object","properties":{"recognised":{"type":"string","enum":["strong","weak","none"],"description":"strong: a customer the business knows, proven; weak: same email or phone, not proven; none."},"passes":{"type":"array","items":{"type":"object","properties":{"network":{"type":"string"},"pass":{"type":"string"}},"required":["network","pass"]},"description":"Passes to keep for the person, one per network: present them next time (pass or Sdi-Pass)."},"verify":{"type":"object","properties":{"available":{"type":"boolean","description":"A one-time code can prove the customer: POST /v1/customers/verify."},"sent_to":{"description":"The masked address a code went to.","type":["string","null"]}},"required":["available","sent_to"]},"networks":{"type":"array","items":{"type":"object","properties":{"network":{"type":"string"},"state":{"type":"string"}},"required":["network","state"]}},"guide":{"type":"string","description":"How an agent identifies itself and its person: https://surfingdog.ai/for-agents.md"}},"required":["recognised","passes","verify","networks","guide"],"additionalProperties":{}}},"required":["view","replayed"]}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"422":{"description":"Invalid input: the problem document names the fields to fix."}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"item_id":{"description":"Reply on an existing item; omit to start a new conversation.","type":"string","minLength":1},"subject":{"type":"string","maxLength":500},"body":{"type":"string","minLength":1,"maxLength":20000},"contact":{"type":"object","properties":{"name":{"type":"string","maxLength":200},"email":{"type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"phone":{"type":"string","maxLength":40},"locale":{"type":"string","maxLength":12}}},"message_id":{"type":"string","minLength":1,"maxLength":998},"access_token":{"description":"Capability secret returned when the item was created without an account.","type":"string","minLength":16,"maxLength":200},"idempotency_key":{"description":"Same key + same request = same answer. Required for agents.","type":"string","minLength":1,"maxLength":200},"pass":{"description":"The person's passes (sdpass1_…), space-separated, at most 8: presented to the network that issued each, so the business recognises the customer. Or send them in the Sdi-Pass header. Never stored.","type":"string","maxLength":1608},"key":{"description":"The person's key (sdkey1_…), if that is all you have: it is exchanged once for a pass, which comes back in identity.passes — keep the pass and send it next time instead. Never stored.","type":"string","maxLength":200}},"required":["body"]}}}}}},"/v1/customers/verify":{"post":{"operationId":"postV1CustomersVerify","tags":["public"],"summary":"Prove you are a customer the business knows (one-time code)","description":"When an item's identity says recognised: weak, the customer gave the email of someone the business knows. Send {item_id, access_token} to have six digits emailed to that address (202 {sent_to}); send them back with code to be recognised (200 {recognised: strong}). 409 nothing_to_verify or already_verified; 422 bad_code or code_expired; 429 too_many_attempts.","responses":{"200":{"description":"Recognised","content":{"application/json":{"schema":{"type":"object","properties":{"recognised":{"type":"string","const":"strong"}},"required":["recognised"]}}}},"202":{"description":"Code sent","content":{"application/json":{"schema":{"type":"object","properties":{"sent_to":{"type":"string","description":"The masked address, like a•••@e•••.pt."}},"required":["sent_to"]}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"409":{"description":"Nothing to verify, or already verified."},"422":{"description":"Wrong or expired code, or invalid input."},"429":{"description":"Too many attempts or codes."}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"item_id":{"type":"string","minLength":1},"access_token":{"description":"Capability secret returned when the item was created without an account.","type":"string","minLength":16,"maxLength":200},"code":{"description":"The six digits the customer received. Omit to have them sent.","type":"string","pattern":"^[0-9]{6}$"}},"required":["item_id"]}}}}}},"/v1/items/{id}/receipt-ack":{"post":{"operationId":"postV1ItemsByIdReceiptAck","tags":["public"],"summary":"Counter-sign a receipt on your item","description":"Send a compact JWS signed with your agent's Ed25519 key: header {alg:'EdDSA', typ:'sdi-receipt-ack+jws', jwk:<public jwk>}, payload {rcp:<receipt id>, sha:<base64url(SHA-256(receipt jws))>, iat:<unix seconds>}. The receipt ids are on GET /items/{id}.","responses":{"200":{"description":"Receipt","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string"}},"required":["id","kind"],"additionalProperties":{}}}}},"400":{"description":"Validation Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"array","items":{}},"data":{}},"required":["success","error","data"]}}}},"422":{"description":"Invalid input: the problem document names the fields to fix."}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"counter_signature":{"description":"A compact JWS by the customer's agent, EdDSA, header carrying its Ed25519 public `jwk`, payload `{\"rcp\": \"<receipt id>\", \"sha\": \"<base64url(SHA-256(receipt JWS))>\", \"iat\": <unix seconds>}`. Or, for an agent that signs its requests instead (sdi-agent/1) and carries a pass reference, `receipt_id` alone.","type":"string","minLength":1,"maxLength":8192},"receipt_id":{"description":"The receipt to acknowledge, for an agent that signs this request (sdi-agent/1) with a key delegated to the pass reference it sends: the inbox forwards the signature to the network (ADR-017 §3.4). Send this or counter_signature.","type":"string","minLength":1,"maxLength":64},"receipt":{"description":"The receipt JWS being acknowledged, if you want the instance to check it is the one it holds.","type":"string","minLength":1,"maxLength":8192},"access_token":{"description":"Capability secret returned when the item was created without an account.","type":"string","minLength":16,"maxLength":200},"pass":{"description":"The person's passes (sdpass1_…), space-separated, at most 8: presented to the network that issued each, so the business recognises the customer. Or send them in the Sdi-Pass header. Never stored.","type":"string","maxLength":1608},"key":{"description":"The person's key (sdkey1_…), if that is all you have: it is exchanged once for a pass, which comes back in identity.passes — keep the pass and send it next time instead. Never stored.","type":"string","maxLength":200}}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}]}}}}