KaserkDevelopers

Post a channel update

Notify your team about a deal using the integration’s identity.

Permissions
events.read · deals.read · channels.read · channels.write

  1. In Settings → Integrations authorize the channel for reading and publishing. Grant explicit membership for private channels. GET /channels returns the destinations your integration can read.
  2. A 200 with an empty data array from GET /channels can mean the integration has channels.read but no per-channel reading grant. Enable reading and publishing on the specific channel as well as their operation scopes, save and retry with the current key.
  3. To verify authorship, find the message ID in the paginated channel messages or thread replies. author.type can be member, integration or automation. author.name can be null, and deleted messages have a null author.
  4. Subscribe to deal events. For each newly created deal, put the event ID in the idempotency key and the deal ID in the message. The integration name appears as author.
  5. For a follow-up use POST /channels/{id}/messages/{messageId}/replies with the root message ID. Your team sees the reply in the same thread.
curl --fail-with-body \
  -H "Authorization: Bearer ${KASERK_API_KEY}" \
  "https://api.kaserk.com/v1/channels"

JavaScript example

import { request } from './client.mjs';

export async function notifyChannel({ channelId, eventId, dealId }) {
  return request('/channels/' + encodeURIComponent(channelId) + '/messages', {
    method: 'POST', key: eventId + ':channel', body: { text: 'New deal · ' + dealId },
  });
}

Recovery

If the channel is missing or the API returns 404, ask an administrator to check authorization and membership. Keep the update pending until an authorized destination is available.