POST /v1/channels/gateway/connect
POST
/v1/channels/gateway/connect
const url = 'https://seu-endereco-da-api/v1/channels/gateway/connect';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"name":"example","importHistory":true,"historyReadConsentVersion":"example","phoneNumber":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://seu-endereco-da-api/v1/channels/gateway/connect \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "name": "example", "importHistory": true, "historyReadConsentVersion": "example", "phoneNumber": "example" }'Permissão que a Chave de acesso precisa: Gerenciar canais (channels:manage).
Authorizations
Seção intitulada “Authorizations”Request Bodyrequired
Seção intitulada “Request Bodyrequired”Media typeapplication/json
object
name
required
string
importHistory
required
boolean
historyReadConsentVersion
string
phoneNumber
string
Example generated
{ "name": "example", "importHistory": true, "historyReadConsentVersion": "example", "phoneNumber": "example"}