Skip to main content
All paths on this page are relative to https://inkbox.ai/api/v1/slack. Use a connection_id UUID from the connection list.

List messages

Reads messages live from Slack. Supply thread_ts to request a thread’s messages instead of conversation history. Your identity must be active and the connection must have access to the conversation.

Response (200)

Message objects can include type, subtype, text, ts, thread_ts, user, bot_id, reply_count, edited, and file metadata in files. Available fields depend on the message. These are supported message fields, not a promise to return every Slack message property. Keep ts and thread_ts as strings to preserve their exact values. Paginate explicitly using next_cursor. History visibility, thread-read permissions, retention, and rate limits come from Slack. For captured message text, use the separate retained-history API. Retained reads still check current conversation access.

Get one message

Returns 200 with the live message object, without a wrapper. Supply optional query parameter thread_ts when reading a reply. A reply may return 404 without its root timestamp. Keep both timestamps as strings.

Read message context

limit defaults to 5 and accepts 1–15. Supply optional thread_ts for a thread window. Returns 200 with messages, next_cursor, has_more, window, and complete: false. Without thread_ts, the window includes messages at or before the selected timestamp and reports window: "messages_at_or_before_timestamp". With thread_ts, it includes the selected timestamp and following replies in that thread and reports window: "messages_at_or_after_timestamp". It does not start from the oldest replies in a long thread. This is a bounded live window, not a complete conversation or a window on both sides of the selected message. The context endpoint does not accept a cursor. Do not reuse its next_cursor with another endpoint; start an explicit message-list request when you need more history.
Returns 200 with conversation_id, message_ts, and permalink, a Slack message URL. The link does not grant its recipient access to the conversation.

Send message

Required header

The key must contain 1–128 characters from A–Z, a–z, 0–9, ., _, :, or -. Choose a stable key for each logical send and save it before sending.

Request body

Omit thread_ts for a top-level message. The bot must have permission to post in the conversation. This endpoint does not upload files or create interactive message layouts.

Response (200)

The returned id identifies the send action, not the Slack message. Save it to inspect the outcome later. HTTP 200 does not by itself mean the message was sent. A stale sending action becomes unknown after roughly two minutes. Stop polling for automatic resolution once the action is terminal.

Idempotency

  • Repeating the same key and body on the same connection returns the existing action without submitting another message.
  • Reusing that key with a different body returns 409.
  • A retry does not restart a failed or unknown action. A new key represents a new send and can duplicate an earlier message if its result was uncertain.
  • Keep the original key if the HTTP response is lost. Look up the action by that key without sending another message. Do not generate a replacement key just because a request timed out.
A definite rate-limit rejection can return 200 with a failed action and error_code: "rate_limited"; HTTP success alone does not mean the message was sent. The initial response includes retry_after in seconds and the Retry-After header when a delay is available. The SDK field is retry_after in Python and Rust, or retryAfter in TypeScript and CLI output. Respect that delay before deliberately creating a new send. Reusing the same key returns the stored failed action without posting again. Later lookups and same-key repeats do not retain the original delay; their retry_after is null and the original retry header is not repeated. You can also subscribe to slack.message_sent, slack.message_send_failed, and slack.message_send_unknown webhooks.

Get action

Both path IDs are UUIDs. Returns 200 with the same action shape as send. This reads the recorded action, not a message receipt from Slack. You can inspect recorded actions after the connection is disconnected. The caller must still have access to the identity. Unknown or inaccessible actions return 404.

Recover action by key

Use this read-only lookup when a send response was lost and you saved its idempotency key but not the action ID. The required Idempotency-Key header follows the send key format. Returns 200 with the action object. The lookup does not send a message or restart an action, and remains available after the connection is disconnected. In SDK version 0.7.11 or later, use inkbox.slack.get_action_by_key(connection_id, idempotency_key) in Python or inkbox.slack.getActionByKey(connectionId, idempotencyKey) in TypeScript. In the CLI, use inkbox slack action get-by-key --connection-id CONNECTION_ID --idempotency-key project-reply-01.
cURL
A 404 means no matching action is currently visible to this request. It is not proof that the message was never sent: the original request may still be in progress before its action becomes visible. Keep the original key and retry the lookup. If you repeat the send, preserve both that key and the identical body. Do not use a missing result as permission to send with a new key.

Other message operations

Use Slack operations to edit or delete a message, manage reactions and pins, or set an eligible native processing status. Those writes use in_progress/succeeded/failed/unknown operation statuses, not the send action’s sending/sent statuses.