Saltar para o conteúdo principal
POST
/
public
/
api
/
v1
/
agents
/
{agentPublicId}
/
channels
Connect a channel (Step 1: connection only, no config)
curl --request POST \
  --url https://api.gennia.ai/public/api/v1/agents/{agentPublicId}/channels \
  --header 'Content-Type: application/json' \
  --header 'X-Api-Key: <api-key>' \
  --data '
{
  "channelType": "whatsapp",
  "isActive": true
}
'
{
  "channelName": "<string>",
  "channelSpecificConfig": {},
  "channelType": "<string>",
  "createdAt": "2023-11-07T05:31:56Z",
  "isActive": true,
  "isConfigured": true,
  "publicId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "updatedAt": "2023-11-07T05:31:56Z"
}

Autorizações

X-Api-Key
string
header
obrigatório

Parâmetros de caminho

agentPublicId
string<uuid>
obrigatório

Corpo

application/json

Body for connecting a new channel to an agent.

channelType
enum<string>

Channel type to connect.

Opções disponíveis:
whatsapp,
z_api,
web_chat
Minimum string length: 1
Pattern: ^(whatsapp|z_api|web_chat)$
Exemplo:

"whatsapp"

isActive
boolean

Whether the channel should be active immediately after connecting.

Exemplo:

true

Resposta

Channel connection created

Agent channel connection. credentials NEVER returned.

channelName
string
channelSpecificConfig
object
channelType
string
createdAt
string<date-time>
instanceMode
enum<string>
Opções disponíveis:
STATIC,
DYNAMIC
isActive
boolean
isConfigured
boolean
publicId
string<uuid>
updatedAt
string<date-time>