Criar contato
curl --request POST \
--url https://api.notifique.dev/v1/contacts \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"phone": "<string>",
"email": "<string>",
"name": "<string>",
"telegramPeer": "<string>",
"telegramLinks": [
{
"instanceId": "<string>",
"peer": "<string>"
}
],
"languages": [
"<string>"
],
"url": "<string>",
"tagIds": [
"<string>"
],
"receiveMarketing": true
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
phone: '<string>',
email: '<string>',
name: '<string>',
telegramPeer: '<string>',
telegramLinks: [{instanceId: '<string>', peer: '<string>'}],
languages: ['<string>'],
url: '<string>',
tagIds: ['<string>'],
receiveMarketing: true
})
};
fetch('https://api.notifique.dev/v1/contacts', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.notifique.dev/v1/contacts"
payload = {
"phone": "<string>",
"email": "<string>",
"name": "<string>",
"telegramPeer": "<string>",
"telegramLinks": [
{
"instanceId": "<string>",
"peer": "<string>"
}
],
"languages": ["<string>"],
"url": "<string>",
"tagIds": ["<string>"],
"receiveMarketing": True
}
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/contacts"
payload := strings.NewReader("{\n \"phone\": \"<string>\",\n \"email\": \"<string>\",\n \"name\": \"<string>\",\n \"telegramPeer\": \"<string>\",\n \"telegramLinks\": [\n {\n \"instanceId\": \"<string>\",\n \"peer\": \"<string>\"\n }\n ],\n \"languages\": [\n \"<string>\"\n ],\n \"url\": \"<string>\",\n \"tagIds\": [\n \"<string>\"\n ],\n \"receiveMarketing\": true\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>",
"name": "<string>",
"phone": "<string>",
"email": "<string>",
"telegramPeer": "<string>",
"languages": [
"<string>"
],
"receiveMarketing": true,
"telegramLinks": [
{
"instanceId": "<string>",
"peer": "<string>",
"instanceName": "<string>"
}
],
"url": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"tags": [
{
"id": "<string>",
"name": "<string>"
}
]
}
}{
"success": false,
"error": "<string>",
"message": "<string>",
"code": "<string>"
}{
"success": false,
"error": "<string>",
"message": "<string>",
"code": "<string>"
}{
"success": false,
"error": "<string>",
"message": "<string>",
"code": "<string>"
}{
"success": false,
"error": "<string>",
"message": "<string>",
"code": "<string>"
}{
"success": false,
"error": "<string>",
"message": "<string>",
"code": "<string>"
}Contatos
Criar contato
Cadastra um novo contato.
POST
/
v1
/
contacts
Criar contato
curl --request POST \
--url https://api.notifique.dev/v1/contacts \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"phone": "<string>",
"email": "<string>",
"name": "<string>",
"telegramPeer": "<string>",
"telegramLinks": [
{
"instanceId": "<string>",
"peer": "<string>"
}
],
"languages": [
"<string>"
],
"url": "<string>",
"tagIds": [
"<string>"
],
"receiveMarketing": true
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
phone: '<string>',
email: '<string>',
name: '<string>',
telegramPeer: '<string>',
telegramLinks: [{instanceId: '<string>', peer: '<string>'}],
languages: ['<string>'],
url: '<string>',
tagIds: ['<string>'],
receiveMarketing: true
})
};
fetch('https://api.notifique.dev/v1/contacts', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.notifique.dev/v1/contacts"
payload = {
"phone": "<string>",
"email": "<string>",
"name": "<string>",
"telegramPeer": "<string>",
"telegramLinks": [
{
"instanceId": "<string>",
"peer": "<string>"
}
],
"languages": ["<string>"],
"url": "<string>",
"tagIds": ["<string>"],
"receiveMarketing": True
}
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/contacts"
payload := strings.NewReader("{\n \"phone\": \"<string>\",\n \"email\": \"<string>\",\n \"name\": \"<string>\",\n \"telegramPeer\": \"<string>\",\n \"telegramLinks\": [\n {\n \"instanceId\": \"<string>\",\n \"peer\": \"<string>\"\n }\n ],\n \"languages\": [\n \"<string>\"\n ],\n \"url\": \"<string>\",\n \"tagIds\": [\n \"<string>\"\n ],\n \"receiveMarketing\": true\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>",
"name": "<string>",
"phone": "<string>",
"email": "<string>",
"telegramPeer": "<string>",
"languages": [
"<string>"
],
"receiveMarketing": true,
"telegramLinks": [
{
"instanceId": "<string>",
"peer": "<string>",
"instanceName": "<string>"
}
],
"url": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"tags": [
{
"id": "<string>",
"name": "<string>"
}
]
}
}{
"success": false,
"error": "<string>",
"message": "<string>",
"code": "<string>"
}{
"success": false,
"error": "<string>",
"message": "<string>",
"code": "<string>"
}{
"success": false,
"error": "<string>",
"message": "<string>",
"code": "<string>"
}{
"success": false,
"error": "<string>",
"message": "<string>",
"code": "<string>"
}{
"success": false,
"error": "<string>",
"message": "<string>",
"code": "<string>"
}Autorizações
ntfContactBearerAuthntfContactApiKeyHeader
Authorization: Bearer sk_live_xxxxx
Corpo
application/json
Pelo menos um de phone ou email obrigatório. telegramLinks ou telegramPeer (instância padrão). languages opcional (códigos de GET /v1/meta/contact-locales).
Telefone (único por workspace)
E-mail (único por workspace)
Legado: chat_id ou @username na instância Telegram padrão. Ignorado se telegramLinks for enviado.
Maximum string length:
128Uma entrada por instância Telegram; peer único por (instanceId, peer) no workspace.
Show child attributes
Show child attributes
Substitui a lista de idiomas (vazia permitida).
IDs das tags a vincular
Esta página foi útil?
⌘I

