Vincular agente da equipe
curl --request POST \
--url https://api.notifique.dev/v1/chat/agents \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"chatAppId": "clxxapp...",
"workspaceUserId": "clxxuser...",
"externalUserId": "agent:clxxuser...",
"name": "Ana"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
chatAppId: 'clxxapp...',
workspaceUserId: 'clxxuser...',
externalUserId: 'agent:clxxuser...',
name: 'Ana'
})
};
fetch('https://api.notifique.dev/v1/chat/agents', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.notifique.dev/v1/chat/agents"
payload = {
"chatAppId": "clxxapp...",
"workspaceUserId": "clxxuser...",
"externalUserId": "agent:clxxuser...",
"name": "Ana"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.notifique.dev/v1/chat/agents"
payload := strings.NewReader("{\n \"chatAppId\": \"clxxapp...\",\n \"workspaceUserId\": \"clxxuser...\",\n \"externalUserId\": \"agent:clxxuser...\",\n \"name\": \"Ana\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"success": true,
"data": {
"id": "<string>",
"chatAppId": "<string>",
"externalUserId": "<string>",
"name": "<string>",
"kind": "USER",
"workspaceUserId": "<string>",
"email": "<string>",
"phone": "<string>",
"avatarUrl": "<string>",
"contactId": "<string>"
}
}{
"success": false,
"error": "<string>",
"code": "<string>",
"message": "<string>"
}{
"success": false,
"error": "<string>",
"code": "<string>",
"message": "<string>"
}{
"success": false,
"error": "<string>",
"code": "<string>",
"message": "<string>"
}Chat Users
Vincular agente da equipe
Crea un usuario AGENT vinculado a un miembro del workspace. Para que el backend o el panel hablen como la empresa. Alcance: chat:users.
POST
/
v1
/
chat
/
agents
Vincular agente da equipe
curl --request POST \
--url https://api.notifique.dev/v1/chat/agents \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"chatAppId": "clxxapp...",
"workspaceUserId": "clxxuser...",
"externalUserId": "agent:clxxuser...",
"name": "Ana"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
chatAppId: 'clxxapp...',
workspaceUserId: 'clxxuser...',
externalUserId: 'agent:clxxuser...',
name: 'Ana'
})
};
fetch('https://api.notifique.dev/v1/chat/agents', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.notifique.dev/v1/chat/agents"
payload = {
"chatAppId": "clxxapp...",
"workspaceUserId": "clxxuser...",
"externalUserId": "agent:clxxuser...",
"name": "Ana"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.notifique.dev/v1/chat/agents"
payload := strings.NewReader("{\n \"chatAppId\": \"clxxapp...\",\n \"workspaceUserId\": \"clxxuser...\",\n \"externalUserId\": \"agent:clxxuser...\",\n \"name\": \"Ana\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"success": true,
"data": {
"id": "<string>",
"chatAppId": "<string>",
"externalUserId": "<string>",
"name": "<string>",
"kind": "USER",
"workspaceUserId": "<string>",
"email": "<string>",
"phone": "<string>",
"avatarUrl": "<string>",
"contactId": "<string>"
}
}{
"success": false,
"error": "<string>",
"code": "<string>",
"message": "<string>"
}{
"success": false,
"error": "<string>",
"code": "<string>",
"message": "<string>"
}{
"success": false,
"error": "<string>",
"code": "<string>",
"message": "<string>"
}Autorizações
ntfChatBearerAuthntfChatApiKeyHeader
API Key sk_live_… / sk_test_… ou JWT do usuário do chat (eyJ…).
Corpo
application/json
Esta página foi útil?

