{"openapi":"3.1.0","info":{"title":"Chatserver","description":"Headless multi-tenant customer support messaging platform","version":"0.1.0"},"paths":{"/api/health":{"get":{"tags":["health"],"summary":"Health","description":"Liveness: the process is up. Deliberately ignores dependencies so a DB blip does not restart pods.","operationId":"health_api_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"type":"string"},"type":"object","title":"Response Health Api Health Get"}}}}}}},"/api/ready":{"get":{"tags":["health"],"summary":"Ready","description":"Readiness: this pod can deliver realtime events. Without the LISTEN connection it serves\nREST fine but delivers nothing live, so the LB must not route new WebSockets to it.","operationId":"ready_api_ready_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Ready Api Ready Get"}}}}}}},"/api/auth/widget-token":{"post":{"tags":["auth"],"summary":"Create Widget Token","operationId":"create_widget_token_api_auth_widget_token_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WidgetTokenRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WidgetTokenResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/tenants":{"post":{"tags":["tenants"],"summary":"Create Tenant","operationId":"create_tenant_api_tenants_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantCreateRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantCreateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/tenants/{tenant_id}":{"get":{"tags":["tenants"],"summary":"Get Tenant","operationId":"get_tenant_api_tenants__tenant_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"tenant_id","in":"path","required":true,"schema":{"type":"integer","title":"Tenant Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["tenants"],"summary":"Update Tenant","operationId":"update_tenant_api_tenants__tenant_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"tenant_id","in":"path","required":true,"schema":{"type":"integer","title":"Tenant Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/service-tokens":{"get":{"tags":["service-tokens"],"summary":"List Service Tokens","operationId":"list_service_tokens_api_service_tokens_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ServiceTokenListResponse"},"type":"array","title":"Response List Service Tokens Api Service Tokens Get"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["service-tokens"],"summary":"Create Service Token","operationId":"create_service_token_api_service_tokens_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceTokenCreateRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceTokenCreateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/service-tokens/{service_token_id}":{"delete":{"tags":["service-tokens"],"summary":"Revoke Service Token","operationId":"revoke_service_token_api_service_tokens__service_token_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"service_token_id","in":"path","required":true,"schema":{"type":"integer","title":"Service Token Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/contacts":{"post":{"tags":["contacts"],"summary":"Create Or Identify Contact","operationId":"create_or_identify_contact_api_contacts_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactUpsertRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/contacts/{contact_id}":{"get":{"tags":["contacts"],"summary":"Get Contact","operationId":"get_contact_api_contacts__contact_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"contact_id","in":"path","required":true,"schema":{"type":"integer","title":"Contact Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/contacts/by-external/{external_id}":{"get":{"tags":["contacts"],"summary":"Get Contact By External","operationId":"get_contact_by_external_api_contacts_by_external__external_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"external_id","in":"path","required":true,"schema":{"type":"string","title":"External Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/conversations":{"post":{"tags":["conversations"],"summary":"Create Conversation","description":"Widgets: resume the contact's latest unresolved conversation (open or handed_off), else create one (200 vs\n201). A new thread starts only after the current one is resolved -- unless the tenant keeps several unresolved\nthreads per contact (`conversations.multiple`) and the widget asks for one with `new` and an `idempotency_key`.\nService tokens always create, for the given contact. A creation under an `idempotency_key` happens once: its\nrepeat is answered with the conversation it created (200), whoever asks and whatever the conversation's status\nis by then. A `customer_token` in the body is attached to the conversation as it is.","operationId":"create_conversation_api_conversations_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationCreateRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Create Conversation Api Conversations Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["conversations"],"summary":"List Conversations","description":"Newest first by id; page with `before_id`.","operationId":"list_conversations_api_conversations_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"enum":["open","handed_off","resolved"],"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"before_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","minimum":1},{"type":"null"}],"title":"Before Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Conversations Api Conversations Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/conversations/{conversation_id}":{"get":{"tags":["conversations"],"summary":"Get Conversation","operationId":"get_conversation_api_conversations__conversation_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"integer","title":"Conversation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Conversation Api Conversations  Conversation Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["conversations"],"summary":"Update Conversation","operationId":"update_conversation_api_conversations__conversation_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"integer","title":"Conversation Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Update Conversation Api Conversations  Conversation Id  Patch"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/conversations/{conversation_id}/claim":{"post":{"tags":["conversations"],"summary":"Claim","description":"Take ownership of a conversation for one bot connection. 409 if another live connection of the same bot\nholds it; idempotent for the same connection. The response epoch must accompany every write.","operationId":"claim_api_conversations__conversation_id__claim_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"integer","title":"Conversation Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClaimRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Claim Api Conversations  Conversation Id  Claim Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/conversations/{conversation_id}/ack":{"post":{"tags":["conversations"],"summary":"Ack","description":"'Handled through seq N, nothing to say.' Fenced like any owner write; bounded by the timeline.","operationId":"ack_api_conversations__conversation_id__ack_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"integer","title":"Conversation Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AckRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Ack Api Conversations  Conversation Id  Ack Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/conversations/{conversation_id}/release":{"post":{"tags":["conversations"],"summary":"Release Claim","description":"Give the conversation back when the bot's session with it ends. The checkpoint stays; if rows remain, the\nconversation is pending again for any replica (this one included). Capacity = claims held, so this is how\ncapacity comes back.","operationId":"release_claim_api_conversations__conversation_id__release_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"integer","title":"Conversation Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HeldClaim"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Release Claim Api Conversations  Conversation Id  Release Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/conversations/{conversation_id}/messages":{"post":{"tags":["conversations"],"summary":"Create Message","operationId":"create_message_api_conversations__conversation_id__messages_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"integer","title":"Conversation Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageCreateRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Create Message Api Conversations  Conversation Id  Messages Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["conversations"],"summary":"List Messages","description":"Rows in `seq` order. `after_seq` resumes forward (live catch-up); `before_seq` or no cursor pages history\nbackward, still returned ascending for rendering.","operationId":"list_messages_api_conversations__conversation_id__messages_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"integer","title":"Conversation Id"}},{"name":"after_seq","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}],"title":"After Seq"}},{"name":"before_seq","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","minimum":1},{"type":"null"}],"title":"Before Seq"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Messages Api Conversations  Conversation Id  Messages Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/conversations/{conversation_id}/attachments":{"post":{"tags":["attachments"],"summary":"Create Attachment","description":"An upload slot: PUT the bytes to `upload_url` with exactly `upload_headers`, then reference `url` from a\nmessage's `attachments[].url`.","operationId":"create_attachment_api_conversations__conversation_id__attachments_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"integer","title":"Conversation Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttachmentCreateRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Create Attachment Api Conversations  Conversation Id  Attachments Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/conversations/{conversation_id}/attachments/{attachment_id}":{"get":{"tags":["attachments"],"summary":"Read Attachment","description":"A short-lived signed read URL for an attachment of a conversation the caller can read.","operationId":"read_attachment_api_conversations__conversation_id__attachments__attachment_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"integer","title":"Conversation Id"}},{"name":"attachment_id","in":"path","required":true,"schema":{"type":"string","title":"Attachment Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Read Attachment Api Conversations  Conversation Id  Attachments  Attachment Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"AckRequest":{"properties":{"connection_id":{"type":"string","title":"Connection Id"},"epoch":{"type":"integer","title":"Epoch"},"through_seq":{"type":"integer","minimum":0.0,"title":"Through Seq"}},"additionalProperties":false,"type":"object","required":["connection_id","epoch","through_seq"],"title":"AckRequest"},"AttachmentCreateRequest":{"properties":{"filename":{"type":"string","maxLength":255,"minLength":1,"title":"Filename"},"content_type":{"type":"string","maxLength":255,"minLength":1,"title":"Content Type"}},"additionalProperties":false,"type":"object","required":["filename","content_type"],"title":"AttachmentCreateRequest"},"AttachmentPayload":{"properties":{"url":{"type":"string","title":"Url"},"filename":{"type":"string","title":"Filename"},"content_type":{"type":"string","title":"Content Type"},"size_bytes":{"type":"integer","title":"Size Bytes"}},"additionalProperties":false,"type":"object","required":["url","filename","content_type","size_bytes"],"title":"AttachmentPayload"},"ClaimRequest":{"properties":{"connection_id":{"type":"string","title":"Connection Id"}},"additionalProperties":false,"type":"object","required":["connection_id"],"title":"ClaimRequest"},"ContactResponse":{"properties":{"id":{"type":"integer","title":"Id"},"tenant_id":{"type":"integer","title":"Tenant Id"},"external_id":{"type":"string","title":"External Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Avatar Url"},"identity_verified":{"type":"boolean","title":"Identity Verified"},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata"}},"type":"object","required":["id","tenant_id","external_id","name","email","phone","avatar_url","identity_verified","metadata"],"title":"ContactResponse"},"ContactUpsertRequest":{"properties":{"external_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Avatar Url"},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata"}},"type":"object","title":"ContactUpsertRequest"},"ConversationCreateRequest":{"properties":{"contact_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Contact Id"},"priority":{"anyOf":[{"type":"string","enum":["low","normal","high","urgent"]},{"type":"null"}],"title":"Priority"},"subject":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subject"},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata"},"customer_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Token"},"new":{"type":"boolean","title":"New","default":false},"idempotency_key":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Idempotency Key"}},"type":"object","title":"ConversationCreateRequest"},"ConversationUpdateRequest":{"properties":{"connection_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Connection Id"},"epoch":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Epoch"},"status":{"anyOf":[{"type":"string","enum":["open","handed_off","resolved"]},{"type":"null"}],"title":"Status"},"priority":{"anyOf":[{"type":"string","enum":["low","normal","high","urgent"]},{"type":"null"}],"title":"Priority"},"subject":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subject"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"},"mark_read_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Mark Read At"}},"type":"object","title":"ConversationUpdateRequest"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"HeldClaim":{"properties":{"connection_id":{"type":"string","title":"Connection Id"},"epoch":{"type":"integer","title":"Epoch"}},"additionalProperties":false,"type":"object","required":["connection_id","epoch"],"title":"HeldClaim"},"MessageCreateRequest":{"properties":{"connection_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Connection Id"},"epoch":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Epoch"},"sender_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sender Id"},"content":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content"},"content_type":{"type":"string","enum":["text","html","markdown","activity"],"title":"Content Type","default":"text"},"visibility":{"type":"string","enum":["public","internal"],"title":"Visibility","default":"public"},"attachments":{"items":{"$ref":"#/components/schemas/AttachmentPayload"},"type":"array","title":"Attachments"},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata"},"idempotency_key":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Idempotency Key"},"in_reply_to_seq":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"In Reply To Seq"},"complete":{"type":"boolean","title":"Complete","default":false},"status":{"anyOf":[{"type":"string","enum":["open","handed_off","resolved"]},{"type":"null"}],"title":"Status"},"conversation_metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Conversation Metadata"},"expected_last_seq":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Expected Last Seq"}},"additionalProperties":false,"type":"object","title":"MessageCreateRequest"},"ServiceTokenCreateRequest":{"properties":{"type":{"type":"string","enum":["bot","admin"],"title":"Type"},"bot_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bot Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},"additionalProperties":false,"type":"object","required":["type"],"title":"ServiceTokenCreateRequest"},"ServiceTokenCreateResponse":{"properties":{"id":{"type":"integer","title":"Id"},"tenant_id":{"type":"integer","title":"Tenant Id"},"type":{"type":"string","enum":["bot","admin"],"title":"Type"},"bot_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bot Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"token":{"type":"string","title":"Token"}},"type":"object","required":["id","tenant_id","type","bot_id","name","token"],"title":"ServiceTokenCreateResponse"},"ServiceTokenListResponse":{"properties":{"id":{"type":"integer","title":"Id"},"tenant_id":{"type":"integer","title":"Tenant Id"},"type":{"type":"string","enum":["bot","admin"],"title":"Type"},"bot_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bot Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"token_redacted":{"type":"string","title":"Token Redacted"}},"type":"object","required":["id","tenant_id","type","bot_id","name","token_redacted"],"title":"ServiceTokenListResponse"},"TenantCreateRequest":{"properties":{"slug":{"type":"string","title":"Slug"},"name":{"type":"string","title":"Name"},"config":{"additionalProperties":true,"type":"object","title":"Config"},"jwks_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Jwks Url"}},"type":"object","required":["slug","name"],"title":"TenantCreateRequest"},"TenantCreateResponse":{"properties":{"id":{"type":"integer","title":"Id"},"slug":{"type":"string","title":"Slug"},"name":{"type":"string","title":"Name"},"config":{"additionalProperties":true,"type":"object","title":"Config"},"jwks_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Jwks Url"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"bootstrap_admin_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bootstrap Admin Token"}},"type":"object","required":["id","slug","name","config","jwks_url","created_at","updated_at"],"title":"TenantCreateResponse"},"TenantResponse":{"properties":{"id":{"type":"integer","title":"Id"},"slug":{"type":"string","title":"Slug"},"name":{"type":"string","title":"Name"},"config":{"additionalProperties":true,"type":"object","title":"Config"},"jwks_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Jwks Url"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","slug","name","config","jwks_url","created_at","updated_at"],"title":"TenantResponse"},"TenantUpdateRequest":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"config":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Config"},"jwks_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Jwks Url"}},"type":"object","title":"TenantUpdateRequest"},"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"},"WidgetTokenRequest":{"properties":{"app_id":{"type":"string","title":"App Id"},"external_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"customer_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Token"}},"type":"object","required":["app_id"],"title":"WidgetTokenRequest"},"WidgetTokenResponse":{"properties":{"token":{"type":"string","title":"Token"},"contact_id":{"type":"integer","title":"Contact Id"},"tenant_id":{"type":"integer","title":"Tenant Id"}},"type":"object","required":["token","contact_id","tenant_id"],"title":"WidgetTokenResponse"}},"securitySchemes":{"HTTPBearer":{"type":"http","scheme":"bearer"}}}}