{"openapi":"3.1.0","info":{"title":"Bookline API","description":"Bookline's public API. Every request carries the key in the `apikey` header. Responses carry `X-RateLimit-*` headers; a 429 or 503 carries `Retry-After`. Errors are `{\"error\": {\"code\", \"message\"}}`.","version":"v1"},"paths":{"/v1/metrics/summary":{"get":{"tags":["metrics"],"summary":"Calls, booking intents, bookings and their value","description":"Value fields (`estimated_value`, `roi`, ...) are in `currency`; `cost` is in `cost_currency`.","operationId":"metrics_summary_v1_metrics_summary_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"customer_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The key's own customer. Optional: a customer key always reads its own customer and cannot name another.","title":"Customer Id"},"description":"The key's own customer. Optional: a customer key always reads its own customer and cannot name another."},{"name":"from","in":"query","required":true,"schema":{"type":"string","format":"date","description":"First day of the window (inclusive), in `timezone`.","title":"From"},"description":"First day of the window (inclusive), in `timezone`."},{"name":"to","in":"query","required":true,"schema":{"type":"string","format":"date","description":"Last day of the window (inclusive), in `timezone`.","title":"To"},"description":"Last day of the window (inclusive), in `timezone`."},{"name":"granularity","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Granularity","description":"`total` for the window's totals; `day` adds `days[]`.","default":"total"},"description":"`total` for the window's totals; `day` adds `days[]`."},{"name":"timezone","in":"query","required":false,"schema":{"type":"string","description":"IANA zone the days are cut in. Must have a whole-hour UTC offset over the window.","default":"UTC","title":"Timezone"},"description":"IANA zone the days are cut in. Must have a whole-hour UTC offset over the window."},{"name":"venue_ids","in":"query","required":false,"schema":{"type":"array","items":{"type":"string","format":"uuid"},"maxItems":100,"description":"Only these venues (see `GET /v1/venues`). Repeat the parameter for several.","title":"Venue Ids"},"description":"Only these venues (see `GET /v1/venues`). Repeat the parameter for several."},{"name":"industry","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/PublicIndustry"},{"type":"null"}],"description":"Required only when the customer has both restaurant and lodging bots.","title":"Industry"},"description":"Required only when the customer has both restaurant and lodging bots."},{"name":"channels","in":"query","required":false,"schema":{"type":"array","items":{"$ref":"#/components/schemas/PublicChannel"},"description":"Only these channels. Repeat the parameter for several.","title":"Channels"},"description":"Only these channels. Repeat the parameter for several."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummaryResponse"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Not Found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Too Many Requests"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Bad Gateway"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Service Unavailable"},"504":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Gateway Timeout"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/metrics/conversion-funnel":{"get":{"tags":["metrics"],"summary":"Sessions at each stage of the booking funnel","description":"With `granularity=day`, `data.days[]` holds one entry per day with the additive fields only; the rest are in `data.total`.","operationId":"metrics_conversion_funnel_v1_metrics_conversion_funnel_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"customer_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The key's own customer. Optional: a customer key always reads its own customer and cannot name another.","title":"Customer Id"},"description":"The key's own customer. Optional: a customer key always reads its own customer and cannot name another."},{"name":"from","in":"query","required":true,"schema":{"type":"string","format":"date","description":"First day of the window (inclusive), in `timezone`.","title":"From"},"description":"First day of the window (inclusive), in `timezone`."},{"name":"to","in":"query","required":true,"schema":{"type":"string","format":"date","description":"Last day of the window (inclusive), in `timezone`.","title":"To"},"description":"Last day of the window (inclusive), in `timezone`."},{"name":"granularity","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Granularity","description":"`total` for the window's totals; `day` adds `days[]`.","default":"total"},"description":"`total` for the window's totals; `day` adds `days[]`."},{"name":"timezone","in":"query","required":false,"schema":{"type":"string","description":"IANA zone the days are cut in. Must have a whole-hour UTC offset over the window.","default":"UTC","title":"Timezone"},"description":"IANA zone the days are cut in. Must have a whole-hour UTC offset over the window."},{"name":"venue_ids","in":"query","required":false,"schema":{"type":"array","items":{"type":"string","format":"uuid"},"maxItems":100,"description":"Only these venues (see `GET /v1/venues`). Repeat the parameter for several.","title":"Venue Ids"},"description":"Only these venues (see `GET /v1/venues`). Repeat the parameter for several."},{"name":"industry","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/PublicIndustry"},{"type":"null"}],"description":"Required only when the customer has both restaurant and lodging bots.","title":"Industry"},"description":"Required only when the customer has both restaurant and lodging bots."},{"name":"channels","in":"query","required":false,"schema":{"type":"array","items":{"$ref":"#/components/schemas/PublicChannel"},"description":"Only these channels. Repeat the parameter for several.","title":"Channels"},"description":"Only these channels. Repeat the parameter for several."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FunnelResponse"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Not Found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Too Many Requests"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Bad Gateway"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Service Unavailable"},"504":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Gateway Timeout"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/metrics/calls-breakdown":{"get":{"tags":["metrics"],"summary":"Calls by reason, language and country","description":"With `granularity=day`, `data.days[]` holds one entry per day with the additive fields only; the rest are in `data.total`.","operationId":"metrics_calls_breakdown_v1_metrics_calls_breakdown_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"customer_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The key's own customer. Optional: a customer key always reads its own customer and cannot name another.","title":"Customer Id"},"description":"The key's own customer. Optional: a customer key always reads its own customer and cannot name another."},{"name":"from","in":"query","required":true,"schema":{"type":"string","format":"date","description":"First day of the window (inclusive), in `timezone`.","title":"From"},"description":"First day of the window (inclusive), in `timezone`."},{"name":"to","in":"query","required":true,"schema":{"type":"string","format":"date","description":"Last day of the window (inclusive), in `timezone`.","title":"To"},"description":"Last day of the window (inclusive), in `timezone`."},{"name":"granularity","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Granularity","description":"`total` for the window's totals; `day` adds `days[]`.","default":"total"},"description":"`total` for the window's totals; `day` adds `days[]`."},{"name":"timezone","in":"query","required":false,"schema":{"type":"string","description":"IANA zone the days are cut in. Must have a whole-hour UTC offset over the window.","default":"UTC","title":"Timezone"},"description":"IANA zone the days are cut in. Must have a whole-hour UTC offset over the window."},{"name":"venue_ids","in":"query","required":false,"schema":{"type":"array","items":{"type":"string","format":"uuid"},"maxItems":100,"description":"Only these venues (see `GET /v1/venues`). Repeat the parameter for several.","title":"Venue Ids"},"description":"Only these venues (see `GET /v1/venues`). Repeat the parameter for several."},{"name":"industry","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/PublicIndustry"},{"type":"null"}],"description":"Required only when the customer has both restaurant and lodging bots.","title":"Industry"},"description":"Required only when the customer has both restaurant and lodging bots."},{"name":"channels","in":"query","required":false,"schema":{"type":"array","items":{"$ref":"#/components/schemas/PublicChannel"},"description":"Only these channels. Repeat the parameter for several.","title":"Channels"},"description":"Only these channels. Repeat the parameter for several."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallsBreakdownResponse"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Not Found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Too Many Requests"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Bad Gateway"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Service Unavailable"},"504":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Gateway Timeout"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/metrics/reservations":{"get":{"tags":["metrics"],"summary":"Reservations and diners by reservation day","description":"Days are the reservation's own day at the venue. With `granularity=day`, `data.days[]` holds one entry per day with the additive fields only; the rest are in `data.total`.","operationId":"metrics_reservations_v1_metrics_reservations_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"customer_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The key's own customer. Optional: a customer key always reads its own customer and cannot name another.","title":"Customer Id"},"description":"The key's own customer. Optional: a customer key always reads its own customer and cannot name another."},{"name":"from","in":"query","required":true,"schema":{"type":"string","format":"date","description":"First day of the window (inclusive), in `timezone`.","title":"From"},"description":"First day of the window (inclusive), in `timezone`."},{"name":"to","in":"query","required":true,"schema":{"type":"string","format":"date","description":"Last day of the window (inclusive), in `timezone`.","title":"To"},"description":"Last day of the window (inclusive), in `timezone`."},{"name":"granularity","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Granularity","description":"`total` for the window's totals; `day` adds `days[]`.","default":"total"},"description":"`total` for the window's totals; `day` adds `days[]`."},{"name":"timezone","in":"query","required":false,"schema":{"type":"string","description":"IANA zone the days are cut in. Must have a whole-hour UTC offset over the window.","default":"UTC","title":"Timezone"},"description":"IANA zone the days are cut in. Must have a whole-hour UTC offset over the window."},{"name":"venue_ids","in":"query","required":false,"schema":{"type":"array","items":{"type":"string","format":"uuid"},"maxItems":100,"description":"Only these venues (see `GET /v1/venues`). Repeat the parameter for several.","title":"Venue Ids"},"description":"Only these venues (see `GET /v1/venues`). Repeat the parameter for several."},{"name":"industry","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/PublicIndustry"},{"type":"null"}],"description":"Required only when the customer has both restaurant and lodging bots.","title":"Industry"},"description":"Required only when the customer has both restaurant and lodging bots."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReservationsResponse"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Not Found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Too Many Requests"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Bad Gateway"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Service Unavailable"},"504":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Gateway Timeout"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/metrics/survey-ratings":{"get":{"tags":["metrics"],"summary":"Satisfaction survey answers, one row each","description":"Rows contain the diner's phone number: personal data. Page with `limit` and `meta.next_cursor`.","operationId":"metrics_survey_ratings_v1_metrics_survey_ratings_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"customer_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The key's own customer. Optional: a customer key always reads its own customer and cannot name another.","title":"Customer Id"},"description":"The key's own customer. Optional: a customer key always reads its own customer and cannot name another."},{"name":"from","in":"query","required":true,"schema":{"type":"string","format":"date","description":"First day of the window (inclusive), in `timezone`.","title":"From"},"description":"First day of the window (inclusive), in `timezone`."},{"name":"to","in":"query","required":true,"schema":{"type":"string","format":"date","description":"Last day of the window (inclusive), in `timezone`.","title":"To"},"description":"Last day of the window (inclusive), in `timezone`."},{"name":"granularity","in":"query","required":false,"schema":{"$ref":"#/components/schemas/Granularity","description":"`total` for the window's totals; `day` adds `days[]`.","default":"total"},"description":"`total` for the window's totals; `day` adds `days[]`."},{"name":"timezone","in":"query","required":false,"schema":{"type":"string","description":"IANA zone the days are cut in. Must have a whole-hour UTC offset over the window.","default":"UTC","title":"Timezone"},"description":"IANA zone the days are cut in. Must have a whole-hour UTC offset over the window."},{"name":"venue_ids","in":"query","required":false,"schema":{"type":"array","items":{"type":"string","format":"uuid"},"maxItems":100,"description":"Only these venues (see `GET /v1/venues`). Repeat the parameter for several.","title":"Venue Ids"},"description":"Only these venues (see `GET /v1/venues`). Repeat the parameter for several."},{"name":"industry","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/PublicIndustry"},{"type":"null"}],"description":"Required only when the customer has both restaurant and lodging bots.","title":"Industry"},"description":"Required only when the customer has both restaurant and lodging bots."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":5000,"minimum":1,"description":"Rows per page.","default":500,"title":"Limit"},"description":"Rows per page."},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}],"description":"`meta.next_cursor` of the previous page.","title":"Cursor"},"description":"`meta.next_cursor` of the previous page."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SurveyRatingsResponse"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Not Found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Too Many Requests"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Bad Gateway"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Service Unavailable"},"504":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Gateway Timeout"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/venues":{"get":{"tags":["venues"],"summary":"The customer's venues","description":"Ids to pass as `venue_ids` to the metrics routes.","operationId":"list_venues_v1_venues_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"customer_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The key's own customer. Optional: a customer key always reads its own customer and cannot name another.","title":"Customer Id"},"description":"The key's own customer. Optional: a customer key always reads its own customer and cannot name another."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VenuesResponse"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Not Found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Too Many Requests"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Bad Gateway"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Service Unavailable"},"504":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Gateway Timeout"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/calls":{"get":{"tags":["calls"],"summary":"Calls answered by the customer's agents in a window, newest first","description":"Without their transcript (see `GET /v1/calls/{call_id}`). Personal data: the caller's number. Page with `limit` and `meta.next_cursor`.","operationId":"list_calls_v1_calls_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"customer_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The key's own customer. Optional: a customer key always reads its own customer and cannot name another.","title":"Customer Id"},"description":"The key's own customer. Optional: a customer key always reads its own customer and cannot name another."},{"name":"from","in":"query","required":true,"schema":{"type":"string","format":"date","description":"First day of the window (inclusive), in `timezone`.","title":"From"},"description":"First day of the window (inclusive), in `timezone`."},{"name":"to","in":"query","required":true,"schema":{"type":"string","format":"date","description":"Last day of the window (inclusive), in `timezone`.","title":"To"},"description":"Last day of the window (inclusive), in `timezone`."},{"name":"timezone","in":"query","required":false,"schema":{"type":"string","maxLength":64,"description":"IANA zone the days are cut in, e.g. `Europe/Madrid`.","default":"UTC","title":"Timezone"},"description":"IANA zone the days are cut in, e.g. `Europe/Madrid`."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Items per page.","default":50,"title":"Limit"},"description":"Items per page."},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}],"description":"`meta.next_cursor` of the previous page, for the same query.","title":"Cursor"},"description":"`meta.next_cursor` of the previous page, for the same query."},{"name":"venue_ids","in":"query","required":false,"schema":{"type":"array","items":{"type":"string","format":"uuid"},"maxItems":100,"description":"Only calls answered by the agents of these venues (see `GET /v1/venues`). Repeat the parameter for several.","title":"Venue Ids"},"description":"Only calls answered by the agents of these venues (see `GET /v1/venues`). Repeat the parameter for several."},{"name":"agent_ids","in":"query","required":false,"schema":{"type":"array","items":{"type":"string","minLength":1,"maxLength":128},"maxItems":100,"description":"Only calls answered by these agents. Repeat the parameter for several.","title":"Agent Ids"},"description":"Only calls answered by these agents. Repeat the parameter for several."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallsResponse"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Not Found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Too Many Requests"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Bad Gateway"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Service Unavailable"},"504":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Gateway Timeout"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/calls/{call_id}":{"get":{"tags":["calls"],"summary":"One call with its transcript","description":"Personal data: the caller's number and what they said. A call of another customer is a 404.","operationId":"get_call_v1_calls__call_id__get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"call_id","in":"path","required":true,"schema":{"type":"string","title":"Call Id"}},{"name":"customer_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The key's own customer. Optional: a customer key always reads its own customer and cannot name another.","title":"Customer Id"},"description":"The key's own customer. Optional: a customer key always reads its own customer and cannot name another."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CallDetail"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Not Found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Too Many Requests"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Bad Gateway"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Service Unavailable"},"504":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Gateway Timeout"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/venues/{venue_id}":{"get":{"tags":["venues"],"summary":"One venue: address, contact details and settings","description":"A venue of another customer, or outside a venue-restricted key, is a 404. The `ETag` header is the version to send as `If-Match` when changing it.","operationId":"get_venue_v1_venues__venue_id__get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"venue_id","in":"path","required":true,"schema":{"type":"string","title":"Venue Id"}},{"name":"customer_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The key's own customer. Optional: a customer key always reads its own customer and cannot name another.","title":"Customer Id"},"description":"The key's own customer. Optional: a customer key always reads its own customer and cannot name another."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VenueDetail"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Not Found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Too Many Requests"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Bad Gateway"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Service Unavailable"},"504":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Gateway Timeout"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["venues"],"summary":"Change a venue's name, website or contact details","description":"Only the fields sent change. Send the `ETag` of `GET /v1/venues/{venue_id}` as `If-Match`: a venue changed since is a 412. A change the venue's references do not allow is a 409: a booking integration since deleted, or contact details without the email one of the venue's agents reads. Answers the venue as stored, with its new `ETag`.","operationId":"update_venue_v1_venues__venue_id__patch","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"venue_id","in":"path","required":true,"schema":{"type":"string","title":"Venue Id"}},{"name":"customer_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The key's own customer. Optional: a customer key always reads its own customer and cannot name another.","title":"Customer Id"},"description":"The key's own customer. Optional: a customer key always reads its own customer and cannot name another."},{"name":"If-Match","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Required. The `ETag` of the resource as you read it.","title":"If-Match"},"description":"Required. The `ETag` of the resource as you read it."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VenueDetail"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Not Found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Too Many Requests"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Bad Gateway"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Service Unavailable"},"504":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Gateway Timeout"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Conflict"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Request Entity Too Large"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Unprocessable Entity"},"412":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Precondition Failed"},"428":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Precondition Required"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VenueUpdate"}}}}}},"/v1/agents":{"get":{"tags":["bots"],"summary":"The customer's agents","description":"Ids to pass as `agent_ids` to the calls routes. Page with `limit` and `meta.next_cursor`.","operationId":"list_agents_v1_agents_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"customer_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The key's own customer. Optional: a customer key always reads its own customer and cannot name another.","title":"Customer Id"},"description":"The key's own customer. Optional: a customer key always reads its own customer and cannot name another."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Items per page.","default":50,"title":"Limit"},"description":"Items per page."},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}],"description":"`meta.next_cursor` of the previous page, for the same query.","title":"Cursor"},"description":"`meta.next_cursor` of the previous page, for the same query."},{"name":"venue_ids","in":"query","required":false,"schema":{"type":"array","items":{"type":"string","format":"uuid"},"maxItems":100,"description":"Only the agents of these venues (see `GET /v1/venues`). Repeat the parameter for several.","title":"Venue Ids"},"description":"Only the agents of these venues (see `GET /v1/venues`). Repeat the parameter for several."},{"name":"agent_ids","in":"query","required":false,"schema":{"type":"array","items":{"type":"string","minLength":1,"maxLength":128},"maxItems":100,"description":"Only these agents. Repeat the parameter for several.","title":"Agent Ids"},"description":"Only these agents. Repeat the parameter for several."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentsResponse"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Not Found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Too Many Requests"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Bad Gateway"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Service Unavailable"},"504":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Gateway Timeout"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/agents/{agent_id}":{"get":{"tags":["bots"],"summary":"One agent","description":"An agent of another customer, or outside a venue-restricted key, is a 404. The `ETag` header is the version to send as `If-Match` when changing it.","operationId":"get_agent_v1_agents__agent_id__get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}},{"name":"customer_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The key's own customer. Optional: a customer key always reads its own customer and cannot name another.","title":"Customer Id"},"description":"The key's own customer. Optional: a customer key always reads its own customer and cannot name another."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Agent"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Not Found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Too Many Requests"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Bad Gateway"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Service Unavailable"},"504":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Gateway Timeout"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["bots"],"summary":"Rename an agent","description":"Changes the agent's display name only. Send the `ETag` of `GET /v1/agents/{agent_id}` as `If-Match`: an agent changed since is a 412. Answers the agent as stored, with its new `ETag`.","operationId":"update_agent_v1_agents__agent_id__patch","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}},{"name":"customer_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The key's own customer. Optional: a customer key always reads its own customer and cannot name another.","title":"Customer Id"},"description":"The key's own customer. Optional: a customer key always reads its own customer and cannot name another."},{"name":"If-Match","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Required. The `ETag` of the resource as you read it.","title":"If-Match"},"description":"Required. The `ETag` of the resource as you read it."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Agent"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Not Found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Too Many Requests"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Bad Gateway"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Service Unavailable"},"504":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Gateway Timeout"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Conflict"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Request Entity Too Large"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Unprocessable Entity"},"412":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Precondition Failed"},"428":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Precondition Required"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentUpdate"}}}}}},"/v1/knowledge-bases":{"get":{"tags":["knowledge_bases"],"summary":"The customer's knowledge bases","description":"What the agents answer questions from: name, kind and source. Page with `limit` and `meta.next_cursor`.","operationId":"list_knowledge_bases_v1_knowledge_bases_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"customer_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The key's own customer. Optional: a customer key always reads its own customer and cannot name another.","title":"Customer Id"},"description":"The key's own customer. Optional: a customer key always reads its own customer and cannot name another."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Items per page.","default":50,"title":"Limit"},"description":"Items per page."},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}],"description":"`meta.next_cursor` of the previous page, for the same query.","title":"Cursor"},"description":"`meta.next_cursor` of the previous page, for the same query."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnowledgeBasesResponse"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Not Found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Too Many Requests"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Bad Gateway"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Service Unavailable"},"504":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Gateway Timeout"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["knowledge_bases"],"summary":"Create a text knowledge base","description":"A TEXT knowledge base of the key's customer, from the text sent (website and file knowledge bases are created in the portal). Needs a key on the whole customer: a venue-restricted key is a 403. Answers the knowledge base with its `ETag`; link it to a venue in the portal for the agents to use it.","operationId":"create_knowledge_base_v1_knowledge_bases_post","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"customer_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The key's own customer. Optional: a customer key always reads its own customer and cannot name another.","title":"Customer Id"},"description":"The key's own customer. Optional: a customer key always reads its own customer and cannot name another."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Required. A unique value per create (e.g. a UUID): a retry with it never creates twice.","title":"Idempotency-Key"},"description":"Required. A unique value per create (e.g. a UUID): a retry with it never creates twice."}],"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnowledgeBase"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Not Found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Too Many Requests"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Bad Gateway"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Service Unavailable"},"504":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Gateway Timeout"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Conflict"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Request Entity Too Large"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Unprocessable Entity"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnowledgeBaseCreate"}}}}}},"/v1/knowledge-bases/{knowledge_base_id}":{"get":{"tags":["knowledge_bases"],"summary":"One knowledge base","description":"A knowledge base of another customer is a 404. The `ETag` header is the version to send as `If-Match` when changing or deleting it.","operationId":"get_knowledge_base_v1_knowledge_bases__knowledge_base_id__get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"knowledge_base_id","in":"path","required":true,"schema":{"type":"string","title":"Knowledge Base Id"}},{"name":"customer_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The key's own customer. Optional: a customer key always reads its own customer and cannot name another.","title":"Customer Id"},"description":"The key's own customer. Optional: a customer key always reads its own customer and cannot name another."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnowledgeBase"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Not Found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Too Many Requests"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Bad Gateway"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Service Unavailable"},"504":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Gateway Timeout"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["knowledge_bases"],"summary":"Change a text knowledge base's name or text","description":"Only the fields sent change; `text` replaces the whole content. Only TEXT knowledge bases: one whose content comes from a website, a file or an integration is a 409. Send the `ETag` of `GET /v1/knowledge-bases/{knowledge_base_id}` as `If-Match`: a knowledge base changed since is a 412. Answers the knowledge base with its new `ETag`.","operationId":"update_knowledge_base_v1_knowledge_bases__knowledge_base_id__patch","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"knowledge_base_id","in":"path","required":true,"schema":{"type":"string","title":"Knowledge Base Id"}},{"name":"customer_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The key's own customer. Optional: a customer key always reads its own customer and cannot name another.","title":"Customer Id"},"description":"The key's own customer. Optional: a customer key always reads its own customer and cannot name another."},{"name":"If-Match","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Required. The `ETag` of the resource as you read it.","title":"If-Match"},"description":"Required. The `ETag` of the resource as you read it."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnowledgeBase"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Not Found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Too Many Requests"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Bad Gateway"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Service Unavailable"},"504":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Gateway Timeout"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Conflict"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Request Entity Too Large"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Unprocessable Entity"},"412":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Precondition Failed"},"428":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Precondition Required"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnowledgeBaseUpdate"}}}}},"delete":{"tags":["knowledge_bases"],"summary":"Delete a knowledge base","description":"A TEXT knowledge base and its content. One whose content comes from a website, a file or an integration is a 409 (delete it in the portal), and so is one a venue still uses (unlink it from the venue first; a best-effort check, not atomic with the delete: a venue linked in the portal at that moment can be left pointing at the deleted knowledge base). Send the `ETag` of `GET /v1/knowledge-bases/{knowledge_base_id}` as `If-Match`: a knowledge base changed since is a 412.","operationId":"delete_knowledge_base_v1_knowledge_bases__knowledge_base_id__delete","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"knowledge_base_id","in":"path","required":true,"schema":{"type":"string","title":"Knowledge Base Id"}},{"name":"customer_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The key's own customer. Optional: a customer key always reads its own customer and cannot name another.","title":"Customer Id"},"description":"The key's own customer. Optional: a customer key always reads its own customer and cannot name another."},{"name":"If-Match","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Required. The `ETag` of the resource as you read it.","title":"If-Match"},"description":"Required. The `ETag` of the resource as you read it."}],"responses":{"204":{"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Not Found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Too Many Requests"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Bad Gateway"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Service Unavailable"},"504":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Gateway Timeout"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Conflict"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Request Entity Too Large"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Unprocessable Entity"},"412":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Precondition Failed"},"428":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Precondition Required"}}}},"/v1/campaigns":{"get":{"tags":["notifications"],"summary":"The customer's campaigns","description":"Scheduled outbound notification campaigns: schedule, channels and whether they are enabled. Needs a key that reads the whole customer: a venue-restricted key is refused (403). Page with `limit` and `meta.next_cursor`.","operationId":"list_campaigns_v1_campaigns_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"customer_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The key's own customer. Optional: a customer key always reads its own customer and cannot name another.","title":"Customer Id"},"description":"The key's own customer. Optional: a customer key always reads its own customer and cannot name another."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"description":"Items per page.","default":50,"title":"Limit"},"description":"Items per page."},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}],"description":"`meta.next_cursor` of the previous page, for the same query.","title":"Cursor"},"description":"`meta.next_cursor` of the previous page, for the same query."},{"name":"enabled","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Only the campaigns that are (`true`) or are not (`false`) enabled.","title":"Enabled"},"description":"Only the campaigns that are (`true`) or are not (`false`) enabled."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignsResponse"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Not Found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Too Many Requests"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Bad Gateway"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Service Unavailable"},"504":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Gateway Timeout"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/campaigns/{campaign_id}":{"get":{"tags":["notifications"],"summary":"One campaign","description":"A campaign of another customer is a 404. Needs a key that reads the whole customer: a venue-restricted key is refused (403). The `ETag` header is the version to send as `If-Match` when pausing it.","operationId":"get_campaign_v1_campaigns__campaign_id__get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string","title":"Campaign Id"}},{"name":"customer_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The key's own customer. Optional: a customer key always reads its own customer and cannot name another.","title":"Customer Id"},"description":"The key's own customer. Optional: a customer key always reads its own customer and cannot name another."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Campaign"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Not Found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Too Many Requests"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Bad Gateway"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Service Unavailable"},"504":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Gateway Timeout"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["notifications"],"summary":"Pause a campaign","description":"`enabled: false` stops the campaign running on its schedule; enabling it is done in the Bookline portal (`true` is a 422). Messages a run in progress has already queued are still sent: to stop them, cancel the run in the Bookline portal. Send the `ETag` of `GET /v1/campaigns/{campaign_id}` as `If-Match`: a campaign changed since is a 412. A campaign already paused is answered as it is. Needs a key that reads the whole customer: a venue-restricted key is refused (403).","operationId":"pause_campaign_v1_campaigns__campaign_id__patch","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string","title":"Campaign Id"}},{"name":"customer_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The key's own customer. Optional: a customer key always reads its own customer and cannot name another.","title":"Customer Id"},"description":"The key's own customer. Optional: a customer key always reads its own customer and cannot name another."},{"name":"If-Match","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Required. The `ETag` of the resource as you read it.","title":"If-Match"},"description":"Required. The `ETag` of the resource as you read it."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Campaign"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Not Found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Too Many Requests"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Bad Gateway"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Service Unavailable"},"504":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Gateway Timeout"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Conflict"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Request Entity Too Large"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Unprocessable Entity"},"412":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Precondition Failed"},"428":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Precondition Required"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignUpdate"}}}}}},"/v1/campaigns/{campaign_id}/runs":{"get":{"tags":["notifications"],"summary":"The runs of one campaign","description":"Each run is one launch of the campaign, newest first (by `started_at`, then id). A campaign of another customer is a 404. Needs a key that reads the whole customer: a venue-restricted key is refused (403). Page with `limit` and `meta.next_cursor`: runs launched while you page never make another run repeat or go missing.","operationId":"list_campaign_runs_v1_campaigns__campaign_id__runs_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string","title":"Campaign Id"}},{"name":"customer_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The key's own customer. Optional: a customer key always reads its own customer and cannot name another.","title":"Customer Id"},"description":"The key's own customer. Optional: a customer key always reads its own customer and cannot name another."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":10,"minimum":1,"description":"Items per page.","default":10,"title":"Limit"},"description":"Items per page."},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}],"description":"`meta.next_cursor` of the previous page, for the same query.","title":"Cursor"},"description":"`meta.next_cursor` of the previous page, for the same query."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignRunsResponse"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Not Found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Too Many Requests"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Bad Gateway"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Service Unavailable"},"504":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Gateway Timeout"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/campaigns/{campaign_id}/runs/{run_id}":{"get":{"tags":["notifications"],"summary":"One run of a campaign","description":"A run of another campaign, or a campaign of another customer, is a 404. Needs a key that reads the whole customer: a venue-restricted key is refused (403).","operationId":"get_campaign_run_v1_campaigns__campaign_id__runs__run_id__get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string","title":"Campaign Id"}},{"name":"run_id","in":"path","required":true,"schema":{"type":"string","title":"Run Id"}},{"name":"customer_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The key's own customer. Optional: a customer key always reads its own customer and cannot name another.","title":"Customer Id"},"description":"The key's own customer. Optional: a customer key always reads its own customer and cannot name another."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignRun"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Not Found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Too Many Requests"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Bad Gateway"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Service Unavailable"},"504":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Gateway Timeout"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/contacts":{"get":{"tags":["contacts"],"summary":"The customer's contacts","description":"The people who reached the customer, ordered by id. Personal data: names, phone numbers and email addresses. Needs a key that reads the whole customer. Page with `limit` and `meta.next_cursor`: a contact added while you page may be left out, never repeated.","operationId":"list_contacts_v1_contacts_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"customer_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The key's own customer. Optional: a customer key always reads its own customer and cannot name another.","title":"Customer Id"},"description":"The key's own customer. Optional: a customer key always reads its own customer and cannot name another."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Items per page.","default":50,"title":"Limit"},"description":"Items per page."},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}],"description":"`meta.next_cursor` of the previous page, for the same query.","title":"Cursor"},"description":"`meta.next_cursor` of the previous page, for the same query."},{"name":"tags","in":"query","required":false,"schema":{"type":"array","items":{"type":"string","minLength":1,"maxLength":100},"maxItems":20,"description":"Only contacts holding at least one of these tags. Repeat the parameter for several.","title":"Tags"},"description":"Only contacts holding at least one of these tags. Repeat the parameter for several."},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string","minLength":1,"maxLength":100},{"type":"null"}],"description":"Only contacts whose full name, email or phone number contains this text (case-insensitive).","title":"Search"},"description":"Only contacts whose full name, email or phone number contains this text (case-insensitive)."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactsResponse"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Not Found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Too Many Requests"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Bad Gateway"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Service Unavailable"},"504":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Gateway Timeout"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["contacts"],"summary":"Add a contact","description":"A new contact of the customer, with a phone, an email or both. Needs a key that writes the whole customer. A phone or email another contact of the customer already has is a 409. Answers the contact as stored, with its `ETag`. The answer is personal data: audited as a personal-data read and counted in the personal-data rate limit.","operationId":"create_contact_v1_contacts_post","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"customer_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The key's own customer. Optional: a customer key always reads its own customer and cannot name another.","title":"Customer Id"},"description":"The key's own customer. Optional: a customer key always reads its own customer and cannot name another."},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Required. A unique value per create (e.g. a UUID): a retry with it never creates twice.","title":"Idempotency-Key"},"description":"Required. A unique value per create (e.g. a UUID): a retry with it never creates twice."}],"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Contact"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Not Found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Too Many Requests"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Bad Gateway"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Service Unavailable"},"504":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Gateway Timeout"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Conflict"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Request Entity Too Large"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Unprocessable Entity"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactCreate"}}}}}},"/v1/contacts/{contact_id}":{"get":{"tags":["contacts"],"summary":"One contact","description":"Personal data: names, phone numbers and email addresses. Needs a key that reads the whole customer. A contact of another customer is a 404. The `ETag` header is the version to send as `If-Match` when changing it.","operationId":"get_contact_v1_contacts__contact_id__get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"contact_id","in":"path","required":true,"schema":{"type":"string","title":"Contact Id"}},{"name":"customer_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The key's own customer. Optional: a customer key always reads its own customer and cannot name another.","title":"Customer Id"},"description":"The key's own customer. Optional: a customer key always reads its own customer and cannot name another."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Contact"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Not Found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Too Many Requests"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Bad Gateway"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Service Unavailable"},"504":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Gateway Timeout"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["contacts"],"summary":"Change a contact","description":"Only the fields sent change. Needs a key that writes the whole customer. Send the `ETag` of `GET /v1/contacts/{contact_id}` as `If-Match`: a contact changed since is a 412. A phone or email another contact of the customer already has is a 409. Answers the contact as stored, with its new `ETag`. The answer is personal data: audited as a personal-data read and counted in the personal-data rate limit.","operationId":"update_contact_v1_contacts__contact_id__patch","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"contact_id","in":"path","required":true,"schema":{"type":"string","title":"Contact Id"}},{"name":"customer_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The key's own customer. Optional: a customer key always reads its own customer and cannot name another.","title":"Customer Id"},"description":"The key's own customer. Optional: a customer key always reads its own customer and cannot name another."},{"name":"If-Match","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Required. The `ETag` of the resource as you read it.","title":"If-Match"},"description":"Required. The `ETag` of the resource as you read it."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Contact"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Not Found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Too Many Requests"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Bad Gateway"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Service Unavailable"},"504":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Gateway Timeout"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Conflict"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Request Entity Too Large"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Unprocessable Entity"},"412":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Precondition Failed"},"428":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Precondition Required"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactUpdate"}}}}}},"/v1/numbers":{"get":{"tags":["numbers"],"summary":"The customer's phone numbers","description":"The lines the customer's agents answer. Needs a key that reads the whole customer. Page with `limit` and `meta.next_cursor`.","operationId":"list_numbers_v1_numbers_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"customer_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The key's own customer. Optional: a customer key always reads its own customer and cannot name another.","title":"Customer Id"},"description":"The key's own customer. Optional: a customer key always reads its own customer and cannot name another."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Items per page.","default":50,"title":"Limit"},"description":"Items per page."},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}],"description":"`meta.next_cursor` of the previous page, for the same query.","title":"Cursor"},"description":"`meta.next_cursor` of the previous page, for the same query."},{"name":"type","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/PublicNumberType"},{"type":"null"}],"description":"Only numbers of this type.","title":"Type"},"description":"Only numbers of this type."},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/PublicNumberStatus"},{"type":"null"}],"description":"Only numbers in this status.","title":"Status"},"description":"Only numbers in this status."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NumbersResponse"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Not Found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Too Many Requests"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Bad Gateway"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Service Unavailable"},"504":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Gateway Timeout"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/numbers/{number_id}":{"get":{"tags":["numbers"],"summary":"One phone number","description":"Needs a key that reads the whole customer. A number of another customer is a 404.","operationId":"get_number_v1_numbers__number_id__get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"number_id","in":"path","required":true,"schema":{"type":"string","title":"Number Id"}},{"name":"customer_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The key's own customer. Optional: a customer key always reads its own customer and cannot name another.","title":"Customer Id"},"description":"The key's own customer. Optional: a customer key always reads its own customer and cannot name another."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Number"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Not Found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Too Many Requests"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Bad Gateway"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Service Unavailable"},"504":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Gateway Timeout"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/integrations":{"get":{"tags":["integrations"],"summary":"The integrations the customer installed","description":"The booking systems, channels and services the customer connected, without their settings. Needs a key that reads the whole customer. Page with `limit` and `meta.next_cursor`.","operationId":"list_integrations_v1_integrations_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"customer_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The key's own customer. Optional: a customer key always reads its own customer and cannot name another.","title":"Customer Id"},"description":"The key's own customer. Optional: a customer key always reads its own customer and cannot name another."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Items per page.","default":50,"title":"Limit"},"description":"Items per page."},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}],"description":"`meta.next_cursor` of the previous page, for the same query.","title":"Cursor"},"description":"`meta.next_cursor` of the previous page, for the same query."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationsResponse"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Not Found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Too Many Requests"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Bad Gateway"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Service Unavailable"},"504":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Gateway Timeout"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/integrations/{integration_id}":{"get":{"tags":["integrations"],"summary":"One integration the customer installed","description":"Without its settings. Needs a key that reads the whole customer. An integration of another customer, or a deleted one, is a 404.","operationId":"get_integration_v1_integrations__integration_id__get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"integration_id","in":"path","required":true,"schema":{"type":"string","title":"Integration Id"}},{"name":"customer_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The key's own customer. Optional: a customer key always reads its own customer and cannot name another.","title":"Customer Id"},"description":"The key's own customer. Optional: a customer key always reads its own customer and cannot name another."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Integration"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Not Found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Too Many Requests"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Bad Gateway"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Service Unavailable"},"504":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Gateway Timeout"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/chats":{"get":{"tags":["chats"],"summary":"WhatsApp conversations of the customer's agents started in a window, newest first","description":"Without their messages (see `GET /v1/chats/{chat_id}`). Personal data: the contact's number. Page with `limit` and `meta.next_cursor`.","operationId":"list_chats_v1_chats_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"customer_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The key's own customer. Optional: a customer key always reads its own customer and cannot name another.","title":"Customer Id"},"description":"The key's own customer. Optional: a customer key always reads its own customer and cannot name another."},{"name":"from","in":"query","required":true,"schema":{"type":"string","format":"date","description":"First day of the window (inclusive), in `timezone`.","title":"From"},"description":"First day of the window (inclusive), in `timezone`."},{"name":"to","in":"query","required":true,"schema":{"type":"string","format":"date","description":"Last day of the window (inclusive), in `timezone`.","title":"To"},"description":"Last day of the window (inclusive), in `timezone`."},{"name":"timezone","in":"query","required":false,"schema":{"type":"string","maxLength":64,"description":"IANA zone the days are cut in, e.g. `Europe/Madrid`.","default":"UTC","title":"Timezone"},"description":"IANA zone the days are cut in, e.g. `Europe/Madrid`."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Items per page.","default":50,"title":"Limit"},"description":"Items per page."},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}],"description":"`meta.next_cursor` of the previous page, for the same query.","title":"Cursor"},"description":"`meta.next_cursor` of the previous page, for the same query."},{"name":"venue_ids","in":"query","required":false,"schema":{"type":"array","items":{"type":"string","format":"uuid"},"maxItems":100,"description":"Only chats of the agents of these venues (see `GET /v1/venues`). Repeat the parameter for several.","title":"Venue Ids"},"description":"Only chats of the agents of these venues (see `GET /v1/venues`). Repeat the parameter for several."},{"name":"agent_ids","in":"query","required":false,"schema":{"type":"array","items":{"type":"string","minLength":1,"maxLength":128},"maxItems":100,"description":"Only chats of these agents. Repeat the parameter for several.","title":"Agent Ids"},"description":"Only chats of these agents. Repeat the parameter for several."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatsResponse"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Not Found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Too Many Requests"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Bad Gateway"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Service Unavailable"},"504":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Gateway Timeout"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/chats/{chat_id}":{"get":{"tags":["chats"],"summary":"One WhatsApp conversation with its messages","description":"Personal data: the contact's number and what was said. At most 200 messages, oldest first (`messages_truncated` says when there are more). A chat of another customer is a 404.","operationId":"get_chat_v1_chats__chat_id__get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"chat_id","in":"path","required":true,"schema":{"type":"string","title":"Chat Id"}},{"name":"customer_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The key's own customer. Optional: a customer key always reads its own customer and cannot name another.","title":"Customer Id"},"description":"The key's own customer. Optional: a customer key always reads its own customer and cannot name another."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatDetail"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Not Found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Too Many Requests"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Bad Gateway"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Service Unavailable"},"504":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Gateway Timeout"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/billing/accounts":{"get":{"tags":["billing"],"summary":"The customer's billing accounts","description":"The companies the customer is invoiced as: legal name, tax id, country. Personal data when the customer is a sole trader (the tax id is a person's). Needs a key that reads the whole customer: a venue-restricted key is refused (403). Page with `limit` and `meta.next_cursor`.","operationId":"list_billing_accounts_v1_billing_accounts_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"customer_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The key's own customer. Optional: a customer key always reads its own customer and cannot name another.","title":"Customer Id"},"description":"The key's own customer. Optional: a customer key always reads its own customer and cannot name another."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Items per page.","default":50,"title":"Limit"},"description":"Items per page."},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}],"description":"`meta.next_cursor` of the previous page, for the same query.","title":"Cursor"},"description":"`meta.next_cursor` of the previous page, for the same query."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingAccountsResponse"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Not Found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Too Many Requests"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Bad Gateway"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Service Unavailable"},"504":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Gateway Timeout"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/billing/accounts/{account_id}":{"get":{"tags":["billing"],"summary":"One billing account","description":"A billing account of another customer is a 404. Needs a key that reads the whole customer: a venue-restricted key is refused (403).","operationId":"get_billing_account_v1_billing_accounts__account_id__get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","title":"Account Id"}},{"name":"customer_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The key's own customer. Optional: a customer key always reads its own customer and cannot name another.","title":"Customer Id"},"description":"The key's own customer. Optional: a customer key always reads its own customer and cannot name another."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingAccount"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Not Found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Too Many Requests"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Bad Gateway"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Service Unavailable"},"504":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Gateway Timeout"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/billing/invoices":{"get":{"tags":["billing"],"summary":"The invoices issued to the customer's billing accounts, newest first","description":"Credit notes included (`type`). Needs a key that reads the whole customer: a venue-restricted key is refused (403). Page with `limit` and `meta.next_cursor`.","operationId":"list_invoices_v1_billing_invoices_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"customer_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The key's own customer. Optional: a customer key always reads its own customer and cannot name another.","title":"Customer Id"},"description":"The key's own customer. Optional: a customer key always reads its own customer and cannot name another."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Items per page.","default":50,"title":"Limit"},"description":"Items per page."},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}],"description":"`meta.next_cursor` of the previous page, for the same query.","title":"Cursor"},"description":"`meta.next_cursor` of the previous page, for the same query."},{"name":"account_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","minLength":1,"maxLength":128},{"type":"null"}],"description":"Only the invoices of this billing account (see `GET /v1/billing/accounts`).","title":"Account Id"},"description":"Only the invoices of this billing account (see `GET /v1/billing/accounts`)."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoicesResponse"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Not Found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Too Many Requests"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Bad Gateway"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Service Unavailable"},"504":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Gateway Timeout"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/billing/invoices/{invoice_id}":{"get":{"tags":["billing"],"summary":"One invoice","description":"An invoice of another customer is a 404. Needs a key that reads the whole customer: a venue-restricted key is refused (403).","operationId":"get_invoice_v1_billing_invoices__invoice_id__get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"invoice_id","in":"path","required":true,"schema":{"type":"string","title":"Invoice Id"}},{"name":"customer_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The key's own customer. Optional: a customer key always reads its own customer and cannot name another.","title":"Customer Id"},"description":"The key's own customer. Optional: a customer key always reads its own customer and cannot name another."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Invoice"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Not Found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Too Many Requests"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Bad Gateway"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Service Unavailable"},"504":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Gateway Timeout"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/billing/services":{"get":{"tags":["billing"],"summary":"The services the customer contracted","description":"What each covers (venue, venue group or agent), its status today and its billing account. Needs a key that reads the whole customer: a venue-restricted key is refused (403). Page with `limit` and `meta.next_cursor`.","operationId":"list_billing_services_v1_billing_services_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"customer_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The key's own customer. Optional: a customer key always reads its own customer and cannot name another.","title":"Customer Id"},"description":"The key's own customer. Optional: a customer key always reads its own customer and cannot name another."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Items per page.","default":50,"title":"Limit"},"description":"Items per page."},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}],"description":"`meta.next_cursor` of the previous page, for the same query.","title":"Cursor"},"description":"`meta.next_cursor` of the previous page, for the same query."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingServicesResponse"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Not Found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Too Many Requests"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Bad Gateway"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Service Unavailable"},"504":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Gateway Timeout"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/users":{"get":{"tags":["users"],"summary":"The customer's team members","description":"The people with a login to the customer's dashboard and their access to it. Personal data: each team member's name and email. Needs a key that reads the whole customer. Page with `limit` and `meta.next_cursor`.","operationId":"list_users_v1_users_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"customer_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The key's own customer. Optional: a customer key always reads its own customer and cannot name another.","title":"Customer Id"},"description":"The key's own customer. Optional: a customer key always reads its own customer and cannot name another."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Items per page.","default":50,"title":"Limit"},"description":"Items per page."},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}],"description":"`meta.next_cursor` of the previous page, for the same query.","title":"Cursor"},"description":"`meta.next_cursor` of the previous page, for the same query."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamMembersResponse"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Not Found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Too Many Requests"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Bad Gateway"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Service Unavailable"},"504":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Gateway Timeout"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/users/{user_id}":{"get":{"tags":["users"],"summary":"One team member","description":"Personal data: each team member's name and email. Needs a key that reads the whole customer. A person without access to the customer is a 404. The `ETag` header is the version to send as `If-Match` when changing their access.","operationId":"get_user_v1_users__user_id__get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}},{"name":"customer_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The key's own customer. Optional: a customer key always reads its own customer and cannot name another.","title":"Customer Id"},"description":"The key's own customer. Optional: a customer key always reads its own customer and cannot name another."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamMember"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Not Found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Too Many Requests"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Bad Gateway"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Service Unavailable"},"504":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Gateway Timeout"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["users"],"summary":"Replace a team member's access to the customer","description":"`access` replaces the person's `ALL`, `VENUES` and `ACTIVITY` grants on this customer (`BOTS` and `ACCOUNTS` grants, set in the portal only, stay); other customers are untouched. Send every grant the person must keep: a list with one grant removes all the others, `ADMIN` on `ALL` included; read them first with `GET /v1/users/{user_id}`. Only an existing team member (a 404 otherwise: people are invited in the portal). Needs a key on the whole customer. A key never changes its own owner's access (403), a user key writes only when its owner is one of the customer's own users holding `ADMIN` on `ALL` of it (403: a partner's key never does), and the customer's last `ADMIN` of `ALL` stays (409). Send the `ETag` of `GET /v1/users/{user_id}` as `If-Match`: a team member changed since is a 412. Answers the team member as stored, with its new `ETag`. The answer is personal data: audited as a personal-data read and counted in the personal-data rate limit.","operationId":"update_team_member_v1_users__user_id__patch","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}},{"name":"customer_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The key's own customer. Optional: a customer key always reads its own customer and cannot name another.","title":"Customer Id"},"description":"The key's own customer. Optional: a customer key always reads its own customer and cannot name another."},{"name":"If-Match","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Required. The `ETag` of the resource as you read it.","title":"If-Match"},"description":"Required. The `ETag` of the resource as you read it."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamMember"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Not Found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Too Many Requests"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Bad Gateway"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Service Unavailable"},"504":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Gateway Timeout"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Conflict"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Request Entity Too Large"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Unprocessable Entity"},"412":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Precondition Failed"},"428":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Precondition Required"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamMemberUpdate"}}}}},"delete":{"tags":["users"],"summary":"Remove a team member from the customer","description":"Removes the person's `ALL`, `VENUES` and `ACTIVITY` grants on this customer; `BOTS` and `ACCOUNTS` grants, set in the portal only, stay, and a person left with none is no longer a team member. The person, and their access to other customers, stay. Needs a key on the whole customer. A key never changes its own owner's access (403), a user key writes only when its owner is one of the customer's own users holding `ADMIN` on `ALL` of it (403: a partner's key never does), and the customer's last `ADMIN` of `ALL` stays (409). Send the `ETag` of `GET /v1/users/{user_id}` as `If-Match`: a team member changed since is a 412.","operationId":"remove_team_member_v1_users__user_id__delete","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}},{"name":"customer_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The key's own customer. Optional: a customer key always reads its own customer and cannot name another.","title":"Customer Id"},"description":"The key's own customer. Optional: a customer key always reads its own customer and cannot name another."},{"name":"If-Match","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Required. The `ETag` of the resource as you read it.","title":"If-Match"},"description":"Required. The `ETag` of the resource as you read it."}],"responses":{"204":{"description":"Successful Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Not Found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Too Many Requests"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Bad Gateway"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Service Unavailable"},"504":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Gateway Timeout"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Conflict"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Request Entity Too Large"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Unprocessable Entity"},"412":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Precondition Failed"},"428":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Precondition Required"}}}},"/v1/bookings":{"get":{"tags":["bookings"],"summary":"Bookings of the customer's booking-manager venues and agents whose reservation falls in a window, earliest first","description":"The window is on the reservation time, not on when the booking was made. Served for now: the bookings of the customer's Bookline booking-manager venues and the ones its agents took. A booking made directly in a connected booking system (CoverManager and others) that no agent of the customer took is not served yet; it will be, earlier ones included, once Bookline links such bookings to the customer's integration. Personal data: the guest's name, phone number, email and comments. Page with `limit` and `meta.next_cursor`.","operationId":"list_bookings_v1_bookings_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"customer_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The key's own customer. Optional: a customer key always reads its own customer and cannot name another.","title":"Customer Id"},"description":"The key's own customer. Optional: a customer key always reads its own customer and cannot name another."},{"name":"from","in":"query","required":true,"schema":{"type":"string","format":"date","description":"First day of the window (inclusive), in `timezone`.","title":"From"},"description":"First day of the window (inclusive), in `timezone`."},{"name":"to","in":"query","required":true,"schema":{"type":"string","format":"date","description":"Last day of the window (inclusive), in `timezone`.","title":"To"},"description":"Last day of the window (inclusive), in `timezone`."},{"name":"timezone","in":"query","required":false,"schema":{"type":"string","maxLength":64,"description":"IANA zone the days are cut in, e.g. `Europe/Madrid`.","default":"UTC","title":"Timezone"},"description":"IANA zone the days are cut in, e.g. `Europe/Madrid`."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Items per page.","default":50,"title":"Limit"},"description":"Items per page."},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}],"description":"`meta.next_cursor` of the previous page, for the same query.","title":"Cursor"},"description":"`meta.next_cursor` of the previous page, for the same query."},{"name":"venue_ids","in":"query","required":false,"schema":{"type":"array","items":{"type":"string","format":"uuid"},"maxItems":100,"description":"Only bookings taken by the agents of these venues (see `GET /v1/venues`). Repeat the parameter for several.","title":"Venue Ids"},"description":"Only bookings taken by the agents of these venues (see `GET /v1/venues`). Repeat the parameter for several."},{"name":"agent_ids","in":"query","required":false,"schema":{"type":"array","items":{"type":"string","minLength":1,"maxLength":128},"maxItems":100,"description":"Only bookings taken by these agents. Repeat the parameter for several.","title":"Agent Ids"},"description":"Only bookings taken by these agents. Repeat the parameter for several."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookingsResponse"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Not Found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Too Many Requests"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Bad Gateway"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Service Unavailable"},"504":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Gateway Timeout"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/bookings/{booking_id}":{"get":{"tags":["bookings"],"summary":"One booking","description":"Personal data: the guest's name, phone number, email and comments. A booking of another customer, outside a venue-restricted key, or not served yet (see the list), is a 404.","operationId":"get_booking_v1_bookings__booking_id__get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"booking_id","in":"path","required":true,"schema":{"type":"string","title":"Booking Id"}},{"name":"customer_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The key's own customer. Optional: a customer key always reads its own customer and cannot name another.","title":"Customer Id"},"description":"The key's own customer. Optional: a customer key always reads its own customer and cannot name another."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Booking"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Not Found"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Too Many Requests"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Bad Gateway"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Service Unavailable"},"504":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicErrorBody"}}},"description":"Gateway Timeout"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"Agent":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Type","description":"The agent's kind, e.g. `RESTAURANT`, `HOTEL_BOT`, `FLEXBOT_V2`."},"language":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Language","description":"The agent's default language, e.g. `SPANISH`, `CATALAN`, `ENGLISH`; others may appear."},"venue_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Venue Id","description":"The venue the agent serves, if one."},"venue_group_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Venue Group Id","description":"The venue group the agent serves, if one."},"tags":{"items":{"type":"string"},"type":"array","title":"Tags"}},"type":"object","required":["id","name"],"title":"Agent"},"AgentsResponse":{"properties":{"data":{"items":{"$ref":"#/components/schemas/Agent"},"type":"array","title":"Data"},"meta":{"$ref":"#/components/schemas/PageMeta"}},"type":"object","required":["data","meta"],"title":"AgentsResponse"},"BillingAccount":{"properties":{"id":{"type":"string","title":"Id"},"legal_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Legal Name","description":"The company name printed on its invoices."},"legal_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Legal Id","description":"The company's tax id, as printed on its invoices."},"country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country","description":"The country of the billing address, e.g. `SPAIN`, `MEXICO`."},"notification_language":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notification Language","description":"The language invoices and payment notices are written in, e.g. `SPANISH`, `ENGLISH`; `null` when none was chosen."},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","created_at"],"title":"BillingAccount"},"BillingAccountsResponse":{"properties":{"data":{"items":{"$ref":"#/components/schemas/BillingAccount"},"type":"array","title":"Data"},"meta":{"$ref":"#/components/schemas/PageMeta"}},"type":"object","required":["data","meta"],"title":"BillingAccountsResponse"},"BillingService":{"properties":{"id":{"type":"string","title":"Id"},"account_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Account Id","description":"The billing account it is invoiced to; `null` until one is assigned."},"type":{"$ref":"#/components/schemas/PublicServiceType"},"status":{"$ref":"#/components/schemas/PublicServiceStatus"},"currency":{"type":"string","title":"Currency","description":"ISO 4217 code it is priced in, e.g. `EUR`."},"venue_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Venue Id","description":"The venue it covers, if one."},"venue_group_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Venue Group Id","description":"The venue group it covers, if one."},"agent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Id","description":"The agent it covers, if one."},"started_at":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Started At","description":"When it went live."},"ended_at":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Ended At","description":"When it was terminated, if it was."}},"type":"object","required":["id","type","status","currency"],"title":"BillingService"},"BillingServicesResponse":{"properties":{"data":{"items":{"$ref":"#/components/schemas/BillingService"},"type":"array","title":"Data"},"meta":{"$ref":"#/components/schemas/PageMeta"}},"type":"object","required":["data","meta"],"title":"BillingServicesResponse"},"Booking":{"properties":{"id":{"type":"string","title":"Id"},"status":{"type":"string","title":"Status","description":"Where the booking stands: `confirmed`, `pending` (waiting for the venue), `pending_user_data`, `pending_propagation`, `submitted_to_backend` (waiting for the reservation system), `no_availability`, `propagation_failed`, `contacted`, `client_cancelled` (cancelled by the guest) or `source_cancelled` (cancelled by the venue or its reservation system); others may appear."},"reservation_at":{"type":"string","format":"date-time","title":"Reservation At","description":"When the reservation is for."},"diners":{"type":"integer","title":"Diners","description":"How many people the reservation is for."},"guest_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Guest Name","description":"The guest's name. Personal data."},"guest_phone":{"type":"string","title":"Guest Phone","description":"The guest's phone number, in E.164. Personal data."},"guest_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Guest Email","description":"The guest's email. Personal data."},"language":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Language","description":"The language the guest booked in, e.g. `SPANISH`, `CATALAN`, `ENGLISH`; others may appear."},"comments":{"type":"string","title":"Comments","description":"What the guest asked for, in their words. Personal data that may include health data (allergies, intolerances, mobility, pregnancy): treat it as a special category of personal data.","default":""},"contact_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Id","description":"The guest's contact, when the phone number matched one."},"agent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Id","description":"The agent that took the booking; `null` for a booking made without one or by an agent that is not the customer's."},"venue_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Venue Id","description":"The venue of that agent, when it serves one venue."},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At","description":"When the booking was made."},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At","description":"When the booking last changed."}},"type":"object","required":["id","status","reservation_at","diners","guest_phone"],"title":"Booking"},"BookingsResponse":{"properties":{"data":{"items":{"$ref":"#/components/schemas/Booking"},"type":"array","title":"Data"},"meta":{"$ref":"#/components/schemas/PageMeta"}},"type":"object","required":["data","meta"],"title":"BookingsResponse"},"CallDetail":{"properties":{"id":{"type":"string","title":"Id"},"started_at":{"type":"string","format":"date-time","title":"Started At","description":"When the call started."},"caller_number":{"type":"string","title":"Caller Number","description":"The number that called. Personal data."},"called_number":{"type":"string","title":"Called Number","description":"The number the caller dialled."},"disposition":{"$ref":"#/components/schemas/PublicCallDisposition","description":"How the call ended. Always `CONNECTED` today: only calls an agent answered are served; the other values are reserved for when calls that reached no agent are included."},"agent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Id","description":"The agent that answered. Always present today; `null` is reserved for when calls that reached no agent are included."},"tags":{"items":{"type":"string"},"type":"array","title":"Tags"},"transcript":{"items":{"$ref":"#/components/schemas/CallTurn"},"type":"array","title":"Transcript","description":"The conversation, turn by turn."}},"type":"object","required":["id","started_at","caller_number","called_number","disposition"],"title":"CallDetail"},"CallSummary":{"properties":{"id":{"type":"string","title":"Id"},"started_at":{"type":"string","format":"date-time","title":"Started At","description":"When the call started."},"caller_number":{"type":"string","title":"Caller Number","description":"The number that called. Personal data."},"called_number":{"type":"string","title":"Called Number","description":"The number the caller dialled."},"disposition":{"$ref":"#/components/schemas/PublicCallDisposition","description":"How the call ended. Always `CONNECTED` today: only calls an agent answered are served; the other values are reserved for when calls that reached no agent are included."},"agent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Id","description":"The agent that answered. Always present today; `null` is reserved for when calls that reached no agent are included."},"tags":{"items":{"type":"string"},"type":"array","title":"Tags"}},"type":"object","required":["id","started_at","caller_number","called_number","disposition"],"title":"CallSummary"},"CallTurn":{"properties":{"at":{"type":"string","format":"date-time","title":"At","description":"When the turn started."},"caller_said":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Caller Said","description":"The caller's words, or the digits they pressed; `null` when they said nothing."},"agent_said":{"items":{"type":"string"},"type":"array","title":"Agent Said","description":"What the agent said in reply, in order."}},"type":"object","required":["at"],"title":"CallTurn","description":"One exchange of the call: what the caller said (speech or keypad digits), then\nwhat the agent answered."},"CallsBreakdownData":{"properties":{"total":{"$ref":"#/components/schemas/CallsBreakdownTotal"},"days":{"anyOf":[{"items":{"$ref":"#/components/schemas/CallsBreakdownDay"},"type":"array"},{"type":"null"}],"title":"Days"}},"type":"object","required":["total"],"title":"CallsBreakdownData"},"CallsBreakdownDay":{"properties":{"date":{"type":"string","format":"date","title":"Date"},"total_calls":{"type":"integer","title":"Total Calls"},"by_reason":{"additionalProperties":{"type":"integer"},"type":"object","title":"By Reason","description":"Calls per reason. LODGING: every call has one bucket (no_interaction, unidentified and other included), so it adds up to total_calls. RESTAURANTS: intent types only; a call whose reason is not an intent type counts in total_calls but in no bucket, so it may add up to less."},"by_language":{"additionalProperties":{"type":"integer"},"type":"object","title":"By Language","description":"Calls per language family. A call without a detected language is UNKNOWN, so it adds up to total_calls."}},"type":"object","required":["date","total_calls","by_reason","by_language"],"title":"CallsBreakdownDay"},"CallsBreakdownResponse":{"properties":{"data":{"$ref":"#/components/schemas/CallsBreakdownData"},"meta":{"$ref":"#/components/schemas/Meta"}},"type":"object","required":["data","meta"],"title":"CallsBreakdownResponse"},"CallsBreakdownTotal":{"properties":{"total_calls":{"type":"integer","title":"Total Calls"},"by_reason":{"additionalProperties":{"type":"integer"},"type":"object","title":"By Reason","description":"Calls per reason. LODGING: every call has one bucket (no_interaction, unidentified and other included), so it adds up to total_calls. RESTAURANTS: intent types only; a call whose reason is not an intent type counts in total_calls but in no bucket, so it may add up to less."},"by_language":{"additionalProperties":{"type":"integer"},"type":"object","title":"By Language","description":"Calls per language family. A call without a detected language is UNKNOWN, so it adds up to total_calls."},"by_country":{"additionalProperties":{"type":"integer"},"type":"object","title":"By Country"}},"type":"object","required":["total_calls","by_reason","by_language","by_country"],"title":"CallsBreakdownTotal"},"CallsResponse":{"properties":{"data":{"items":{"$ref":"#/components/schemas/CallSummary"},"type":"array","title":"Data"},"meta":{"$ref":"#/components/schemas/PageMeta"}},"type":"object","required":["data","meta"],"title":"CallsResponse"},"Campaign":{"properties":{"id":{"type":"string","title":"Id"},"enabled":{"type":"boolean","title":"Enabled","description":"Whether the campaign runs on its schedule."},"frequency":{"type":"string","title":"Frequency","description":"When the campaign runs, as a cron expression in `timezone`."},"timezone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timezone","description":"IANA zone of the schedule, e.g. `Europe/Madrid`; `null` for older campaigns."},"integration_type":{"type":"string","title":"Integration Type","description":"The system the campaign's contacts come from, e.g. `COVERMANAGER`, `BOOKLINE_CRM`, `CLOUDBEDS`; others may appear."},"channels":{"items":{"$ref":"#/components/schemas/PublicCampaignChannel"},"type":"array","title":"Channels","description":"The channels its steps use, each once."}},"type":"object","required":["id","enabled","frequency","integration_type"],"title":"Campaign"},"CampaignRun":{"properties":{"id":{"type":"string","title":"Id"},"campaign_id":{"type":"string","title":"Campaign Id"},"status":{"$ref":"#/components/schemas/PublicCampaignRunStatus"},"started_at":{"type":"string","format":"date-time","title":"Started At","description":"When the run started."},"ended_at":{"type":"string","format":"date-time","title":"Ended At","description":"When the run ended."},"notification_count":{"type":"integer","title":"Notification Count","description":"Contacts the run started a notification sequence for."}},"type":"object","required":["id","campaign_id","status","started_at","ended_at","notification_count"],"title":"CampaignRun"},"CampaignRunsResponse":{"properties":{"data":{"items":{"$ref":"#/components/schemas/CampaignRun"},"type":"array","title":"Data"},"meta":{"$ref":"#/components/schemas/PageMeta"}},"type":"object","required":["data","meta"],"title":"CampaignRunsResponse"},"CampaignsResponse":{"properties":{"data":{"items":{"$ref":"#/components/schemas/Campaign"},"type":"array","title":"Data"},"meta":{"$ref":"#/components/schemas/PageMeta"}},"type":"object","required":["data","meta"],"title":"CampaignsResponse"},"ChatDetail":{"properties":{"id":{"type":"string","title":"Id"},"agent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Id","description":"The agent that held the conversation; `null` when that agent is no longer the customer's."},"channel":{"$ref":"#/components/schemas/PublicChatChannel","description":"Always `whatsapp` today."},"contact_phone":{"type":"string","title":"Contact Phone","description":"The contact's WhatsApp number, E.164. Personal data."},"business_phone":{"type":"string","title":"Business Phone","description":"The business WhatsApp number the contact wrote to or was written from, E.164."},"started_at":{"type":"string","format":"date-time","title":"Started At","description":"When the conversation started."},"ended_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Ended At","description":"When it ended; `null` while it is open."},"status":{"$ref":"#/components/schemas/PublicChatStatus"},"finish_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Finish Reason","description":"Why it ended, e.g. `Hangup`, `Expired.`, `No actions.`, `Template button`; others may appear. `null` while open."},"messages":{"items":{"$ref":"#/components/schemas/ChatMessage"},"type":"array","title":"Messages","description":"The messages, oldest first."},"messages_truncated":{"type":"boolean","title":"Messages Truncated","description":"`true` when the conversation has more messages than were returned.","default":false}},"type":"object","required":["id","channel","contact_phone","business_phone","started_at","status"],"title":"ChatDetail"},"ChatMessage":{"properties":{"id":{"type":"string","title":"Id"},"role":{"$ref":"#/components/schemas/PublicChatMessageRole"},"type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Type","description":"The message kind as WhatsApp names it, e.g. `text`, `image`, `audio`, `video`, `document`, `location`, `template`, `interactive`, `button`, `reaction`; `null` when unreadable."},"text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Text","description":"What the message says: its text, a media caption, the body of an interactive message or the option the contact picked; `null` when it has none."},"sent_at":{"type":"string","format":"date-time","title":"Sent At","description":"When the message was sent or received."},"status":{"$ref":"#/components/schemas/PublicChatMessageStatus"}},"type":"object","required":["id","role","sent_at","status"],"title":"ChatMessage"},"ChatSummary":{"properties":{"id":{"type":"string","title":"Id"},"agent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Id","description":"The agent that held the conversation; `null` when that agent is no longer the customer's."},"channel":{"$ref":"#/components/schemas/PublicChatChannel","description":"Always `whatsapp` today."},"contact_phone":{"type":"string","title":"Contact Phone","description":"The contact's WhatsApp number, E.164. Personal data."},"business_phone":{"type":"string","title":"Business Phone","description":"The business WhatsApp number the contact wrote to or was written from, E.164."},"started_at":{"type":"string","format":"date-time","title":"Started At","description":"When the conversation started."},"ended_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Ended At","description":"When it ended; `null` while it is open."},"status":{"$ref":"#/components/schemas/PublicChatStatus"},"finish_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Finish Reason","description":"Why it ended, e.g. `Hangup`, `Expired.`, `No actions.`, `Template button`; others may appear. `null` while open."}},"type":"object","required":["id","channel","contact_phone","business_phone","started_at","status"],"title":"ChatSummary"},"ChatsResponse":{"properties":{"data":{"items":{"$ref":"#/components/schemas/ChatSummary"},"type":"array","title":"Data"},"meta":{"$ref":"#/components/schemas/PageMeta"}},"type":"object","required":["data","meta"],"title":"ChatsResponse"},"Contact":{"properties":{"id":{"type":"string","title":"Id"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone","description":"The contact's phone number in E.164 format, e.g. `+34600111222`; `null` when only another channel is known."},"given_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Given Name","description":"First name."},"family_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Family Name","description":"Last name."},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email","description":"Email address, lower-cased."},"preferred_language":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Preferred Language","description":"The language the contact prefers, e.g. `SPANISH`, `CATALAN`, `ENGLISH`; others may appear."},"tags":{"items":{"type":"string"},"type":"array","title":"Tags","description":"Labels the customer gave the contact."},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"When the contact was first recorded."},"updated_at":{"type":"string","format":"date-time","title":"Updated At","description":"When the contact last changed."}},"type":"object","required":["id","created_at","updated_at"],"title":"Contact"},"ContactsResponse":{"properties":{"data":{"items":{"$ref":"#/components/schemas/Contact"},"type":"array","title":"Data"},"meta":{"$ref":"#/components/schemas/PageMeta"}},"type":"object","required":["data","meta"],"title":"ContactsResponse"},"FunnelCounts":{"properties":{"total":{"type":"integer","title":"Total"},"booking_intent":{"type":"integer","title":"Booking Intent"},"no_interaction":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"No Interaction"},"direct_transfer":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Direct Transfer"},"no_booking_intent":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"No Booking Intent"},"has_availability":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Has Availability"},"no_availability":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"No Availability"},"dropped_before_check":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Dropped Before Check"},"booked":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Booked"},"booked_after_no_availability_offer":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Booked After No Availability Offer"},"wa_handoff_sent":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Wa Handoff Sent"},"wa_handoff_completed":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Wa Handoff Completed"},"other_inquiries":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Other Inquiries"},"with_alternative":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"With Alternative"},"whatsapp_link_sent":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Whatsapp Link Sent"},"leads_captured":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Leads Captured"},"availability_check_disabled":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Availability Check Disabled"},"mail_sent_to_venue":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Mail Sent To Venue"}},"type":"object","required":["total","booking_intent"],"title":"FunnelCounts","description":"Session counts per stage. Restaurants fill the restaurant stages, hotels the hotel ones.\n\nHotel stages not exported on purpose (dashboard drill-downs, not funnel\nstages): the other_inquiries breakdown (faq / event / other_services /\ntransfer), whatsapp_link_sent_via_alternative and available_not_converted."},"FunnelData":{"properties":{"total":{"$ref":"#/components/schemas/FunnelTotal"},"days":{"anyOf":[{"items":{"$ref":"#/components/schemas/FunnelDay"},"type":"array"},{"type":"null"}],"title":"Days"}},"type":"object","required":["total"],"title":"FunnelData"},"FunnelDay":{"properties":{"date":{"type":"string","format":"date","title":"Date"},"stages":{"$ref":"#/components/schemas/FunnelCounts"}},"type":"object","required":["date","stages"],"title":"FunnelDay"},"FunnelResponse":{"properties":{"data":{"$ref":"#/components/schemas/FunnelData"},"meta":{"$ref":"#/components/schemas/Meta"}},"type":"object","required":["data","meta"],"title":"FunnelResponse"},"FunnelTotal":{"properties":{"stages":{"$ref":"#/components/schemas/FunnelCounts"},"unique_callers":{"anyOf":[{"$ref":"#/components/schemas/FunnelCounts"},{"type":"null"}]},"recovered_diners":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Recovered Diners"},"recovered_revenue":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Recovered Revenue","description":"recovered_diners × average ticket, in the currency the summary reports as `currency` (both from the requested venue_ids only when given)."}},"type":"object","required":["stages"],"title":"FunnelTotal","description":"See FunnelCounts for the hotel stages left out."},"Granularity":{"type":"string","enum":["total","day"],"title":"Granularity"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"Integration":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"type":{"type":"string","title":"Type","description":"The partner or system integrated, e.g. `COVERMANAGER`, `THE_FORK`, `OPENTABLE`, `MEWS_PMS`, `WHATSAPP_META`; others may appear."},"category":{"$ref":"#/components/schemas/PublicIntegrationCategory","description":"`BACKEND`: a booking or property system; `CHANNEL`: a conversation channel; `SERVICE`: any other service; `NOT_AVAILABLE`: not classified."},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At","description":"When the integration was installed or last became a different one: a change of its customer, type, external id (e.g. a CoverManager slug) or scope, or a restore after a delete, restarts it. `null` if unknown."}},"type":"object","required":["id","name","type","category"],"title":"Integration"},"IntegrationsResponse":{"properties":{"data":{"items":{"$ref":"#/components/schemas/Integration"},"type":"array","title":"Data"},"meta":{"$ref":"#/components/schemas/PageMeta"}},"type":"object","required":["data","meta"],"title":"IntegrationsResponse"},"Invoice":{"properties":{"id":{"type":"string","title":"Id"},"account_id":{"type":"string","title":"Account Id","description":"The billing account the invoice is issued to."},"number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Number","description":"The invoice number."},"type":{"type":"string","title":"Type","description":"The kind of document: `invoice`, or `credit_note` for a correction of another invoice."},"currency":{"type":"string","title":"Currency","description":"ISO 4217 code of every amount, e.g. `EUR`."},"issued_on":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Issued On"},"due_on":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Due On"},"status":{"$ref":"#/components/schemas/PublicInvoiceStatus"},"subtotal_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Subtotal Cents","description":"Before taxes, in the minor units of `currency` (its ISO 4217 exponent: cents for EUR, MXN or COP, whole units for CLP or PYG)."},"tax_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Tax Cents","description":"Taxes, in the minor units of `currency` (its ISO 4217 exponent: cents for EUR, MXN or COP, whole units for CLP or PYG)."},"total_cents":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Cents","description":"With taxes, in the minor units of `currency` (its ISO 4217 exponent: cents for EUR, MXN or COP, whole units for CLP or PYG)."},"rectifies":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rectifies","description":"A credit note's: the id of the invoice it corrects. Subtract a partial credit note's total from that invoice's; one that cancels it in full makes both `VOID`."}},"type":"object","required":["id","account_id","type","currency","status"],"title":"Invoice"},"InvoicesResponse":{"properties":{"data":{"items":{"$ref":"#/components/schemas/Invoice"},"type":"array","title":"Data"},"meta":{"$ref":"#/components/schemas/PageMeta"}},"type":"object","required":["data","meta"],"title":"InvoicesResponse"},"KnowledgeBase":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"type":{"$ref":"#/components/schemas/PublicKnowledgeBaseType"},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source","description":"The website or file name the content came from."},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","name","type","created_at","updated_at"],"title":"KnowledgeBase"},"KnowledgeBasesResponse":{"properties":{"data":{"items":{"$ref":"#/components/schemas/KnowledgeBase"},"type":"array","title":"Data"},"meta":{"$ref":"#/components/schemas/PageMeta"}},"type":"object","required":["data","meta"],"title":"KnowledgeBasesResponse"},"Meta":{"properties":{"customer_id":{"type":"string","format":"uuid","title":"Customer Id"},"industry":{"$ref":"#/components/schemas/PublicIndustry"},"from":{"type":"string","format":"date","title":"From"},"to":{"type":"string","format":"date","title":"To"},"timezone":{"type":"string","title":"Timezone"},"granularity":{"$ref":"#/components/schemas/Granularity"},"api_version":{"type":"string","title":"Api Version"},"generated_at":{"type":"string","format":"date-time","title":"Generated At"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"type":"object","required":["customer_id","industry","from","to","timezone","granularity","api_version","generated_at"],"title":"Meta"},"Number":{"properties":{"id":{"type":"string","title":"Id"},"phone_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone Number","description":"The number in E.164 format, e.g. `+34910000000`; `null` for a number that is not `PSTN`."},"virtual_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Virtual Id","description":"The id a `VIRTUAL` number is reached by on the customer's switchboard, if one."},"type":{"$ref":"#/components/schemas/PublicNumberType","description":"`PSTN`: a phone line on the public network; `VIRTUAL`: reached through a switchboard."},"status":{"$ref":"#/components/schemas/PublicNumberStatus","description":"`ACTIVE`: in service; `BLOCKED`: in service but not assignable; `INACTIVE`; `PENDING_DELETION`."},"ownership":{"$ref":"#/components/schemas/PublicNumberOwnership","description":"`BOOKLINE`: Bookline holds the line at the carrier; `CUSTOMER`: the customer holds it and Bookline only routes it."}},"type":"object","required":["id","type","status","ownership"],"title":"Number"},"NumbersResponse":{"properties":{"data":{"items":{"$ref":"#/components/schemas/Number"},"type":"array","title":"Data"},"meta":{"$ref":"#/components/schemas/PageMeta"}},"type":"object","required":["data","meta"],"title":"NumbersResponse"},"PageMeta":{"properties":{"limit":{"type":"integer","title":"Limit","description":"Items per page, as requested."},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor","description":"Pass it as `cursor` to get the next page; `null` on the last one."}},"type":"object","required":["limit"],"title":"PageMeta"},"PublicAccessLevel":{"type":"string","enum":["ADMIN","VIEW","CREATE","UPDATE","DELETE"],"title":"PublicAccessLevel","description":"What a team member may do. Mirrors ``AccessLevel`` (a test pins it)."},"PublicAccessResource":{"type":"string","enum":["ALL","BOTS","ACCOUNTS","ACTIVITY","VENUES"],"title":"PublicAccessResource","description":"What a team member's access covers. Mirrors ``AccessResource`` (a test pins it)."},"PublicCallDisposition":{"type":"string","enum":["CONNECTED","NO_ROUTE","REJECTED","FAILED","ABANDONED"],"title":"PublicCallDisposition","description":"How the call ended up. Only `CONNECTED` calls reached an agent."},"PublicCampaignChannel":{"type":"string","enum":["CALL","WHATSAPP"],"title":"PublicCampaignChannel","description":"How a campaign reaches each contact. Mirrors ``NotificationType`` (a test pins it):\na new stored value is a 502 until it is added here on purpose."},"PublicCampaignRunStatus":{"type":"string","enum":["SCHEDULED","LAUNCHED","SUCCESS","ERROR","CANCELLED"],"title":"PublicCampaignRunStatus","description":"Where a run is. Mirrors ``NotificationScheduleRunStatus`` (a test pins it)."},"PublicChannel":{"type":"string","enum":["PHONE","WHATSAPP","TERMINAL","INSTAGRAM","WEB"],"title":"PublicChannel"},"PublicChatChannel":{"type":"string","enum":["whatsapp"],"title":"PublicChatChannel"},"PublicChatMessageRole":{"type":"string","enum":["user","agent"],"title":"PublicChatMessageRole","description":"Who wrote the message: the contact (`user`) or the business (`agent`)."},"PublicChatMessageStatus":{"type":"string","enum":["deleted","delivered","failed","read","sent","warning","created"],"title":"PublicChatMessageStatus","description":"WhatsApp's delivery status of the message; `created` until WhatsApp reports one."},"PublicChatStatus":{"type":"string","enum":["IN_PROGRESS","FINISHED"],"title":"PublicChatStatus","description":"Whether the conversation is still open."},"PublicError":{"properties":{"code":{"$ref":"#/components/schemas/PublicErrorCode"},"message":{"type":"string","title":"Message"},"available_from":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Available From","description":"not_found only, when the window ends before any of the customer's data starts."}},"type":"object","required":["code","message"],"title":"PublicError"},"PublicErrorBody":{"properties":{"error":{"$ref":"#/components/schemas/PublicError"}},"type":"object","required":["error"],"title":"PublicErrorBody"},"PublicErrorCode":{"type":"string","enum":["invalid_query","range_too_large","industry_ambiguous","customer_ambiguous","granularity_not_supported","invalid_api_key","insufficient_scope","venue_not_found","not_found","rate_limited","upstream_error","upstream_busy","upstream_timeout","conflict","validation_failed","precondition_failed","precondition_required"],"title":"PublicErrorCode"},"PublicIndustry":{"type":"string","enum":["RESTAURANTS","LODGING"],"title":"PublicIndustry"},"PublicIntegrationCategory":{"type":"string","enum":["CHANNEL","BACKEND","SERVICE","NOT_AVAILABLE"],"title":"PublicIntegrationCategory","description":"What the integration does. Mirrors ``IntegrationMainType`` (a test pins it)."},"PublicInvoiceStatus":{"type":"string","enum":["OPEN","PAID","VOID"],"title":"PublicInvoiceStatus","description":"Where an invoice stands, as the accounting provider last reported it, except that a\ndocument credit notes cancel in full is VOID whatever the provider says: an invoice\nthey cover, and a credit note spent covering it. A partial credit note leaves the\ninvoice OPEN (or PAID) at its full total: subtract it through its ``rectifies``."},"PublicKnowledgeBaseType":{"type":"string","enum":["WEBSITE","TEXT","FILE","INTEGRATION"],"title":"PublicKnowledgeBaseType","description":"Where the content comes from. Mirrors ``KnowledgeBaseType`` (a test pins it): a new\nstored value is a 502 until it is added here on purpose."},"PublicNumberOwnership":{"type":"string","enum":["BOOKLINE","CUSTOMER"],"title":"PublicNumberOwnership","description":"Who holds the line at the carrier. Mirrors ``NumberOwnership`` (a test pins it)."},"PublicNumberStatus":{"type":"string","enum":["ACTIVE","BLOCKED","INACTIVE","PENDING_DELETION"],"title":"PublicNumberStatus","description":"Mirrors ``BooklineNumberStatus`` (a test pins it)."},"PublicNumberType":{"type":"string","enum":["PSTN","VIRTUAL"],"title":"PublicNumberType","description":"How the number is reached. Mirrors ``BooklineNumberType`` (a test pins it)."},"PublicServiceStatus":{"type":"string","enum":["DRAFT","TRIAL","ENROLLED","EXEMPT","OFF_SEASON","SCHEDULED","PAUSED","CANCELLED","TRIAL_ENDED"],"title":"PublicServiceStatus","description":"Where a contracted service stands today. Mirrors ``ServiceStatus`` (a test pins it)."},"PublicServiceType":{"type":"string","enum":["VOICE_ASSISTANT","WHATSAPP_BOT","PBX","MESSAGES","CRM_MARKETING","OTHER"],"title":"PublicServiceType","description":"What a contracted service is. Mirrors ``ServiceType`` (a test pins it): a new stored\nvalue is a 502 until it is added here on purpose."},"ReservationsData":{"properties":{"total":{"$ref":"#/components/schemas/ReservationsTotal"},"days":{"anyOf":[{"items":{"$ref":"#/components/schemas/ReservationsDay"},"type":"array"},{"type":"null"}],"title":"Days"}},"type":"object","required":["total"],"title":"ReservationsData"},"ReservationsDay":{"properties":{"date":{"type":"string","format":"date","title":"Date"},"reservations":{"type":"integer","title":"Reservations","description":"Bookings still valid at the POS whose visit (reservation_at) falls on this day in the query timezone."},"diners":{"type":"integer","title":"Diners","description":"Diners of those reservations."}},"type":"object","required":["date","reservations","diners"],"title":"ReservationsDay"},"ReservationsResponse":{"properties":{"data":{"$ref":"#/components/schemas/ReservationsData"},"meta":{"$ref":"#/components/schemas/Meta"}},"type":"object","required":["data","meta"],"title":"ReservationsResponse"},"ReservationsTotal":{"properties":{"reservations":{"type":"integer","title":"Reservations","description":"Bookings still valid at the POS whose visit (reservation_at) falls in [from, to] in the query timezone."},"diners":{"type":"integer","title":"Diners","description":"Diners of those reservations."},"no_shows":{"type":"integer","title":"No Shows","description":"No-shows the POS reported among the bookings whose visit (reservation_at) falls in [from, to] in the query timezone, once the visit has happened."},"fulfilled_in_window":{"type":"integer","title":"Fulfilled In Window","description":"Fulfilled bookings whose visit (reservation_at) falls in [from, to] in the query timezone and whose visit has already happened: the no-show rate's denominator."},"no_show_rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"No Show Rate","description":"no_shows / fulfilled_in_window as a percentage 0-100; null when no fulfilled bookings."}},"type":"object","required":["reservations","diners","no_shows","fulfilled_in_window"],"title":"ReservationsTotal","description":"Every field counts one population: the bookings whose visit falls in\nthe window, not the bookings made in it."},"SummaryData":{"properties":{"total":{"$ref":"#/components/schemas/SummaryTotal"},"days":{"anyOf":[{"items":{"$ref":"#/components/schemas/SummaryDay"},"type":"array"},{"type":"null"}],"title":"Days"}},"type":"object","required":["total"],"title":"SummaryData"},"SummaryDay":{"properties":{"date":{"type":"string","format":"date","title":"Date"},"calls":{"type":"integer","title":"Calls"},"call_duration_seconds":{"type":"integer","title":"Call Duration Seconds"},"booking_intents":{"type":"integer","title":"Booking Intents"},"transfers":{"type":"integer","title":"Transfers"},"calls_finished":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Calls Finished"},"bookings":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Bookings","description":"Sessions that made a confirmed booking (one per session), by the session's start; restaurants only."},"booking_diners":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Booking Diners","description":"Diners of the confirmed bookings made in the window (every booking counts), by the booking's start; restaurants only."},"cancellations":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Cancellations"}},"type":"object","required":["date","calls","call_duration_seconds","booking_intents","transfers"],"title":"SummaryDay"},"SummaryResponse":{"properties":{"data":{"$ref":"#/components/schemas/SummaryData"},"meta":{"$ref":"#/components/schemas/Meta"}},"type":"object","required":["data","meta"],"title":"SummaryResponse"},"SummaryTotal":{"properties":{"calls":{"type":"integer","title":"Calls"},"calls_finished":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Calls Finished"},"call_duration_seconds":{"type":"integer","title":"Call Duration Seconds"},"distinct_callers":{"type":"integer","title":"Distinct Callers"},"repeat_callers":{"type":"integer","title":"Repeat Callers"},"booking_intents":{"type":"integer","title":"Booking Intents"},"transfers":{"type":"integer","title":"Transfers"},"transfers_answered":{"type":"integer","title":"Transfers Answered"},"intents_by_type":{"additionalProperties":{"type":"integer"},"type":"object","title":"Intents By Type"},"bookings":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Bookings","description":"Sessions that made a confirmed booking (one per session), by the session's start; restaurants only."},"booking_diners":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Booking Diners","description":"Diners of the confirmed bookings made in the window (every booking counts), by the booking's start; restaurants only."},"cancellations":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Cancellations"},"visits":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Visits","description":"Confirmed bookings, any party size, whose visit (reservation_at) falls in [from, to] in the query timezone, wherever they were made; restaurants only. /reservations counts those with a party size."},"visit_diners":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Visit Diners","description":"Diners of those visits; restaurants only."},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Currency","description":"Currency of the value fields: the most common currency of the customer's venues, or of the requested venue_ids only."},"avg_ticket_price":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Avg Ticket Price","description":"Average ticket per diner, in `currency`: each venue's ticket weighted by its diners (the plain mean of the venues' tickets when there are none), over the requested venue_ids only when given."},"estimated_value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Estimated Value","description":"booking_diners × avg_ticket_price, in `currency`."},"cost":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cost","description":"Subscription cost, in `cost_currency` (EUR). Null when the query names venue_ids: the subscription cost is the whole account's, not the venues'."},"cost_currency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cost Currency","description":"Currency of `cost`. Null when the query names venue_ids: the subscription cost is the whole account's, not the venues'."},"roi":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Roi","description":"estimated_value minus the cost, both in `currency`; null when the cost cannot be converted to `currency`. Null when the query names venue_ids: the subscription cost is the whole account's, not the venues'."},"revenue_per_euro":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Revenue Per Euro","description":"Ratio estimated_value / cost, both in `currency` (unitless); null when the cost is zero or cannot be converted. Null when the query names venue_ids: the subscription cost is the whole account's, not the venues'."},"net_profit_per_euro":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Net Profit Per Euro","description":"Ratio (estimated_value - cost) / cost, both in `currency` (unitless); null when the cost is zero or cannot be converted. Null when the query names venue_ids: the subscription cost is the whole account's, not the venues'."}},"type":"object","required":["calls","call_duration_seconds","distinct_callers","repeat_callers","booking_intents","transfers","transfers_answered","intents_by_type"],"title":"SummaryTotal"},"SurveyRatingRow":{"properties":{"rated_at":{"type":"string","format":"date-time","title":"Rated At"},"phone":{"type":"string","title":"Phone"},"score":{"type":"number","title":"Score"},"min_score":{"type":"integer","title":"Min Score"},"max_score":{"type":"integer","title":"Max Score"},"bot_id":{"type":"string","title":"Bot Id"},"venue_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Venue Id"}},"type":"object","required":["rated_at","phone","score","min_score","max_score","bot_id"],"title":"SurveyRatingRow"},"SurveyRatingsData":{"properties":{"rows":{"items":{"$ref":"#/components/schemas/SurveyRatingRow"},"type":"array","title":"Rows"}},"type":"object","required":["rows"],"title":"SurveyRatingsData"},"SurveyRatingsResponse":{"properties":{"data":{"$ref":"#/components/schemas/SurveyRatingsData"},"meta":{"$ref":"#/components/schemas/Meta"}},"type":"object","required":["data","meta"],"title":"SurveyRatingsResponse"},"TeamMember":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"email":{"type":"string","title":"Email","description":"The address the team member logs in with."},"access":{"items":{"$ref":"#/components/schemas/TeamMemberAccess"},"type":"array","title":"Access","description":"The team member's access to this customer only."}},"type":"object","required":["id","name","email"],"title":"TeamMember"},"TeamMemberAccess":{"properties":{"level":{"$ref":"#/components/schemas/PublicAccessLevel","description":"What the team member may do: `ADMIN`, `VIEW`, `CREATE`, `UPDATE` or `DELETE`."},"resource":{"$ref":"#/components/schemas/PublicAccessResource","description":"What it covers: `ALL` of the customer, some `VENUES`, or only `BOTS`, `ACCOUNTS` or `ACTIVITY`."},"venue_ids":{"items":{"type":"string"},"type":"array","title":"Venue Ids","description":"The venues it covers when `resource` is `VENUES`; empty otherwise."}},"type":"object","required":["level","resource"],"title":"TeamMemberAccess"},"TeamMembersResponse":{"properties":{"data":{"items":{"$ref":"#/components/schemas/TeamMember"},"type":"array","title":"Data"},"meta":{"$ref":"#/components/schemas/PageMeta"}},"type":"object","required":["data","meta"],"title":"TeamMembersResponse"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"Venue":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"}},"type":"object","required":["id","name"],"title":"Venue"},"VenueContact":{"properties":{"channel":{"type":"string","title":"Channel","description":"How to reach the venue. Known values: `PHONE_NUMBER`, `WHATSAPP_BUSINESS_PHONE`, `EMAIL`, `FACEBOOK`, `INSTAGRAM`; others may appear."},"value":{"type":"string","title":"Value"}},"type":"object","required":["channel","value"],"title":"VenueContact"},"VenueDetail":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"type":{"type":"string","title":"Type","description":"The venue's kind. Known values: `RESTAURANT`, `HOTEL`, `CAMPING`, `APARTMENTS`, `HOSTEL`, `TAXI_DISPATCHER`, `OTHER`; others may appear."},"subtype":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subtype"},"parent_venue_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Venue Id","description":"The venue this one is inside of, e.g. a hotel's restaurant."},"language":{"type":"string","title":"Language","description":"The venue's language as set in the portal, e.g. `SPANISH`, `CATALAN`, `ENGLISH`; others may appear."},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Currency","description":"ISO 4217 code, e.g. `EUR`."},"timezone":{"type":"string","title":"Timezone","description":"IANA zone of the venue."},"country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country","description":"ISO 3166-1 alpha-2; `null` when unknown."},"city":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"City"},"street_address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Street Address"},"postal_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Postal Code"},"website":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Website"},"contact_details":{"items":{"$ref":"#/components/schemas/VenueContact"},"type":"array","title":"Contact Details"}},"type":"object","required":["id","name","type","language","timezone"],"title":"VenueDetail"},"VenuesResponse":{"properties":{"data":{"items":{"$ref":"#/components/schemas/Venue"},"type":"array","title":"Data"}},"type":"object","required":["data"],"title":"VenuesResponse"},"PublicVenueContactChannel":{"description":"The channels a venue's contact details can be written with. Mirrors\n``VenueContactChannel`` (a test pins it).","enum":["PHONE_NUMBER","WHATSAPP_BUSINESS_PHONE","EMAIL","FACEBOOK","INSTAGRAM"],"title":"PublicVenueContactChannel","type":"string"},"VenueContactInput":{"additionalProperties":false,"properties":{"channel":{"$ref":"#/components/schemas/PublicVenueContactChannel"},"value":{"maxLength":320,"minLength":1,"title":"Value","type":"string"}},"required":["channel","value"],"title":"VenueContactInput","type":"object"},"VenueUpdate":{"additionalProperties":false,"description":"What a key with ``venues:write`` may change on a venue; the fields left out stay as\nthey are, and at least one is sent. ``contact_details`` replaces the entries of the\npublic channels; the stored ones of any other channel are kept.","properties":{"name":{"anyOf":[{"maxLength":200,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"The venue's name. A new name also replaces how the agents pronounce it (set custom pronunciations in the portal).","title":"Name"},"website":{"anyOf":[{"maxLength":2048,"type":"string"},{"type":"null"}],"default":null,"description":"An http(s) URL, or `null` to remove it. A website stored without its scheme (e.g. `www.example.com`, set in the portal) is read back as stored and must be sent back with `https://`.","title":"Website"},"contact_details":{"anyOf":[{"items":{"$ref":"#/components/schemas/VenueContactInput"},"maxItems":20,"type":"array"},{"type":"null"}],"default":null,"description":"Every way to reach the venue on the channels listed here: the list sent replaces the stored entries of these channels; an entry stored with another channel (set in the portal, e.g. `TELEGRAM`) is kept. A phone (`PHONE_NUMBER`, `WHATSAPP_BUSINESS_PHONE`) must be a valid number in E.164, starting with `+` and its country code, e.g. `+34600111222`; it is stored normalised. A phone stored in national format (e.g. set in the portal) is read back as stored and must be sent back in E.164.","title":"Contact Details"}},"title":"VenueUpdate","type":"object"},"AgentUpdate":{"additionalProperties":false,"description":"What a key with ``bots:write`` may change on an agent: its display name only.","properties":{"name":{"description":"The agent's display name.","maxLength":120,"minLength":1,"title":"Name","type":"string"}},"required":["name"],"title":"AgentUpdate","type":"object"},"KnowledgeBaseCreate":{"additionalProperties":false,"description":"A TEXT knowledge base of the key's customer. Website and file knowledge bases are\ncreated in the portal.","properties":{"name":{"description":"The knowledge base's name, as the portal lists it.","maxLength":200,"minLength":1,"title":"Name","type":"string"},"text":{"description":"What the agents answer questions from, as plain text.","maxLength":200000,"minLength":1,"title":"Text","type":"string"}},"required":["name","text"],"title":"KnowledgeBaseCreate","type":"object"},"KnowledgeBaseUpdate":{"additionalProperties":false,"description":"What a key with ``knowledge_bases:write`` may change on a TEXT knowledge base; the\nfields left out stay as they are. ``text`` replaces the whole content.","properties":{"name":{"anyOf":[{"maxLength":200,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"The knowledge base's name, as the portal lists it.","title":"Name"},"text":{"anyOf":[{"maxLength":200000,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"What the agents answer questions from, as plain text. Replaces the stored text.","title":"Text"}},"title":"KnowledgeBaseUpdate","type":"object"},"CampaignUpdate":{"additionalProperties":false,"description":"What a key with ``notifications:write`` may change on a campaign: pausing it.\nEnabling a campaign sends messages to the customer's contacts, so it is done in the\nportal only.","properties":{"enabled":{"const":false,"description":"`false` pauses the campaign: it stops running on its schedule. Messages a run in progress has already queued are still sent (cancel the run in the Bookline portal to stop them). Enabling it again is done in the Bookline portal.","title":"Enabled","type":"boolean"}},"required":["enabled"],"title":"CampaignUpdate","type":"object"},"ContactCreate":{"additionalProperties":false,"description":"A new contact of the key's customer: at least a phone or an email.","properties":{"phone":{"anyOf":[{"maxLength":32,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"A valid phone number in E.164 format, starting with `+` and its country code, e.g. `+34600111222`. Stored normalised. Unique per customer.","title":"Phone"},"email":{"anyOf":[{"maxLength":320,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"An email address, stored lower-cased. Unique per customer.","title":"Email"},"given_name":{"anyOf":[{"maxLength":200,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"First name.","title":"Given Name"},"family_name":{"anyOf":[{"maxLength":200,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"Last name.","title":"Family Name"},"preferred_language":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"The language the contact prefers, e.g. `SPANISH`, `CATALAN`, `ENGLISH`.","title":"Preferred Language"},"tags":{"description":"Labels for the contact.","items":{"maxLength":100,"minLength":1,"type":"string"},"maxItems":20,"title":"Tags","type":"array"}},"title":"ContactCreate","type":"object"},"ContactUpdate":{"additionalProperties":false,"description":"A change to a contact: only the fields sent change, `null` removes one (except\n`tags`: send `[]` to remove them all). Removing the last way to identify the contact is refused.","properties":{"phone":{"anyOf":[{"maxLength":32,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"A valid phone number in E.164 format, starting with `+` and its country code, e.g. `+34600111222`. Stored normalised. Unique per customer.","title":"Phone"},"email":{"anyOf":[{"maxLength":320,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"An email address, stored lower-cased. Unique per customer.","title":"Email"},"given_name":{"anyOf":[{"maxLength":200,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"First name.","title":"Given Name"},"family_name":{"anyOf":[{"maxLength":200,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"Last name.","title":"Family Name"},"preferred_language":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"The language the contact prefers, e.g. `SPANISH`, `CATALAN`, `ENGLISH`.","title":"Preferred Language"},"tags":{"anyOf":[{"items":{"maxLength":100,"minLength":1,"type":"string"},"maxItems":20,"type":"array"},{"type":"null"}],"default":null,"description":"Labels for the contact: the list sent replaces the stored one.","title":"Tags"}},"title":"ContactUpdate","type":"object"},"PublicGrantResource":{"description":"What a grant written through the public API may cover. ``BOTS`` and ``ACCOUNTS``\ngrants are set in the portal only.","enum":["ALL","VENUES","ACTIVITY"],"title":"PublicGrantResource","type":"string"},"TeamMemberAccessInput":{"additionalProperties":false,"properties":{"level":{"$ref":"#/components/schemas/PublicAccessLevel","description":"What the team member may do: `ADMIN`, `VIEW`, `CREATE`, `UPDATE` or `DELETE`. A user key writes only when its owner holds `ADMIN` on `ALL` of the customer."},"resource":{"$ref":"#/components/schemas/PublicGrantResource","description":"What it covers: `ALL` of the customer, some `VENUES`, or `ACTIVITY` (metrics, calls and chats)."},"venue_ids":{"description":"Live venues of the customer, required when `resource` is `VENUES` and refused otherwise.","items":{"maxLength":64,"minLength":1,"type":"string"},"maxItems":200,"title":"Venue Ids","type":"array"}},"required":["level","resource"],"title":"TeamMemberAccessInput","type":"object"},"TeamMemberUpdate":{"additionalProperties":false,"description":"A team member's whole access to this customer: the list sent replaces it. Their\naccess to other customers is never read nor changed. Removing it all is\n``DELETE /v1/users/{user_id}``.","properties":{"access":{"description":"Every `ALL`, `VENUES` and `ACTIVITY` grant the team member holds on this customer: the list sent replaces those, so a list with one grant removes all the others, `ADMIN` on `ALL` included. `BOTS` and `ACCOUNTS` grants, which the read also answers, are set in the portal only: leave them out, they are kept.","items":{"$ref":"#/components/schemas/TeamMemberAccessInput"},"maxItems":20,"minItems":1,"title":"Access","type":"array"}},"required":["access"],"title":"TeamMemberUpdate","type":"object"}},"securitySchemes":{"APIKeyHeader":{"type":"apiKey","in":"header","name":"apikey"}}}}