Skip to main content
POST
/
v1
/
channels
/
slack
/
oauth
/
callback
Complete Slack OAuth
curl --request POST \
  --url https://api.cuadra.ai/v1/channels/slack/oauth/callback \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "code": "<string>",
  "state": "<string>"
}
'
{
  "id": "<string>",
  "organizationId": "<string>",
  "name": "<string>",
  "channelType": "sms",
  "webhookUrl": "<string>",
  "systemPromptId": "<string>",
  "modelId": "<string>",
  "datasetIds": [
    "<string>"
  ],
  "welcomeMessage": "<string>",
  "fallbackMessage": "<string>",
  "status": "active",
  "lastError": "<string>",
  "lastErrorAt": "2023-11-07T05:31:56Z",
  "conversationCount": 123,
  "messageCount": 123,
  "lastMessageAt": "2023-11-07T05:31:56Z",
  "createdAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z",
  "phoneNumber": "<string>"
}

Authorizations

Authorization
string
header
required

JWT token from Stytch B2B authentication (magic link, SSO, or M2M)

Body

application/json

Request to complete Slack OAuth flow.

code
string
required

Authorization code from Slack

state
string
required

State token from initiate response

Response

Successful Response

Response schema for a channel.

id
string
required
organizationId
string
required
name
string
required
channelType
enum<string>
required

Supported channel types.

Available options:
sms,
whatsapp,
telegram,
slack
webhookUrl
string
required

Configure in your provider console

systemPromptId
string | null
required
modelId
string | null
required
datasetIds
string[]
required
welcomeMessage
string | null
required
fallbackMessage
string
required
status
enum<string>
required
Available options:
active,
paused,
error
lastError
string | null
required
lastErrorAt
string<date-time> | null
required
conversationCount
integer
required
messageCount
integer
required
lastMessageAt
string<date-time> | null
required
createdAt
string<date-time>
required
updatedAt
string<date-time>
required
phoneNumber
string | null