Pular para o conteúdo

/api/v1/channels (POST)

POST
/api/v1/channels
curl --request POST \
--url https://api.endless.zaia.app/api/v1/channels \
--header 'Content-Type: application/json' \
--data '{ "delay": 1, "description": "example", "detail": { "initialMessage": "example", "responseWebhookUrl": "https://example.com", "type": "api" }, "maxAssistantMessagesPerChatOwner": 1, "name": "example", "prompt": "example", "responderId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "showSenderName": true, "status": "active", "useVoice": "on-audio/without-transcription" }'

Creates a new channel.

Media typeapplication/json
object
delay
required

The delay between the last user message and the beginning of the response generation.

integer
>= 1 <= 60
description
required

The internal description of the channel.

string
nullable >= 3 characters <= 250 characters
detail
required
Any of:
object
initialMessage
required

The initial message to be displayed when the API is used.

string
nullable >= 1 characters <= 250 characters
responseWebhookUrl
required

The webhook URL that receives responses produced through the API channel.

string format: uri
>= 3 characters <= 500 characters
type
required

The channel subtype represented by this detail payload.

string
Allowed values: api
maxAssistantMessagesPerChatOwner
required
integer
nullable
name
required

The display name of the channel.

string
>= 3 characters <= 50 characters
prompt
required

A prompt to be passed down to the agent in the context of this channel.

string
nullable >= 3 characters <= 500 characters
responderId
required

The super identity of the responder (agents or squads) of the channel

string format: uuid
nullable
showSenderName
required

Whether to display sender names in chat messages.

boolean
status
required

The lifecycle status of the channel.

string
Allowed values: active inactive
useVoice
required

The voice behavior mode configured for the channel.

string
Allowed values: on-audio/without-transcription on-audio/with-transcription always/without-transcription always/with-transcription never

The channel was created.

Media typeapplication/json
object
createdAt
required
string format: date-time
id
required

A UUID v4 string that identifies an entity.

string format: uuid
isRemoved
required
boolean
updatedAt
required
string format: date-time
delay
required

The delay between the last user message and the beginning of the response generation.

integer
>= 1 <= 60
description
required

The internal description of the channel.

string
nullable >= 3 characters <= 250 characters
detail
required
Any of:
object
initialMessage
required

The initial message to be displayed when the API is used.

string
nullable >= 1 characters <= 250 characters
responseWebhookUrl
required

The webhook URL that receives responses produced through the API channel.

string format: uri
>= 3 characters <= 500 characters
type
required

The channel subtype represented by this detail payload.

string
Allowed values: api
maxAssistantMessagesPerChatOwner
required
integer
nullable
name
required

The display name of the channel.

string
>= 3 characters <= 50 characters
prompt
required

A prompt to be passed down to the agent in the context of this channel.

string
nullable >= 3 characters <= 500 characters
responderId
required

The super identity of the responder (agents or squads) of the channel

string format: uuid
nullable
showSenderName
required

Whether to display sender names in chat messages.

boolean
status
required

The lifecycle status of the channel.

string
Allowed values: active inactive
useVoice
required

The voice behavior mode configured for the channel.

string
Allowed values: on-audio/without-transcription on-audio/with-transcription always/without-transcription always/with-transcription never
workspaceId
required

The workspace ID that owns the channel.

string format: uuid
Example
{
"detail": {
"type": "api"
},
"status": "active",
"useVoice": "on-audio/without-transcription"
}

Invalid channel configuration.

Media typeapplication/json

The description of a known exception.

object
code

The error code.

string
cta

The error call-to-action.

object
type
required
string
Allowed values: support-contact
url
required
string format: uri
feedback
required

The error feedback.

object
enUs
string
esEs
string
ptBr
string
message
required

The error message.

string
name
required

The error name.

string
Example
{
"cta": {
"type": "support-contact"
}
}

Unauthorized.

Media typeapplication/json

The description of a known exception.

object
code

The error code.

string
cta

The error call-to-action.

object
type
required
string
Allowed values: support-contact
url
required
string format: uri
feedback
required

The error feedback.

object
enUs
string
esEs
string
ptBr
string
message
required

The error message.

string
name
required

The error name.

string
Example
{
"cta": {
"type": "support-contact"
}
}

Plan limit exceeded.

Media typeapplication/json

The description of a known exception.

object
code

The error code.

string
cta

The error call-to-action.

object
type
required
string
Allowed values: support-contact
url
required
string format: uri
feedback
required

The error feedback.

object
enUs
string
esEs
string
ptBr
string
message
required

The error message.

string
name
required

The error name.

string
Example
{
"cta": {
"type": "support-contact"
}
}

Resource not found.

Media typeapplication/json

The description of a known exception.

object
code

The error code.

string
cta

The error call-to-action.

object
type
required
string
Allowed values: support-contact
url
required
string format: uri
feedback
required

The error feedback.

object
enUs
string
esEs
string
ptBr
string
message
required

The error message.

string
name
required

The error name.

string
Example
{
"cta": {
"type": "support-contact"
}
}

A channel for this connection already exists.

Media typeapplication/json

The description of a known exception.

object
code

The error code.

string
cta

The error call-to-action.

object
type
required
string
Allowed values: support-contact
url
required
string format: uri
feedback
required

The error feedback.

object
enUs
string
esEs
string
ptBr
string
message
required

The error message.

string
name
required

The error name.

string
Example
{
"cta": {
"type": "support-contact"
}
}