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": "Exemplo",
"telegramLinks": [
{
"instanceId": "clxx...",
"peer": "string"
}
],
"languages": [
"string"
],
"url": "https://example.com/resource",
"tagIds": [
"clxx..."
],
"receiveMarketing": true
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
phone: 'string',
email: 'string',
name: 'Exemplo',
telegramLinks: [{instanceId: 'clxx...', peer: 'string'}],
languages: ['string'],
url: 'https://example.com/resource',
tagIds: ['clxx...'],
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": "Exemplo",
"telegramLinks": [
{
"instanceId": "clxx...",
"peer": "string"
}
],
"languages": ["string"],
"url": "https://example.com/resource",
"tagIds": ["clxx..."],
"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\": \"Exemplo\",\n \"telegramLinks\": [\n {\n \"instanceId\": \"clxx...\",\n \"peer\": \"string\"\n }\n ],\n \"languages\": [\n \"string\"\n ],\n \"url\": \"https://example.com/resource\",\n \"tagIds\": [\n \"clxx...\"\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": "clxx...",
"name": "Exemplo",
"phone": "string",
"email": "string",
"languages": [
"string"
],
"receiveMarketing": true,
"telegramLinks": [
{
"instanceId": "clxx...",
"peer": "string",
"instanceName": "string"
}
],
"url": "https://example.com/resource",
"createdAt": "2025-02-10T14:00:00.000Z",
"updatedAt": "2025-02-10T14:00:00.000Z",
"tags": [
{
"id": "clxx...",
"name": "Exemplo"
}
]
}
}{
"success": false,
"error": "Bad Request",
"code": "VALIDATION_ERROR",
"message": "Campo inválido ou ausente."
}{
"success": false,
"error": "Bad Request",
"code": "VALIDATION_ERROR",
"message": "Campo inválido ou ausente."
}{
"success": false,
"error": "Bad Request",
"code": "VALIDATION_ERROR",
"message": "Campo inválido ou ausente."
}{
"success": false,
"error": "Bad Request",
"code": "VALIDATION_ERROR",
"message": "Campo inválido ou ausente."
}{
"success": false,
"error": "Bad Request",
"code": "VALIDATION_ERROR",
"message": "Campo inválido ou ausente."
}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": "Exemplo",
"telegramLinks": [
{
"instanceId": "clxx...",
"peer": "string"
}
],
"languages": [
"string"
],
"url": "https://example.com/resource",
"tagIds": [
"clxx..."
],
"receiveMarketing": true
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
phone: 'string',
email: 'string',
name: 'Exemplo',
telegramLinks: [{instanceId: 'clxx...', peer: 'string'}],
languages: ['string'],
url: 'https://example.com/resource',
tagIds: ['clxx...'],
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": "Exemplo",
"telegramLinks": [
{
"instanceId": "clxx...",
"peer": "string"
}
],
"languages": ["string"],
"url": "https://example.com/resource",
"tagIds": ["clxx..."],
"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\": \"Exemplo\",\n \"telegramLinks\": [\n {\n \"instanceId\": \"clxx...\",\n \"peer\": \"string\"\n }\n ],\n \"languages\": [\n \"string\"\n ],\n \"url\": \"https://example.com/resource\",\n \"tagIds\": [\n \"clxx...\"\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": "clxx...",
"name": "Exemplo",
"phone": "string",
"email": "string",
"languages": [
"string"
],
"receiveMarketing": true,
"telegramLinks": [
{
"instanceId": "clxx...",
"peer": "string",
"instanceName": "string"
}
],
"url": "https://example.com/resource",
"createdAt": "2025-02-10T14:00:00.000Z",
"updatedAt": "2025-02-10T14:00:00.000Z",
"tags": [
{
"id": "clxx...",
"name": "Exemplo"
}
]
}
}{
"success": false,
"error": "Bad Request",
"code": "VALIDATION_ERROR",
"message": "Campo inválido ou ausente."
}{
"success": false,
"error": "Bad Request",
"code": "VALIDATION_ERROR",
"message": "Campo inválido ou ausente."
}{
"success": false,
"error": "Bad Request",
"code": "VALIDATION_ERROR",
"message": "Campo inválido ou ausente."
}{
"success": false,
"error": "Bad Request",
"code": "VALIDATION_ERROR",
"message": "Campo inválido ou ausente."
}{
"success": false,
"error": "Bad Request",
"code": "VALIDATION_ERROR",
"message": "Campo inválido ou ausente."
}Autorizações
ntfContactBearerAuthntfContactApiKeyHeader
Authorization: Bearer sk_live_xxxxx
Corpo
application/json
Pelo menos um de phone ou email obrigatório. telegramLinks ou languages opcional (códigos de GET /v1/meta/contact-locales).
Telefone (único por workspace)
E-mail (único por workspace)
Ligações Telegram por instância (instanceId + peer).
Show child attributes
Show child attributes
Substitui a lista de idiomas (vazia permitida).
IDs das tags a vincular
Resposta
Contato criado.
Exemplo:
true
Contato do workspace (phone e/ou email; tags). telegramLinks por instância Telegram;
Show child attributes
Show child attributes
Exemplo:
{
"id": "clxx...",
"name": "Exemplo",
"phone": "string",
"email": "string",
"languages": ["string"],
"receiveMarketing": true,
"telegramLinks": [
{
"instanceId": "clxx...",
"peer": "string",
"instanceName": "string"
}
],
"url": "https://example.com/resource",
"createdAt": "2025-02-10T14:00:00.000Z",
"updatedAt": "2025-02-10T14:00:00.000Z",
"tags": [{ "id": "clxx...", "name": "Exemplo" }]
}
Esta página foi útil?

