Apps
Subscribe user to events subscribed via a Webhook
Registers a webhook for the user without requiring a client_id. A client_id will be generated automatically. To update or delete, use the client_id returned in the response. Authorization matches POST /apps/:client_id/subscribe once the implicit client exists: OAuth access token for that client, Personal Access Token with cv:write on an app you own, short-lived stateless agent JWT (minted via POST /agents/:id/tokens) whose payload includes cv:read and cv:write, or session token (pxtoken) for an app you own.
post/apps/subscribe
Request
- Base URL: https://api.carbonvoice.app
- URL: https://api.carbonvoice.app/apps/subscribe
- Auth: one of:
- API key in header pxtoken
- OAuth 2 (implicit, authorization URL https://api.carbonvoice.app/oauth/authorize)
Request body
Example request
{
"subscription_filters": [
{
"key": "name",
"operator": "eq"
}
],
"subscription_actions": [
{
"action_id": "run_ai_prompt",
"entity_type": "ai_prompt",
"metadata": {
"conversation_id": "channel_123",
"send_as_bot": true,
"message": "Daily standup reminder!",
"links": [
"https://pxassets.s3.us-east-2.amazonaws.com/images/v2/logo.png",
"https://pxassets.s3.us-east-2.amazonaws.com/images/v2/Personal+CarbonLink.svg",
"https://www.youtube.com/watch?v=36Tn5cektlg"
]
}
}
],
"webhook_headers": {
"x-api-key": "secret",
"x-version": 2
}
}Response
Example response
{
"subscriptions": [
"message.initializing",
"message.started",
"message.paused",
"message.resumed",
"message.offline",
"message.processing",
"message.finished",
"message.deleted",
"message.discussion-notes.added",
"message.label.added",
"message.attachment.added",
"message.attachment.uploaded",
"message.posted.to.channel",
"message.voicememo.created",
"channel.created",
"channel.deleted",
"channel.user.joined",
"channel.users.added",
"channel.user.left",
"channel.user.removed",
"channel.async-check.mid",
"channel.async-check.ending",
"channel.async.ended",
"channel.async.extended",
"channel.async.shortened",
"channel.ai-summary.generated",
"workspace.user.joined",
"workspace.user.added",
"workspace.user.left",
"workspace.user.removed",
"workspace.findable-channel.created",
"ai.prompt.response.generated",
"action-item.created",
"action-item.updated",
"action-item.deleted",
"action-item.status.changed",
"ask.answered"
],
"subscription_filters": [
{
"key": "name",
"operator": "eq"
}
],
"subscription_actions": [
{
"action_id": "run_ai_prompt",
"entity_type": "ai_prompt",
"metadata": {
"conversation_id": "channel_123",
"send_as_bot": true,
"message": "Daily standup reminder!",
"links": [
"https://pxassets.s3.us-east-2.amazonaws.com/images/v2/logo.png",
"https://pxassets.s3.us-east-2.amazonaws.com/images/v2/Personal+CarbonLink.svg",
"https://www.youtube.com/watch?v=36Tn5cektlg"
]
}
}
]
}Changes
No recorded changes to this operation across all 1 revision of this API.