# Gleap Documentation - [Documentation (270 pages)](https://docs.gleap.ai/_llms/documentation.md): Documentation for Documentation. - [API Reference (320 pages)](https://docs.gleap.ai/_llms/api-reference.md): Documentation for API Reference. ## Conversations API ### Guide - [Overview](https://docs.gleap.ai/documentation/s2s/overview.md): Build your own support UI on top of Gleap — the Server-to-Server Conversations API - [Authentication](https://docs.gleap.ai/documentation/s2s/authentication.md): Service-account tokens, sandboxes and API versioning - [Quickstart](https://docs.gleap.ai/documentation/s2s/quickstart.md): The full conversation loop in six requests - [Workflows & bots](https://docs.gleap.ai/documentation/s2s/workflows.md): Render Gleap workflow steps in your own UI and answer them - [Webhooks & events](https://docs.gleap.ai/documentation/s2s/webhooks.md): The event catalog, envelope, signatures and delivery semantics - [Realtime stream](https://docs.gleap.ai/documentation/s2s/stream.md): One Pusher-protocol connection per backend instance - [Errors, idempotency & versioning](https://docs.gleap.ai/documentation/s2s/errors-idempotency.md): Problem details, retry semantics and the compatibility contract ### Endpoints #### S2S Contacts - [Get contact](https://docs.gleap.ai/api-reference/s2s-contacts/get-contact.md): Fetch a contact including its unread conversation count. - [Upsert contact](https://docs.gleap.ai/api-reference/s2s-contacts/upsert-contact.md): Create or update a contact. Returns the full contact including its unread conversation count. - [Delete contact](https://docs.gleap.ai/api-reference/s2s-contacts/delete-contact.md): Delete a contact and their conversations (the platform's standard contact deletion — same behaviour as the admin API). - [Track contact events](https://docs.gleap.ai/api-reference/s2s-contacts/track-contact-events.md): Track events for a contact (drives outbound messaging and workflows). - [List contact conversations](https://docs.gleap.ai/api-reference/s2s-contacts/list-contact-conversations.md): List the contact's conversations, most recent activity first. Bot-only conversations without human interaction are hidden — exactly the widget's conversation list. - [Create conversation](https://docs.gleap.ai/api-reference/s2s-contacts/create-conversation.md): Open a conversation for a contact, authored as the contact. Pass workflowId to start a workflow, or agentId to engage an AI agent. The contact is created on the fly if it does not exist yet. #### S2S Conversations - [Get conversation](https://docs.gleap.ai/api-reference/s2s-conversations/get-conversation.md): Fetch a conversation. Attributes are filtered to customer-visible ones. - [Update conversation](https://docs.gleap.ai/api-reference/s2s-conversations/update-conversation.md): Update conversation title and/or attributes (merge semantics). - [Close conversation](https://docs.gleap.ai/api-reference/s2s-conversations/close-conversation.md): Close the conversation for the contact. Further contact messages are rejected with `conversation_closed` until it is reopened. - [Reopen conversation](https://docs.gleap.ai/api-reference/s2s-conversations/reopen-conversation.md): Reopen a closed conversation. - [Mark conversation read](https://docs.gleap.ai/api-reference/s2s-conversations/mark-conversation-read.md): Mark the conversation read for the contact (explicit read receipt). Clears the contact's unread state for this conversation. - [Typing indicator](https://docs.gleap.ai/api-reference/s2s-conversations/typing-indicator.md): Signal that the contact is typing (or stopped typing). Debounce on your side; send only while a conversation is on screen. - [Set network logs](https://docs.gleap.ai/api-reference/s2s-conversations/set-network-logs.md): Attach a network log snapshot to the conversation — the same logs `Gleap.logNetwork()` collects in the SDK flow. Shown to agents in the conversation's "Logs" panel. Each call replaces the previous snapshot (max 100 requests, 2 MB). Not delivered via webhooks or the stream. - [Set conversation events](https://docs.gleap.ai/api-reference/s2s-conversations/set-conversation-events.md): Attach an event log snapshot to the conversation — the same events `Gleap.trackEvent()` buffers in the SDK flow and attaches when a conversation is created. Scoped to this conversation only (not the contact), so events from other sessions never mix in. Shown to agents in the conversation's "Logs" pa… - [Rate conversation](https://docs.gleap.ai/api-reference/s2s-conversations/rate-conversation.md): Rate the conversation (CSAT), integer 0–10. - [List messages](https://docs.gleap.ai/api-reference/s2s-conversations/list-messages.md): Read the conversation's messages, oldest first, cursor-paginated (max 100 per page). Pass `after` = the last message id you have. Reading messages does NOT mark the conversation read — use the explicit read receipt. - [Send message](https://docs.gleap.ai/api-reference/s2s-conversations/send-message.md): Send a message into the conversation, authored as the contact. - [Get pending workflow step](https://docs.gleap.ai/api-reference/s2s-conversations/get-pending-workflow-step.md): The workflow step currently waiting for the contact, if any. - [Answer workflow step](https://docs.gleap.ai/api-reference/s2s-conversations/answer-workflow-step.md): Answer the pending workflow step (text, selection, rating, attachments) or request a human with botAction "humanHandoff". - [Run workflow](https://docs.gleap.ai/api-reference/s2s-conversations/run-workflow.md): Run a specific workflow on this conversation (replaces any active one). #### S2S Messages - [Get message](https://docs.gleap.ai/api-reference/s2s-messages/get-message.md): Fetch a single message. - [Rate message](https://docs.gleap.ai/api-reference/s2s-messages/rate-message.md): Rate a message (thumbs up / down) — typically an AI answer. #### S2S Stream - [Get stream config](https://docs.gleap.ai/api-reference/s2s-stream/get-stream-config.md): Connection parameters. Read these at startup instead of hardcoding — if the realtime infrastructure moves, your client follows automatically. - [Authorize channel subscription](https://docs.gleap.ai/api-reference/s2s-stream/authorize-channel-subscription.md): Channel authorization — point your Pusher client's channel auth here with your server key as the Authorization header. A new consumerId takes over from the previous consumer (its connection is terminated). - [Authenticate stream user](https://docs.gleap.ai/api-reference/s2s-stream/authenticate-stream-user.md): User authentication (Pusher signin) — REQUIRED for server-side takeover termination to reach your connection. Configure it as the client's userAuthentication endpoint. #### S2S Webhooks - [List webhooks](https://docs.gleap.ai/api-reference/s2s-webhooks/list-webhooks.md): List webhook endpoints (secrets masked). - [Create webhook](https://docs.gleap.ai/api-reference/s2s-webhooks/create-webhook.md): Register a webhook endpoint. The signing secret is returned exactly once. - [Delete webhook](https://docs.gleap.ai/api-reference/s2s-webhooks/delete-webhook.md): Delete a webhook endpoint. #### S2S Workflows - [List workflows](https://docs.gleap.ai/api-reference/s2s-workflows/list-workflows.md): List the project's live workflows. #### S2S Uploads - [Upload a file](https://docs.gleap.ai/api-reference/s2s-uploads/upload-a-file.md): Multipart upload (field `file`, max 25 MB). Returned URLs are signed and expire — attach them to a message promptly and never persist them. Idempotency-Key is not supported on multipart uploads (re-uploading is safe: every upload mints a fresh URL). - [Upload a voice note](https://docs.gleap.ai/api-reference/s2s-uploads/upload-a-voice-note.md): Multipart upload (field `file`, max 25 MB). Transcoded to MP3 server-side. ## OpenAPI Specs - [api-docs](https://api.gleap.io/api-docs.json) - [s2s-openapi](/openapi/s2s-openapi.json) ## Optional - [Website](https://www.gleap.ai) - [Helpcenter](https://help.gleap.io) - [Roadmap](http://feedback.gleap.io) - [Blog](https://www.gleap.ai/blog) > The links below point to documentation indexes. Follow each `/_llms/` index recursively until you reach documentation pages. ## Indexes - [Documentation (270 pages)](https://docs.gleap.ai/_llms/documentation.md): Documentation for Documentation. - [API Reference (320 pages)](https://docs.gleap.ai/_llms/api-reference.md): Documentation for API Reference.