• EN
  • Requests and errors

    Use HTTPS and JSON. Hosted examples use https://app.pulsechat.ru/api/v1. Self-hosted clients use their installation's public origin followed by /api/v1.

    Content-Type: application/json
    Authorization: Bearer <your-bot-token>

    This reference describes routes and defaults in the current source. Deployment configuration can change limits and feature availability. Confirm the capabilities of the installation you call.

    Status and errors

    Successful bot sends return 201. Channel lists, message updates, and message deletes return 200. Read each endpoint's contract before assuming a response shape.

    Bot validation and authorization errors have an error string.

    {"error":"Bot cannot post in this channel"}

    Handle errors by status. Treat message text as diagnostic information. Check 401 credentials, 403 permissions, and 400 payloads before retrying. 404 can indicate a resource outside the token's workspace or ownership. Preserve status, safe request metadata, and the error text in logs while excluding credentials.

    Idempotent message creation

    Send Idempotency-Key with POST /bots/messages to avoid duplicate messages when a response is lost. A JSON idempotency_key is also accepted. A non-empty header takes precedence.

    Keys have 1–120 characters. The first is a letter or digit. Remaining characters may be letters, digits, -, _, ., and :. Pulse trims surrounding whitespace.

    Idempotency-Key: deploy-build-1042

    The key is scoped to the credential and route. The record expires after 24 hours. Retrying the same key with the same normalized request returns the stored status and message response when available. A replay includes the header Idempotency-Replayed: true. Reuse after expiry can create another message.

    Changing the channel, text, parent, or blocks with a retained key returns 409 with idempotency_key_conflict. A request still in progress can return 409 with idempotency_key_in_progress. Wait briefly and retry the unchanged request in that case. Use a new key only for a new logical message.

    Keep the same token, key, and payload when retrying network failures or uncertain server failures. Token rotation changes the credential scope of the key. Retrying under the new token can create a second message.

    Idempotency on this page covers message creation. Updates and deletion do not implement this header contract.

    Rate limits

    The source defaults for authenticated bot endpoints use a fixed 60-second window.

    BudgetDefault
    Per bot or installation token120 requests per window
    Per workspace across tokens600 requests per window

    Operators can change these limits. The budget covers requests across the bot route group, including channel discovery and retries. It does not describe incoming webhook or provider-specific limits.

    A rejected request returns 429 with {"error":"Bot rate limit exceeded"} and Retry-After in seconds. Wait at least that long. Queue messages and limit concurrency to avoid retry bursts. For transient network and server failures, use bounded exponential backoff with jitter and retain the message idempotency key.

    Pagination

    GET /bots/channels returns items and next_cursor. Pass the exact cursor back in the cursor query parameter. Stop when it is null. Encode query parameters with your HTTP library and keep the cursor opaque.

    Continue with authentication, messages, or webhooks.