Atualizar contato
curl --request PUT \
--url https://api.notifique.dev/v1/contacts/{id} \
--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: 'PUT',
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/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.notifique.dev/v1/contacts/{id}"
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.put(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/{id}"
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("PUT", 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>"
}{
"success": false,
"error": "<string>",
"message": "<string>",
"code": "<string>"
}Contatos
Atualizar contato
Altera dados de um contato.
PUT
/
v1
/
contacts
/
{id}
Atualizar contato
curl --request PUT \
--url https://api.notifique.dev/v1/contacts/{id} \
--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: 'PUT',
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/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.notifique.dev/v1/contacts/{id}"
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.put(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/{id}"
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("PUT", 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>"
}{
"success": false,
"error": "<string>",
"message": "<string>",
"code": "<string>"
}Autorizações
ntfContactBearerAuthntfContactApiKeyHeader
Authorization: Bearer sk_live_xxxxx
Parâmetros de caminho
Corpo
application/json
Todos os campos opcionais; tagIds substitui a lista de tags. telegramLinks (incl. array vazio) substitui todas as ligações. telegramPeer só afeta a instância padrão se telegramLinks não for enviado.
Legado: atualiza só a ligação na instância Telegram padrão; null remove essa ligação.
Maximum string length:
128Substitui todas as ligações Telegram do contato.
Show child attributes
Show child attributes
Esta página foi útil?
⌘I

