{"openapi":"3.1.0","info":{"title":"Chesly API","version":"2026-11-01","description":"Your chats from every network you connected in Chesly, through one API key."},"servers":[{"url":"https://api.chesly.app"}],"security":[{"apiKey":[]}],"externalDocs":{"description":"The docs","url":"https://agents.chesly.app/docs"},"components":{"securitySchemes":{"apiKey":{"type":"http","scheme":"bearer","description":"A Chesly API key (ck_live_…), as Authorization: Bearer <key>."}},"schemas":{"Contact":{"type":"object","properties":{"id":{"type":"string","description":"The person's ID (contact_…): the same for them every time."},"name":{"type":"string","description":"Their name, as their direct chat is named."},"network":{"type":"string"},"account_id":{"type":["string","null"],"description":"The account their chat is on (acct_…), when Chesly can tell."},"chat_id":{"type":"string","description":"Their direct chat with the user (chat_…)."}},"required":["id","name","network","account_id","chat_id"]},"ContactList":{"type":"object","properties":{"contacts":{"type":"array","items":{"$ref":"#/components/schemas/Contact"},"description":"Exact names first, then the most recent chat."}},"required":["contacts"]},"Problem":{"type":"object","properties":{"type":{"type":"string","format":"uri","description":"The code's entry in the error docs."},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"code":{"type":"string","description":"Stable: branch on it."},"request_id":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds, on a 429 or 503 that says when to retry."},"errors":{"type":"array","items":{"type":"object","properties":{"detail":{"type":"string"},"pointer":{"type":"string"}},"required":["detail","pointer"]},"description":"Each problem with the request, on a 400 invalid_request."}},"required":["type","title","status","code","request_id"]},"ApiEvent":{"type":"object","properties":{"id":{"type":"string","description":"The event's ID (evt_…): dedupe by it."},"type":{"type":"string","enum":["message.received","message.sent","message.edited","message.deleted","message.delivery_failed","chat.created","chat.updated","chat.read","account.connected","account.disconnected","account.needs_attention","reaction.added","reaction.removed"]},"timestamp":{"type":"string","format":"date-time"},"data":{"type":"object","additionalProperties":{},"description":"The type's data: see the webhooks of this document."}},"required":["id","type","timestamp","data"]},"EventPage":{"type":"object","properties":{"events":{"type":"array","items":{"$ref":"#/components/schemas/ApiEvent"}},"next_cursor":{"type":["string","null"],"description":"The last event's ID, or after when none came back."},"has_more":{"type":"boolean"}},"required":["events","next_cursor","has_more"]},"Webhook":{"type":"object","properties":{"id":{"type":"string","description":"The webhook's ID (wh_…)."},"url":{"type":"string"},"description":{"type":["string","null"]},"event_types":{"type":"array","items":{"type":"string","enum":["message.received","message.sent","message.edited","message.deleted","message.delivery_failed","chat.created","chat.updated","chat.read","account.connected","account.disconnected","account.needs_attention","reaction.added","reaction.removed"]},"description":"Empty: every type."},"networks":{"type":"array","items":{"type":"string"},"description":"Empty: every network but email."},"payload":{"type":"string","enum":["full","ids"]},"status":{"type":"string","enum":["enabled","disabled"]},"disabled_reason":{"type":["string","null"],"enum":["user","failing","gone","key_revoked"],"description":"Why it is off: you turned it off (user), it failed for 3 days (failing), it answered 410 (gone), or an API key that made it, changed it or set its URL was revoked for leaking (key_revoked)."},"failing_since":{"type":["string","null"],"format":"date-time"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","url","description","event_types","networks","payload","status","disabled_reason","failing_since","created_at","updated_at"]},"WebhookList":{"type":"object","properties":{"webhooks":{"type":"array","items":{"$ref":"#/components/schemas/Webhook"}}},"required":["webhooks"]},"WebhookCreated":{"allOf":[{"$ref":"#/components/schemas/Webhook"},{"type":"object","properties":{"secret":{"type":"string","description":"The signing secret (whsec_…): shown this once."}},"required":["secret"]}]},"WebhookSecret":{"type":"object","properties":{"secret":{"type":"string","description":"The new signing secret (whsec_…): shown this once."},"previous_secret_expires_at":{"type":"string","format":"date-time","description":"Until then, deliveries carry a signature by the old secret too. One old secret is kept: rotating again before then ends the overlap of the one before."}},"required":["secret","previous_secret_expires_at"]},"WebhookTest":{"type":"object","properties":{"delivery_id":{"type":"string"}},"required":["delivery_id"]},"WebhookDelivery":{"type":"object","properties":{"id":{"type":"string","description":"The delivery's ID (dlv_…)."},"event_id":{"type":["string","null"]},"event_type":{"type":"string"},"status":{"type":"string","enum":["pending","succeeded","failed","discarded"]},"attempts":{"type":"integer"},"next_attempt_at":{"type":["string","null"],"format":"date-time"},"last_attempt_at":{"type":["string","null"],"format":"date-time"},"last_status_code":{"type":["integer","null"]},"last_error":{"type":["string","null"]},"last_response_excerpt":{"type":["string","null"],"description":"The start of your endpoint's last answer."},"created_at":{"type":"string","format":"date-time"},"delivered_at":{"type":["string","null"],"format":"date-time"}},"required":["id","event_id","event_type","status","attempts","next_attempt_at","last_attempt_at","last_status_code","last_error","last_response_excerpt","created_at","delivered_at"]},"WebhookDeliveryPage":{"type":"object","properties":{"deliveries":{"type":"array","items":{"$ref":"#/components/schemas/WebhookDelivery"}},"next_cursor":{"type":["string","null"]}},"required":["deliveries","next_cursor"]},"Key":{"type":"object","properties":{"id":{"type":"string","description":"The key's ID, for DELETE /v1/keys/{key_id}."},"name":{"type":"string"},"scope":{"type":"string","enum":["full","read"]},"prefix":{"type":"string","description":"The key's first 12 characters."},"last4":{"type":"string","description":"The key's last 4 characters."},"created_via":{"type":"string","description":"Where it was made: cli (chesly login) or web (the dashboard)."},"created_at":{"type":"string","format":"date-time"},"last_used_at":{"type":["string","null"],"format":"date-time","description":"Recorded at most every 5 minutes."}},"required":["id","name","scope","prefix","last4","created_via","created_at","last_used_at"]},"KeyList":{"type":"object","properties":{"keys":{"type":"array","items":{"$ref":"#/components/schemas/Key"}}},"required":["keys"]},"SendLimit":{"type":"object","properties":{"account_id":{"type":["string","null"]},"network":{"type":"string"},"per_hour":{"type":"integer"},"per_day":{"type":"integer"},"used_last_hour":{"type":"integer"},"used_last_day":{"type":"integer"}},"required":["account_id","network","per_hour","per_day","used_last_hour","used_last_day"]},"PlanSummary":{"type":"object","properties":{"plan":{"type":["string","null"],"enum":["personal","pro"],"description":"The plan bought; a comp reads pro; null without one."},"status":{"type":"string","enum":["none","trialing","active","past_due","unpaid","canceled","comped"],"description":"unpaid: Stripe stopped retrying a failed payment; no access until the card is updated."},"trial_ends_at":{"type":["string","null"],"format":"date-time"},"period_start":{"type":["string","null"],"format":"date-time"},"period_end":{"type":["string","null"],"format":"date-time"},"cancel_at":{"type":["string","null"],"format":"date-time","description":"When a canceled plan ends (the end of the period paid for); null while it renews."},"calls_this_period":{"type":"integer","description":"Counted, never billed."},"transcription_seconds_this_period":{"type":"integer"},"transcription_seconds_included":{"type":"integer","description":"The period's minutes, in seconds: 36,000 on Personal, 180,000 on Pro, 0 without a plan."},"scheduled_change":{"type":["object","null"],"properties":{"plan":{"type":"string","enum":["personal","pro"]},"at":{"type":"string","format":"date-time"}},"required":["plan","at"],"description":"A downgrade waiting for the end of the period paid for: the plan, and when it starts. null without one."}},"required":["plan","status","trial_ends_at","period_start","period_end","cancel_at","calls_this_period","transcription_seconds_this_period","transcription_seconds_included","scheduled_change"]},"Me":{"type":"object","properties":{"key":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"scope":{"type":"string","enum":["full","read"]},"api_version":{"type":"string"}},"required":["id","name","scope","api_version"]},"limits":{"type":"object","properties":{"requests_per_second":{"type":"integer","description":"Per key, and for all of your keys together: your plan's."},"requests_per_minute":{"type":"integer","description":"Per key, and for all of your keys together: your plan's."},"api_keys":{"type":"integer","description":"Active API keys your plan allows."},"webhooks":{"type":"integer","description":"Webhooks your plan allows."},"sends":{"type":"array","items":{"$ref":"#/components/schemas/SendLimit"}},"event_streams":{"type":"integer","description":"Event streams (GET /v1/events/stream) your plan lets you hold open at once."},"event_retention_days":{"type":"integer","description":"How many days your plan keeps your events: an `after` (or Last-Event-ID) older than that is 410 events_expired."}},"required":["requests_per_second","requests_per_minute","api_keys","webhooks","sends","event_streams","event_retention_days"]},"usage":{"type":"object","properties":{"period_start":{"type":"string","format":"date-time"},"calls":{"type":"integer","description":"This key's calls this UTC month, before this one."}},"required":["period_start","calls"]},"plan":{"$ref":"#/components/schemas/PlanSummary"}},"required":["key","limits","usage","plan"]},"Account":{"type":"object","properties":{"id":{"type":"string","description":"The account's ID (acct_…)."},"network":{"type":"string"},"display_name":{"type":["string","null"]},"status":{"type":"string","enum":["connected","disconnected","needs_attention"]},"connected_at":{"type":["string","null"],"format":"date-time"}},"required":["id","network","display_name","status","connected_at"]},"AccountList":{"type":"object","properties":{"accounts":{"type":"array","items":{"$ref":"#/components/schemas/Account"}}},"required":["accounts"]},"Chat":{"type":"object","properties":{"id":{"type":"string","description":"The chat's ID (chat_…)."},"account_id":{"type":["string","null"]},"network":{"type":"string"},"name":{"type":["string","null"]},"type":{"type":"string","enum":["dm","group"]},"unread_count":{"type":"integer"},"last_message_at":{"type":["string","null"],"format":"date-time"},"is_archived":{"type":"boolean"},"is_pinned":{"type":"boolean"},"is_muted":{"type":"boolean"},"is_message_request":{"type":"boolean","description":"A pending request: readable, never answered or marked read."},"member_count":{"type":"integer"}},"required":["id","account_id","network","name","type","unread_count","last_message_at","is_archived","is_pinned","is_muted","is_message_request","member_count"]},"ChatPage":{"type":"object","properties":{"chats":{"type":"array","items":{"$ref":"#/components/schemas/Chat"},"description":"Pinned chats first, then the newest."},"next_cursor":{"type":["string","null"],"description":"The next page's cursor, or null on the last page."}},"required":["chats","next_cursor"]},"MessageMedia":{"type":["object","null"],"properties":{"id":{"type":"string","description":"The media's ID (media_…), for GET /v1/media/{media_id}."},"mime_type":{"type":"string"},"file_name":{"type":"string"}},"required":["id"]},"DeliveryError":{"type":["object","null"],"properties":{"code":{"type":"string","enum":["network_rejected","not_logged_in","rate_limited_by_network","unsupported","timeout","unknown"]},"message":{"type":"string","description":"A fixed sentence for the code."},"certain":{"type":"boolean","description":"Whether the message certainly didn't arrive (false: it may have)."}},"required":["code","message","certain"]},"Delivery":{"type":["object","null"],"properties":{"status":{"type":"string","enum":["queued","sent","delivered","failed"]},"error":{"$ref":"#/components/schemas/DeliveryError"},"updated_at":{"type":"string","format":"date-time"}},"required":["status","error","updated_at"],"description":"How a message sent through the API in the last 30 days is getting on; null for any other."},"EmailAddress":{"type":"object","properties":{"name":{"type":["string","null"]},"address":{"type":"string"}},"required":["name","address"]},"EmailHeaders":{"type":"object","properties":{"subject":{"type":["string","null"]},"from":{"$ref":"#/components/schemas/EmailAddress"},"to":{"type":"array","items":{"$ref":"#/components/schemas/EmailAddress"}},"cc":{"type":"array","items":{"$ref":"#/components/schemas/EmailAddress"}}},"required":["subject","from","to","cc"],"description":"An email's headers, on network email only."},"Message":{"type":"object","properties":{"id":{"type":"string","description":"The message's ID (msg_…)."},"chat_id":{"type":"string"},"sender":{"type":"object","properties":{"name":{"type":"string"},"is_me":{"type":"boolean"}},"required":["name","is_me"]},"text":{"type":"string"},"truncated":{"type":"boolean"},"type":{"type":"string","enum":["text","image","video","audio","file","other"]},"media":{"$ref":"#/components/schemas/MessageMedia"},"sent_at":{"type":["string","null"],"format":"date-time"},"edited":{"type":"boolean"},"deleted":{"type":"boolean"},"reply_to":{"type":["string","null"],"description":"The message this one replies to, in the same chat."},"delivery":{"$ref":"#/components/schemas/Delivery"},"email":{"$ref":"#/components/schemas/EmailHeaders"}},"required":["id","chat_id","sender","text","truncated","type","media","sent_at","edited","deleted","reply_to","delivery"]},"MessagePage":{"type":"object","properties":{"messages":{"type":"array","items":{"$ref":"#/components/schemas/Message"},"description":"Newest first. A page can be short, or empty, while next_cursor still leads to older ones."},"next_cursor":{"type":["string","null"]}},"required":["messages","next_cursor"]},"ReadResult":{"type":"object","properties":{"read":{"type":"boolean","enum":[true]},"receipt_sent":{"type":"boolean","description":"Whether the network got a read receipt (never for a message request)."}},"required":["read","receipt_sent"]},"SearchHit":{"allOf":[{"$ref":"#/components/schemas/Message"},{"type":"object","properties":{"chat_name":{"type":["string","null"]},"network":{"type":"string"}},"required":["chat_name","network"]}]},"SearchResults":{"type":"object","properties":{"messages":{"type":"array","items":{"$ref":"#/components/schemas/SearchHit"},"description":"Newest first."}},"required":["messages"]},"MessagesSince":{"type":"object","properties":{"messages":{"type":"array","items":{"$ref":"#/components/schemas/Message"},"description":"Chats newest first; each chat's messages newest first."},"next_cursor":{"type":["string","null"]},"until":{"type":"string","format":"date-time","description":"Where this walk ends: start the next one from here."}},"required":["messages","next_cursor","until"]},"CatchUp":{"type":"object","properties":{"chats":{"type":"array","items":{"type":"object","properties":{"chat":{"$ref":"#/components/schemas/Chat"},"messages":{"type":"array","items":{"$ref":"#/components/schemas/Message"}}},"required":["chat","messages"]}},"truncated":{"type":"boolean","description":"Whether some messages were left out, or a chat's messages couldn't be read."}},"required":["chats","truncated"]},"CliSession":{"type":"object","properties":{"device_code":{"type":"string"},"user_code":{"type":"string"},"verification_uri":{"type":"string","format":"uri"},"verification_uri_complete":{"type":"string","format":"uri","description":"The approval page with the code filled in."},"expires_in":{"type":"integer","description":"Seconds until the code expires."},"interval":{"type":"integer","description":"Seconds to wait between polls."}},"required":["device_code","user_code","verification_uri","verification_uri_complete","expires_in","interval"]},"CliSessionRequest":{"type":"object","properties":{"client_name":{"type":"string","description":"Labels the key, such as the computer's name."}}},"CliToken":{"type":"object","properties":{"api_key":{"type":"string"},"token_type":{"type":"string","enum":["Bearer"]}},"required":["api_key","token_type"]},"CliTokenError":{"type":"object","properties":{"error":{"type":"string","enum":["authorization_pending","slow_down","access_denied","expired_token","invalid_request"]}},"required":["error"]},"CliTokenRequest":{"type":"object","properties":{"device_code":{"type":"string","minLength":1}},"required":["device_code"]},"SendMessage":{"type":"object","properties":{"text":{"type":"string","description":"The text, or a file's caption. At most 1,000 characters on Instagram, 2,000 on Discord, 4,096 on Telegram, 100,000 by email and 10,000 elsewhere, counted in UTF-16 code units. In a Google Messages RCS chat, which takes no captions, it follows the file as a message of its own."},"reply_to":{"type":"string","maxLength":512,"description":"The message this one replies to: a message ID (msg_…) of the same chat."},"media_id":{"type":"string","maxLength":1024,"description":"A file to send: the ID POST /v1/media answered (media_…)."}},"additionalProperties":false},"UploadedMedia":{"type":"object","properties":{"id":{"type":"string","description":"The upload's media ID (media_…): send it as media_id. Kept 24 hours."},"mime_type":{"type":"string"},"size":{"type":"integer","description":"In bytes."},"file_name":{"type":"string"}},"required":["id","mime_type","size","file_name"]},"MediaUpload":{"type":"object","properties":{"file":{"type":"string","format":"binary","description":"The file, at most 50 MB (50,000,000 bytes)."}},"required":["file"]},"Transcript":{"type":"object","properties":{"message_id":{"type":"string","description":"The voice message's ID (msg_…)."},"text":{"type":"string"},"language":{"type":["string","null"],"description":"The language heard, as an ISO 639 code, when it was detected."},"duration_seconds":{"type":["number","null"],"description":"The voice message's length, to a tenth of a second."},"cached":{"type":"boolean","description":"Transcribed before: this answer used none of your plan's minutes."}},"required":["message_id","text","language","duration_seconds","cached"]},"ChatSummary":{"type":"object","properties":{"id":{"type":"string","description":"The chat's ID (chat_…)."},"name":{"type":["string","null"]},"network":{"type":"string"},"type":{"type":"string","enum":["dm","group"]}},"required":["id","name","network","type"]},"MessageEventData":{"type":"object","properties":{"message":{"$ref":"#/components/schemas/Message"},"chat":{"$ref":"#/components/schemas/ChatSummary"}},"required":["message","chat"],"description":"An edit's message carries its text after the edit."},"MessageEventIds":{"type":"object","properties":{"message_id":{"type":"string","description":"The message's ID (msg_…)."},"chat_id":{"type":"string","description":"The chat's ID (chat_…)."},"account_id":{"type":["string","null"]}},"required":["message_id","chat_id","account_id"]},"MessageRef":{"type":"object","properties":{"message_id":{"type":"string","description":"The message's ID (msg_…)."},"chat_id":{"type":"string","description":"The chat's ID (chat_…)."}},"required":["message_id","chat_id"]},"MessageDeliveryFailedData":{"type":"object","properties":{"message_id":{"type":"string","description":"The message's ID (msg_…)."},"chat_id":{"type":"string","description":"The chat's ID (chat_…)."},"error":{"allOf":[{"$ref":"#/components/schemas/DeliveryError"},{"type":"object"}]}},"required":["message_id","chat_id","error"]},"ChatCreatedData":{"type":"object","properties":{"chat":{"$ref":"#/components/schemas/Chat"}},"required":["chat"]},"ChatIds":{"type":"object","properties":{"chat_id":{"type":"string"}},"required":["chat_id"]},"ChatUpdatedData":{"type":"object","properties":{"chat_id":{"type":"string"},"chat":{"allOf":[{"$ref":"#/components/schemas/Chat"},{"type":["object","null"],"description":"The chat as it is now; null once the user has left it."}]},"changes":{"type":"array","items":{"type":"string","enum":["name","archived","pinned","muted","left"]}}},"required":["chat_id","chat","changes"]},"ChatReadData":{"type":"object","properties":{"chat_id":{"type":"string"},"last_read_message_id":{"type":["string","null"]}},"required":["chat_id","last_read_message_id"]},"AccountEventData":{"type":"object","properties":{"account":{"$ref":"#/components/schemas/Account"}},"required":["account"]},"AccountIds":{"type":"object","properties":{"account_id":{"type":"string"}},"required":["account_id"]},"ReactionData":{"type":"object","properties":{"message_id":{"type":"string","description":"The message's ID (msg_…)."},"chat_id":{"type":"string","description":"The chat's ID (chat_…)."},"reaction":{"type":"object","properties":{"key":{"type":"string","description":"The reaction, usually an emoji."},"sender":{"type":"object","properties":{"name":{"type":"string"},"is_me":{"type":"boolean"}},"required":["name","is_me"]}},"required":["key","sender"]}},"required":["message_id","chat_id","reaction"]}},"parameters":{}},"paths":{"/v1/contacts":{"get":{"operationId":"findContacts","summary":"Find the people of your direct chats by name","tags":["Contacts"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":100,"description":"Part of the person's name, matched ignoring case and accents."},"required":true,"description":"Part of the person's name, matched ignoring case and accents.","name":"q","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":50,"default":20},"required":false,"name":"limit","in":"query"}],"responses":{"200":{"description":"The people found, each with their direct chat.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactList"}}}},"400":{"description":"A problem: invalid_request.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"A problem: invalid_api_key.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"402":{"description":"A problem: api_plan_required.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"A problem: signing_key_missing.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"A problem: rate_limited.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"A problem: internal_error.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A problem: upstream_unavailable, api_paused.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/events":{"get":{"operationId":"listEvents","summary":"Events after a cursor, oldest first","tags":["Events"],"parameters":[{"schema":{"type":"string","maxLength":64,"description":"The last event ID you have (evt_…): events after it. Without it, from the start of your plan's window (limits.event_retention_days)."},"required":false,"name":"after","in":"query"},{"schema":{"type":"string","maxLength":1000,"description":"Event types, comma-separated. Without: every type."},"required":false,"name":"types","in":"query"},{"schema":{"type":"string","maxLength":64,"description":"One chat's events (chat_…)."},"required":false,"name":"chat_id","in":"query"},{"schema":{"type":"string","maxLength":64,"description":"One account's events (acct_…); an email account's email too."},"required":false,"name":"account_id","in":"query"},{"schema":{"type":"string","maxLength":1000,"description":"Networks, comma-separated. Without: every network but email, which comes only when named here or by account_id."},"required":false,"name":"networks","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":50},"required":false,"name":"limit","in":"query"}],"responses":{"200":{"description":"A page of events.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventPage"}}}},"400":{"description":"A problem: invalid_request.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"A problem: invalid_api_key.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"402":{"description":"A problem: api_plan_required.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"A problem: events_expired.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"A problem: rate_limited.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"A problem: internal_error.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A problem: api_paused, upstream_unavailable.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/events/stream":{"get":{"operationId":"streamEvents","summary":"Events as they happen, as server-sent events","tags":["Events"],"parameters":[{"schema":{"type":"string","maxLength":64,"description":"The last event ID you have (evt_…): every event after it first, then new ones as they come. Without it (or Last-Event-ID), new events only."},"required":false,"name":"after","in":"query"},{"schema":{"type":"string","maxLength":1000,"description":"Event types, comma-separated. Without: every type."},"required":false,"name":"types","in":"query"},{"schema":{"type":"string","maxLength":64,"description":"One chat's events (chat_…)."},"required":false,"name":"chat_id","in":"query"},{"schema":{"type":"string","maxLength":64,"description":"One account's events (acct_…); an email account's email too."},"required":false,"name":"account_id","in":"query"},{"schema":{"type":"string","maxLength":1000,"description":"Networks, comma-separated. Without: every network but email, which comes only when named here or by account_id."},"required":false,"name":"networks","in":"query"},{"schema":{"type":"string","maxLength":64,"description":"The last event ID you had: the stream resumes after it."},"required":false,"name":"last-event-id","in":"header"}],"responses":{"200":{"description":"retry: 3000, then each event as id, event and data lines (data is the ApiEvent JSON); a ping comment every 15 s. Without a cursor, new events only: first the newest event's ID, alone, when that event is inside your plan's window (limits.event_retention_days), so a reconnect before the next event misses nothing.","content":{"text/event-stream":{"schema":{"type":"string","format":"binary"}}}},"400":{"description":"A problem: invalid_request.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"A problem: invalid_api_key.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"402":{"description":"A problem: api_plan_required.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"A problem: events_expired.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"A problem: too_many_streams, rate_limited.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"A problem: internal_error.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A problem: api_paused, upstream_unavailable.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/webhooks":{"get":{"operationId":"listWebhooks","summary":"Your webhook endpoints","tags":["Webhooks"],"responses":{"200":{"description":"Every endpoint, newest first.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookList"}}}},"400":{"description":"A problem: invalid_request.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"A problem: invalid_api_key.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"402":{"description":"A problem: api_plan_required.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"A problem: rate_limited.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"A problem: internal_error.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A problem: api_paused, upstream_unavailable.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"operationId":"createWebhook","summary":"Add a webhook endpoint","tags":["Webhooks"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","minLength":1,"maxLength":8192},"event_types":{"type":"array","items":{"type":"string","enum":["message.received","message.sent","message.edited","message.deleted","message.delivery_failed","chat.created","chat.updated","chat.read","account.connected","account.disconnected","account.needs_attention","reaction.added","reaction.removed"]},"maxItems":26},"networks":{"type":"array","items":{"type":"string","enum":["email","whatsapp","telegram","discord","instagram","messenger","signal","slack","gmessages","googlechat","twitter","linkedin","reddit","imessage"]},"maxItems":28},"payload":{"type":"string","enum":["full","ids"]},"description":{"type":["string","null"],"maxLength":200}},"required":["url"],"additionalProperties":false}}}},"responses":{"201":{"description":"The endpoint, with its signing secret: shown this once.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookCreated"}}}},"400":{"description":"A problem: invalid_request, invalid_webhook_url, webhook_limit_reached.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"A problem: invalid_api_key.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"402":{"description":"A problem: api_plan_required.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"A problem: insufficient_scope.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"A problem: rate_limited.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"A problem: internal_error.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A problem: plan_unavailable, api_paused, upstream_unavailable.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/webhooks/{webhook_id}":{"get":{"operationId":"getWebhook","summary":"A webhook endpoint","tags":["Webhooks"],"parameters":[{"schema":{"type":"string","maxLength":64,"description":"The webhook's ID (wh_…)."},"required":true,"name":"webhook_id","in":"path"}],"responses":{"200":{"description":"The endpoint.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Webhook"}}}},"400":{"description":"A problem: invalid_request.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"A problem: invalid_api_key.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"402":{"description":"A problem: api_plan_required.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"A problem: webhook_not_found.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"A problem: rate_limited.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"A problem: internal_error.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A problem: api_paused, upstream_unavailable.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"patch":{"operationId":"updateWebhook","summary":"Change a webhook endpoint, or turn it on or off","tags":["Webhooks"],"parameters":[{"schema":{"type":"string","maxLength":64,"description":"The webhook's ID (wh_…)."},"required":true,"name":"webhook_id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","minLength":1,"maxLength":8192},"event_types":{"type":"array","items":{"type":"string","enum":["message.received","message.sent","message.edited","message.deleted","message.delivery_failed","chat.created","chat.updated","chat.read","account.connected","account.disconnected","account.needs_attention","reaction.added","reaction.removed"]},"maxItems":26},"networks":{"type":"array","items":{"type":"string","enum":["email","whatsapp","telegram","discord","instagram","messenger","signal","slack","gmessages","googlechat","twitter","linkedin","reddit","imessage"]},"maxItems":28},"payload":{"type":"string","enum":["full","ids"]},"description":{"type":["string","null"],"maxLength":200},"enabled":{"type":"boolean"}},"additionalProperties":false}}}},"responses":{"200":{"description":"The endpoint as it is now.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Webhook"}}}},"400":{"description":"A problem: invalid_request, invalid_webhook_url.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"A problem: invalid_api_key.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"402":{"description":"A problem: api_plan_required.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"A problem: forbidden, insufficient_scope.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"A problem: webhook_not_found.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"A problem: rate_limited.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"A problem: internal_error.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A problem: api_paused, upstream_unavailable.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"delete":{"operationId":"deleteWebhook","summary":"Delete a webhook endpoint and its pending deliveries","tags":["Webhooks"],"parameters":[{"schema":{"type":"string","maxLength":64,"description":"The webhook's ID (wh_…)."},"required":true,"name":"webhook_id","in":"path"}],"responses":{"204":{"description":"Deleted."},"401":{"description":"A problem: invalid_api_key.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"402":{"description":"A problem: api_plan_required.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"A problem: insufficient_scope.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"A problem: webhook_not_found.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"A problem: rate_limited.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"A problem: internal_error.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A problem: api_paused, upstream_unavailable.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/webhooks/{webhook_id}/rotate_secret":{"post":{"operationId":"rotateWebhookSecret","summary":"A new signing secret; the old one signs too for 24 hours","tags":["Webhooks"],"parameters":[{"schema":{"type":"string","maxLength":64,"description":"The webhook's ID (wh_…)."},"required":true,"name":"webhook_id","in":"path"}],"responses":{"200":{"description":"The new secret: shown this once.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookSecret"}}}},"401":{"description":"A problem: invalid_api_key.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"402":{"description":"A problem: api_plan_required.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"A problem: insufficient_scope.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"A problem: webhook_not_found.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"A problem: rate_limited.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"A problem: internal_error.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A problem: api_paused, upstream_unavailable.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/webhooks/{webhook_id}/test":{"post":{"operationId":"sendTestWebhook","summary":"Send the endpoint a webhook.test event","tags":["Webhooks"],"parameters":[{"schema":{"type":"string","maxLength":64,"description":"The webhook's ID (wh_…)."},"required":true,"name":"webhook_id","in":"path"}],"responses":{"202":{"description":"Queued; its delivery shows how it went.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookTest"}}}},"401":{"description":"A problem: invalid_api_key.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"402":{"description":"A problem: api_plan_required.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"A problem: insufficient_scope.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"A problem: webhook_not_found.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"A problem: rate_limited.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"A problem: internal_error.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A problem: api_paused, upstream_unavailable.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/webhooks/{webhook_id}/deliveries":{"get":{"operationId":"listWebhookDeliveries","summary":"An endpoint's deliveries, newest first","tags":["Webhooks"],"parameters":[{"schema":{"type":"string","maxLength":64,"description":"The webhook's ID (wh_…)."},"required":true,"name":"webhook_id","in":"path"},{"schema":{"type":"string","enum":["pending","succeeded","failed","discarded"]},"required":false,"name":"status","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":50},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":512},"required":false,"name":"cursor","in":"query"}],"responses":{"200":{"description":"A page of deliveries.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookDeliveryPage"}}}},"400":{"description":"A problem: invalid_request, invalid_cursor.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"A problem: invalid_api_key.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"402":{"description":"A problem: api_plan_required.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"A problem: webhook_not_found.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"A problem: rate_limited.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"A problem: internal_error.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A problem: api_paused, upstream_unavailable.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/keys":{"get":{"operationId":"listKeys","summary":"List your API keys","tags":["Keys"],"responses":{"200":{"description":"Your active keys, newest first.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KeyList"}}}},"400":{"description":"A problem: invalid_request.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"A problem: invalid_api_key.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"A problem: rate_limited.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"A problem: internal_error.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A problem: api_paused, upstream_unavailable.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/keys/{key_id}":{"delete":{"operationId":"revokeKey","summary":"Revoke an API key, this one included","tags":["Keys"],"parameters":[{"schema":{"type":"string","description":"The key's ID, from GET /v1/keys."},"required":true,"description":"The key's ID, from GET /v1/keys.","name":"key_id","in":"path"}],"responses":{"204":{"description":"Revoked: the key's next request is refused."},"400":{"description":"A problem: invalid_request.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"A problem: invalid_api_key.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"A problem: insufficient_scope.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"A problem: key_not_found.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"A problem: rate_limited.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"A problem: internal_error.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A problem: api_paused, upstream_unavailable.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/me":{"get":{"operationId":"getMe","summary":"The key in use: its scope, limits, plan and this month's calls","tags":["Me"],"responses":{"200":{"description":"The key, its limits, its plan and its usage. Answers without an API plan.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Me"}}}},"401":{"description":"A problem: invalid_api_key.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"A problem: rate_limited.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"A problem: internal_error.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A problem: api_paused, upstream_unavailable.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/accounts":{"get":{"operationId":"listAccounts","summary":"The accounts the user connected in Chesly, oldest first","tags":["Accounts"],"responses":{"200":{"description":"The connected accounts and their status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountList"}}}},"400":{"description":"A problem: invalid_request.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"A problem: invalid_api_key.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"402":{"description":"A problem: api_plan_required.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"A problem: rate_limited.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"A problem: internal_error.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A problem: api_paused, upstream_unavailable.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/chats":{"get":{"operationId":"listChats","summary":"The user's chats, a page at a time","tags":["Chats"],"parameters":[{"schema":{"type":"string","maxLength":64},"required":false,"name":"account_id","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":32,"description":"Only this network's chats, such as whatsapp. Email is listed only with email."},"required":false,"description":"Only this network's chats, such as whatsapp. Email is listed only with email.","name":"network","in":"query"},{"schema":{"type":"string","format":"date-time","description":"Only chats whose last message is at or after this time."},"required":false,"description":"Only chats whose last message is at or after this time.","name":"updated_since","in":"query"},{"schema":{"type":"string","enum":["true","false"]},"required":false,"name":"unread","in":"query"},{"schema":{"type":"string","enum":["true","false","all"],"default":"false"},"required":false,"name":"archived","in":"query"},{"schema":{"type":"string","maxLength":200},"required":false,"name":"q","in":"query"},{"schema":{"type":"string","enum":["recent","unread"],"default":"recent"},"required":false,"name":"sort","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":50},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":2048},"required":false,"name":"cursor","in":"query"}],"responses":{"200":{"description":"A page of chats.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatPage"}}}},"400":{"description":"A problem: invalid_request, invalid_cursor.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"A problem: invalid_api_key.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"402":{"description":"A problem: api_plan_required.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"A problem: signing_key_missing.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"A problem: account_not_found.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"A problem: rate_limited.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"A problem: internal_error.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A problem: upstream_unavailable, api_paused.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/chats/{chat_id}":{"get":{"operationId":"getChat","summary":"One chat","tags":["Chats"],"parameters":[{"schema":{"type":"string","description":"The chat's ID (chat_…)."},"required":true,"description":"The chat's ID (chat_…).","name":"chat_id","in":"path"}],"responses":{"200":{"description":"The chat.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Chat"}}}},"400":{"description":"A problem: invalid_request.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"A problem: invalid_api_key.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"402":{"description":"A problem: api_plan_required.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"A problem: signing_key_missing.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"A problem: chat_not_found.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"A problem: rate_limited.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"A problem: internal_error.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A problem: upstream_unavailable, api_paused.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/chats/{chat_id}/messages":{"get":{"operationId":"listChatMessages","summary":"A chat's messages, newest first, a page at a time","tags":["Messages"],"parameters":[{"schema":{"type":"string","description":"The chat's ID (chat_…)."},"required":true,"description":"The chat's ID (chat_…).","name":"chat_id","in":"path"},{"schema":{"type":"string","format":"date-time","description":"Only messages sent before this time."},"required":false,"description":"Only messages sent before this time.","name":"before","in":"query"},{"schema":{"type":"string","format":"date-time","description":"Only messages sent after this time."},"required":false,"description":"Only messages sent after this time.","name":"after","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":50},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":2048},"required":false,"name":"cursor","in":"query"}],"responses":{"200":{"description":"A page of messages.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessagePage"}}}},"400":{"description":"A problem: invalid_request, invalid_cursor.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"A problem: invalid_api_key.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"402":{"description":"A problem: api_plan_required.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"A problem: signing_key_missing.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"A problem: chat_not_found.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"A problem: account_reconnect_required.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"A problem: rate_limited.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"A problem: internal_error.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A problem: upstream_unavailable, api_paused.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"operationId":"sendMessage","summary":"Send a message to a chat","tags":["Messages"],"parameters":[{"schema":{"type":"string","description":"The chat's ID (chat_…)."},"required":true,"description":"The chat's ID (chat_…).","name":"chat_id","in":"path"},{"schema":{"type":"string","maxLength":257,"description":"Sends at most once per key, however often the request is retried: 1 to 255 of A-Z, a-z, 0-9, \".\", \"_\", \":\" and \"-\". Kept 24 hours. A retry with the same key and body answers the first answer again, with Idempotent-Replayed: true."},"required":false,"name":"idempotency-key","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendMessage"}}}},"responses":{"201":{"description":"The message as sent. Its delivery is queued until the network takes it; GET /v1/messages/{message_id} follows it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Message"}}}},"400":{"description":"A problem: invalid_request, text_too_long, invalid_reply_to, unsupported_chat, idempotency_key_invalid, media_too_large.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"A problem: invalid_api_key.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"402":{"description":"A problem: api_plan_required.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"A problem: insufficient_scope, signing_key_missing.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"A problem: chat_not_found, media_not_found.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"A problem: message_request, idempotency_in_progress.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"A problem: media_expired.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"A problem: idempotency_key_reused.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"A problem: send_limit_reached, rate_limited.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"A problem: internal_error.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A problem: network_unavailable, upstream_unavailable, api_paused.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/chats/{chat_id}/read":{"post":{"operationId":"markChatRead","summary":"Mark a chat read up to its newest message","tags":["Chats"],"parameters":[{"schema":{"type":"string","description":"The chat's ID (chat_…)."},"required":true,"description":"The chat's ID (chat_…).","name":"chat_id","in":"path"},{"schema":{"type":"string","description":"1 to 255 characters from A-Za-z0-9._:- (or that, quoted). Repeat a request with the same key within 24 hours and get the first answer back."},"required":false,"name":"Idempotency-Key","in":"header"}],"responses":{"200":{"description":"The chat is read; whether the network got a receipt.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReadResult"}}}},"400":{"description":"A problem: idempotency_key_invalid.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"A problem: invalid_api_key.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"402":{"description":"A problem: api_plan_required.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"A problem: signing_key_missing, insufficient_scope.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"A problem: chat_not_found.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"A problem: idempotency_in_progress.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"413":{"description":"A problem: payload_too_large.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"A problem: idempotency_key_reused.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"A problem: rate_limited.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"A problem: internal_error.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A problem: network_unavailable, upstream_unavailable, api_paused.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/messages/{message_id}":{"get":{"operationId":"getMessage","summary":"One message, with its delivery status","tags":["Messages"],"parameters":[{"schema":{"type":"string","description":"The message's ID (msg_…)."},"required":true,"description":"The message's ID (msg_…).","name":"message_id","in":"path"}],"responses":{"200":{"description":"The message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Message"}}}},"400":{"description":"A problem: invalid_request.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"A problem: invalid_api_key.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"402":{"description":"A problem: api_plan_required.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"A problem: signing_key_missing.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"A problem: message_not_found.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"A problem: account_reconnect_required.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"A problem: rate_limited.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"A problem: internal_error.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A problem: upstream_unavailable, api_paused.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/messages/search":{"get":{"operationId":"searchMessages","summary":"Search the text of the user's messages","tags":["Messages"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":200},"required":true,"name":"q","in":"query"},{"schema":{"type":"string","maxLength":64},"required":false,"name":"chat_id","in":"query"},{"schema":{"type":"string","maxLength":64},"required":false,"name":"account_id","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":32,"description":"Only this network's chats, such as whatsapp. Email is included only with email."},"required":false,"description":"Only this network's chats, such as whatsapp. Email is included only with email.","name":"network","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":20},"required":false,"name":"limit","in":"query"}],"responses":{"200":{"description":"The messages found, each with its chat's name and network.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchResults"}}}},"400":{"description":"A problem: invalid_request.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"A problem: invalid_api_key.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"402":{"description":"A problem: api_plan_required.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"A problem: signing_key_missing.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"A problem: account_not_found, chat_not_found.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"A problem: rate_limited.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"A problem: internal_error.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A problem: search_unavailable, upstream_unavailable, api_paused.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/messages":{"get":{"operationId":"listMessagesSince","summary":"Everything new across the user's chats since a time, a page at a time","tags":["Messages"],"parameters":[{"schema":{"type":"string","format":"date-time"},"required":true,"name":"since","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":32,"description":"Only this network's chats, such as whatsapp. Email is included only with email."},"required":false,"description":"Only this network's chats, such as whatsapp. Email is included only with email.","name":"network","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":200,"default":100},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":2048},"required":false,"name":"cursor","in":"query"}],"responses":{"200":{"description":"A page of the walk.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessagesSince"}}}},"400":{"description":"A problem: invalid_request, invalid_cursor.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"A problem: invalid_api_key.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"402":{"description":"A problem: api_plan_required.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"A problem: signing_key_missing.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"A problem: rate_limited.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"A problem: internal_error.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A problem: feed_unavailable, upstream_unavailable, api_paused.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/catch_up":{"get":{"operationId":"catchUp","summary":"The unread chats, newest first, each with its newest messages","tags":["Messages"],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":50,"default":20},"required":false,"name":"chats","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":20,"default":5},"required":false,"name":"per_chat","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":32,"description":"Only this network's chats, such as whatsapp. Email is included only with email."},"required":false,"description":"Only this network's chats, such as whatsapp. Email is included only with email.","name":"network","in":"query"}],"responses":{"200":{"description":"The catch-up.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CatchUp"}}}},"400":{"description":"A problem: invalid_request.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"A problem: invalid_api_key.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"402":{"description":"A problem: api_plan_required.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"A problem: signing_key_missing.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"A problem: rate_limited.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"A problem: internal_error.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A problem: upstream_unavailable, api_paused.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/media/{media_id}":{"get":{"operationId":"getMedia","summary":"A message's media, as bytes","tags":["Media"],"parameters":[{"schema":{"type":"string","description":"The media's ID (media_…), from a message's media.id."},"required":true,"description":"The media's ID (media_…), from a message's media.id.","name":"media_id","in":"path"}],"responses":{"200":{"description":"The file, in its own Content-Type. Ranges and validators work.","content":{"*/*":{"schema":{"type":"string","format":"binary"}}}},"206":{"description":"The byte range asked for (Range).","content":{"*/*":{"schema":{"type":"string","format":"binary"}}}},"304":{"description":"Not modified (If-None-Match or If-Modified-Since)."},"400":{"description":"A problem: invalid_request, media_too_large.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"A problem: invalid_api_key.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"402":{"description":"A problem: api_plan_required.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"A problem: media_not_found.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"A problem: media_expired.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"A problem: rate_limited.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"A problem: internal_error.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A problem: media_unavailable, api_paused, upstream_unavailable.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/cli/sessions":{"post":{"operationId":"startCliSession","summary":"Start a CLI sign-in: a code for the user to approve on web.chesly.app","tags":["Sign-in"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CliSessionRequest"}}}},"responses":{"200":{"description":"The sign-in, to show the user and to poll.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CliSession"}}}},"413":{"description":"A problem: payload_too_large.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"A problem: rate_limited.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"A problem: internal_error.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"security":[]}},"/v1/cli/sessions/token":{"post":{"operationId":"pollCliSession","summary":"Poll a CLI sign-in for its key, every interval seconds","tags":["Sign-in"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CliTokenRequest"}}}},"responses":{"200":{"description":"Approved: the new key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CliToken"}}}},"400":{"description":"Not yet, or not at all (RFC 8628 §3.5): keep polling on authorization_pending, slow down on slow_down.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CliTokenError"}}}},"413":{"description":"A problem: payload_too_large.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"A problem: rate_limited.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"A problem: internal_error.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A problem: plan_unavailable.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"security":[]}},"/v1/openapi.json":{"get":{"operationId":"getOpenApiDocument","summary":"This OpenAPI 3.1 document","tags":["OpenAPI"],"responses":{"200":{"description":"The OpenAPI 3.1 document of /v1, events included as webhooks.","content":{"application/json":{"schema":{"type":"object","additionalProperties":{}}}}},"500":{"description":"A problem: internal_error.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"security":[]}},"/v1/media":{"post":{"operationId":"uploadMedia","summary":"Upload a file to send","tags":["Messages"],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/MediaUpload"}}}},"responses":{"201":{"description":"The upload. Send its id as media_id within 24 hours.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadedMedia"}}}},"400":{"description":"A problem: invalid_request, media_too_large.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"A problem: invalid_api_key.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"402":{"description":"A problem: api_plan_required.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"A problem: insufficient_scope.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"408":{"description":"A problem: upload_timeout.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"A problem: rate_limited.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"A problem: internal_error.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A problem: upstream_unavailable, api_paused.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/messages/{message_id}/transcript":{"post":{"operationId":"transcribeVoiceNote","summary":"Transcribe a voice message","tags":["Messages"],"parameters":[{"schema":{"type":"string","description":"The voice message's ID (msg_…)."},"required":true,"description":"The voice message's ID (msg_…).","name":"message_id","in":"path"}],"responses":{"200":{"description":"The transcript. Its audio counts toward your plan's transcription minutes, unless it was cached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Transcript"}}}},"400":{"description":"A problem: invalid_request, not_a_voice_note, media_too_large.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"A problem: invalid_api_key.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"402":{"description":"A problem: api_plan_required, transcription_limit_reached.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"A problem: insufficient_scope, signing_key_missing.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"A problem: message_not_found, media_not_found.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"410":{"description":"A problem: media_expired.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"A problem: transcription_failed.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"A problem: rate_limited.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"500":{"description":"A problem: internal_error.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"A problem: transcription_unavailable, upstream_unavailable, api_paused.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}}},"webhooks":{"message.received":{"post":{"operationId":"messageReceived","summary":"The message.received event","description":"Sent to each webhook endpoint subscribed to it, signed as Standard Webhooks sets out (webhook-id, webhook-timestamp, webhook-signature). With payload ids, data holds the event's IDs only.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"The event's ID (evt_…): dedupe by it."},"type":{"type":"string","enum":["message.received"]},"timestamp":{"type":"string","format":"date-time"},"data":{"anyOf":[{"$ref":"#/components/schemas/MessageEventData"},{"$ref":"#/components/schemas/MessageEventIds"}]}},"required":["id","type","timestamp","data"]}}}},"responses":{"200":{"description":"Any 2xx answer acknowledges the event."}}}},"message.sent":{"post":{"operationId":"messageSent","summary":"The message.sent event","description":"Sent to each webhook endpoint subscribed to it, signed as Standard Webhooks sets out (webhook-id, webhook-timestamp, webhook-signature). With payload ids, data holds the event's IDs only.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"The event's ID (evt_…): dedupe by it."},"type":{"type":"string","enum":["message.sent"]},"timestamp":{"type":"string","format":"date-time"},"data":{"anyOf":[{"$ref":"#/components/schemas/MessageEventData"},{"$ref":"#/components/schemas/MessageEventIds"}]}},"required":["id","type","timestamp","data"]}}}},"responses":{"200":{"description":"Any 2xx answer acknowledges the event."}}}},"message.edited":{"post":{"operationId":"messageEdited","summary":"The message.edited event","description":"Sent to each webhook endpoint subscribed to it, signed as Standard Webhooks sets out (webhook-id, webhook-timestamp, webhook-signature). With payload ids, data holds the event's IDs only.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"The event's ID (evt_…): dedupe by it."},"type":{"type":"string","enum":["message.edited"]},"timestamp":{"type":"string","format":"date-time"},"data":{"anyOf":[{"$ref":"#/components/schemas/MessageEventData"},{"$ref":"#/components/schemas/MessageEventIds"}]}},"required":["id","type","timestamp","data"]}}}},"responses":{"200":{"description":"Any 2xx answer acknowledges the event."}}}},"message.deleted":{"post":{"operationId":"messageDeleted","summary":"The message.deleted event","description":"Sent to each webhook endpoint subscribed to it, signed as Standard Webhooks sets out (webhook-id, webhook-timestamp, webhook-signature). With payload ids, data holds the event's IDs only.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"The event's ID (evt_…): dedupe by it."},"type":{"type":"string","enum":["message.deleted"]},"timestamp":{"type":"string","format":"date-time"},"data":{"$ref":"#/components/schemas/MessageRef"}},"required":["id","type","timestamp","data"]}}}},"responses":{"200":{"description":"Any 2xx answer acknowledges the event."}}}},"message.delivery_failed":{"post":{"operationId":"messageDeliveryFailed","summary":"The message.delivery_failed event","description":"Sent to each webhook endpoint subscribed to it, signed as Standard Webhooks sets out (webhook-id, webhook-timestamp, webhook-signature). With payload ids, data holds the event's IDs only.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"The event's ID (evt_…): dedupe by it."},"type":{"type":"string","enum":["message.delivery_failed"]},"timestamp":{"type":"string","format":"date-time"},"data":{"anyOf":[{"$ref":"#/components/schemas/MessageDeliveryFailedData"},{"$ref":"#/components/schemas/MessageRef"}]}},"required":["id","type","timestamp","data"]}}}},"responses":{"200":{"description":"Any 2xx answer acknowledges the event."}}}},"chat.created":{"post":{"operationId":"chatCreated","summary":"The chat.created event","description":"Sent to each webhook endpoint subscribed to it, signed as Standard Webhooks sets out (webhook-id, webhook-timestamp, webhook-signature). With payload ids, data holds the event's IDs only.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"The event's ID (evt_…): dedupe by it."},"type":{"type":"string","enum":["chat.created"]},"timestamp":{"type":"string","format":"date-time"},"data":{"anyOf":[{"$ref":"#/components/schemas/ChatCreatedData"},{"$ref":"#/components/schemas/ChatIds"}]}},"required":["id","type","timestamp","data"]}}}},"responses":{"200":{"description":"Any 2xx answer acknowledges the event."}}}},"chat.updated":{"post":{"operationId":"chatUpdated","summary":"The chat.updated event","description":"Sent to each webhook endpoint subscribed to it, signed as Standard Webhooks sets out (webhook-id, webhook-timestamp, webhook-signature). With payload ids, data holds the event's IDs only.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"The event's ID (evt_…): dedupe by it."},"type":{"type":"string","enum":["chat.updated"]},"timestamp":{"type":"string","format":"date-time"},"data":{"anyOf":[{"$ref":"#/components/schemas/ChatUpdatedData"},{"$ref":"#/components/schemas/ChatIds"}]}},"required":["id","type","timestamp","data"]}}}},"responses":{"200":{"description":"Any 2xx answer acknowledges the event."}}}},"chat.read":{"post":{"operationId":"chatRead","summary":"The chat.read event","description":"Sent to each webhook endpoint subscribed to it, signed as Standard Webhooks sets out (webhook-id, webhook-timestamp, webhook-signature). With payload ids, data holds the event's IDs only.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"The event's ID (evt_…): dedupe by it."},"type":{"type":"string","enum":["chat.read"]},"timestamp":{"type":"string","format":"date-time"},"data":{"anyOf":[{"$ref":"#/components/schemas/ChatReadData"},{"$ref":"#/components/schemas/ChatIds"}]}},"required":["id","type","timestamp","data"]}}}},"responses":{"200":{"description":"Any 2xx answer acknowledges the event."}}}},"account.connected":{"post":{"operationId":"accountConnected","summary":"The account.connected event","description":"Sent to each webhook endpoint subscribed to it, signed as Standard Webhooks sets out (webhook-id, webhook-timestamp, webhook-signature). With payload ids, data holds the event's IDs only.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"The event's ID (evt_…): dedupe by it."},"type":{"type":"string","enum":["account.connected"]},"timestamp":{"type":"string","format":"date-time"},"data":{"anyOf":[{"$ref":"#/components/schemas/AccountEventData"},{"$ref":"#/components/schemas/AccountIds"}]}},"required":["id","type","timestamp","data"]}}}},"responses":{"200":{"description":"Any 2xx answer acknowledges the event."}}}},"account.disconnected":{"post":{"operationId":"accountDisconnected","summary":"The account.disconnected event","description":"Sent to each webhook endpoint subscribed to it, signed as Standard Webhooks sets out (webhook-id, webhook-timestamp, webhook-signature). With payload ids, data holds the event's IDs only.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"The event's ID (evt_…): dedupe by it."},"type":{"type":"string","enum":["account.disconnected"]},"timestamp":{"type":"string","format":"date-time"},"data":{"anyOf":[{"$ref":"#/components/schemas/AccountEventData"},{"$ref":"#/components/schemas/AccountIds"}]}},"required":["id","type","timestamp","data"]}}}},"responses":{"200":{"description":"Any 2xx answer acknowledges the event."}}}},"account.needs_attention":{"post":{"operationId":"accountNeedsAttention","summary":"The account.needs_attention event","description":"Sent to each webhook endpoint subscribed to it, signed as Standard Webhooks sets out (webhook-id, webhook-timestamp, webhook-signature). With payload ids, data holds the event's IDs only.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"The event's ID (evt_…): dedupe by it."},"type":{"type":"string","enum":["account.needs_attention"]},"timestamp":{"type":"string","format":"date-time"},"data":{"anyOf":[{"$ref":"#/components/schemas/AccountEventData"},{"$ref":"#/components/schemas/AccountIds"}]}},"required":["id","type","timestamp","data"]}}}},"responses":{"200":{"description":"Any 2xx answer acknowledges the event."}}}},"reaction.added":{"post":{"operationId":"reactionAdded","summary":"The reaction.added event","description":"Sent to each webhook endpoint subscribed to it, signed as Standard Webhooks sets out (webhook-id, webhook-timestamp, webhook-signature). With payload ids, data holds the event's IDs only.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"The event's ID (evt_…): dedupe by it."},"type":{"type":"string","enum":["reaction.added"]},"timestamp":{"type":"string","format":"date-time"},"data":{"anyOf":[{"$ref":"#/components/schemas/ReactionData"},{"$ref":"#/components/schemas/MessageRef"}]}},"required":["id","type","timestamp","data"]}}}},"responses":{"200":{"description":"Any 2xx answer acknowledges the event."}}}},"reaction.removed":{"post":{"operationId":"reactionRemoved","summary":"The reaction.removed event","description":"Sent to each webhook endpoint subscribed to it, signed as Standard Webhooks sets out (webhook-id, webhook-timestamp, webhook-signature). With payload ids, data holds the event's IDs only.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"The event's ID (evt_…): dedupe by it."},"type":{"type":"string","enum":["reaction.removed"]},"timestamp":{"type":"string","format":"date-time"},"data":{"anyOf":[{"$ref":"#/components/schemas/ReactionData"},{"$ref":"#/components/schemas/MessageRef"}]}},"required":["id","type","timestamp","data"]}}}},"responses":{"200":{"description":"Any 2xx answer acknowledges the event."}}}}}}