Actualizar segmento
curl --request PATCH \
--url https://api.notifique.dev/v1/segments/{segmentId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "VIP mejorado",
"definition": {
"version": 1,
"match": "all",
"rules": [
{
"type": "tag",
"tagId": "cltag01vip"
},
{
"type": "property",
"key": "cidade",
"op": "contains",
"value": "cachoeiro",
"ignoreCase": true
},
{
"type": "topic",
"topicId": "cltopic01",
"subscribed": true
},
{
"type": "contactField",
"field": "languages",
"op": "includes",
"value": "pt-BR"
},
{
"type": "receiveMarketing",
"value": true
}
]
}
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'VIP mejorado',
definition: {
version: 1,
match: 'all',
rules: [
{type: 'tag', tagId: 'cltag01vip'},
{
type: 'property',
key: 'cidade',
op: 'contains',
value: 'cachoeiro',
ignoreCase: true
},
{type: 'topic', topicId: 'cltopic01', subscribed: true},
{type: 'contactField', field: 'languages', op: 'includes', value: 'pt-BR'},
{type: 'receiveMarketing', value: true}
]
}
})
};
fetch('https://api.notifique.dev/v1/segments/{segmentId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.notifique.dev/v1/segments/{segmentId}"
payload = {
"name": "VIP mejorado",
"definition": {
"version": 1,
"match": "all",
"rules": [
{
"type": "tag",
"tagId": "cltag01vip"
},
{
"type": "property",
"key": "cidade",
"op": "contains",
"value": "cachoeiro",
"ignoreCase": True
},
{
"type": "topic",
"topicId": "cltopic01",
"subscribed": True
},
{
"type": "contactField",
"field": "languages",
"op": "includes",
"value": "pt-BR"
},
{
"type": "receiveMarketing",
"value": True
}
]
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.notifique.dev/v1/segments/{segmentId}"
payload := strings.NewReader("{\n \"name\": \"VIP mejorado\",\n \"definition\": {\n \"version\": 1,\n \"match\": \"all\",\n \"rules\": [\n {\n \"type\": \"tag\",\n \"tagId\": \"cltag01vip\"\n },\n {\n \"type\": \"property\",\n \"key\": \"cidade\",\n \"op\": \"contains\",\n \"value\": \"cachoeiro\",\n \"ignoreCase\": true\n },\n {\n \"type\": \"topic\",\n \"topicId\": \"cltopic01\",\n \"subscribed\": true\n },\n {\n \"type\": \"contactField\",\n \"field\": \"languages\",\n \"op\": \"includes\",\n \"value\": \"pt-BR\"\n },\n {\n \"type\": \"receiveMarketing\",\n \"value\": true\n }\n ]\n }\n}")
req, _ := http.NewRequest("PATCH", 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": "clseg01abc",
"name": "Cachoeiro VIP con marketing",
"definition": {
"version": 1,
"match": "all",
"rules": [
{
"type": "tag",
"tagId": "cltag01vip"
},
{
"type": "property",
"key": "cidade",
"op": "contains",
"value": "cachoeiro",
"ignoreCase": true
},
{
"type": "topic",
"topicId": "cltopic01",
"subscribed": true
},
{
"type": "contactField",
"field": "languages",
"op": "includes",
"value": "pt-BR"
},
{
"type": "receiveMarketing",
"value": true
}
]
},
"createdAt": "2026-06-28T12:00:00.000Z",
"updatedAt": "2026-07-01T09:00:00.000Z"
}
}{
"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>"
}Segmentos
Actualizar segmento
Actualiza un segmento.
PATCH
/
v1
/
segments
/
{segmentId}
Actualizar segmento
curl --request PATCH \
--url https://api.notifique.dev/v1/segments/{segmentId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "VIP mejorado",
"definition": {
"version": 1,
"match": "all",
"rules": [
{
"type": "tag",
"tagId": "cltag01vip"
},
{
"type": "property",
"key": "cidade",
"op": "contains",
"value": "cachoeiro",
"ignoreCase": true
},
{
"type": "topic",
"topicId": "cltopic01",
"subscribed": true
},
{
"type": "contactField",
"field": "languages",
"op": "includes",
"value": "pt-BR"
},
{
"type": "receiveMarketing",
"value": true
}
]
}
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'VIP mejorado',
definition: {
version: 1,
match: 'all',
rules: [
{type: 'tag', tagId: 'cltag01vip'},
{
type: 'property',
key: 'cidade',
op: 'contains',
value: 'cachoeiro',
ignoreCase: true
},
{type: 'topic', topicId: 'cltopic01', subscribed: true},
{type: 'contactField', field: 'languages', op: 'includes', value: 'pt-BR'},
{type: 'receiveMarketing', value: true}
]
}
})
};
fetch('https://api.notifique.dev/v1/segments/{segmentId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.notifique.dev/v1/segments/{segmentId}"
payload = {
"name": "VIP mejorado",
"definition": {
"version": 1,
"match": "all",
"rules": [
{
"type": "tag",
"tagId": "cltag01vip"
},
{
"type": "property",
"key": "cidade",
"op": "contains",
"value": "cachoeiro",
"ignoreCase": True
},
{
"type": "topic",
"topicId": "cltopic01",
"subscribed": True
},
{
"type": "contactField",
"field": "languages",
"op": "includes",
"value": "pt-BR"
},
{
"type": "receiveMarketing",
"value": True
}
]
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.notifique.dev/v1/segments/{segmentId}"
payload := strings.NewReader("{\n \"name\": \"VIP mejorado\",\n \"definition\": {\n \"version\": 1,\n \"match\": \"all\",\n \"rules\": [\n {\n \"type\": \"tag\",\n \"tagId\": \"cltag01vip\"\n },\n {\n \"type\": \"property\",\n \"key\": \"cidade\",\n \"op\": \"contains\",\n \"value\": \"cachoeiro\",\n \"ignoreCase\": true\n },\n {\n \"type\": \"topic\",\n \"topicId\": \"cltopic01\",\n \"subscribed\": true\n },\n {\n \"type\": \"contactField\",\n \"field\": \"languages\",\n \"op\": \"includes\",\n \"value\": \"pt-BR\"\n },\n {\n \"type\": \"receiveMarketing\",\n \"value\": true\n }\n ]\n }\n}")
req, _ := http.NewRequest("PATCH", 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": "clseg01abc",
"name": "Cachoeiro VIP con marketing",
"definition": {
"version": 1,
"match": "all",
"rules": [
{
"type": "tag",
"tagId": "cltag01vip"
},
{
"type": "property",
"key": "cidade",
"op": "contains",
"value": "cachoeiro",
"ignoreCase": true
},
{
"type": "topic",
"topicId": "cltopic01",
"subscribed": true
},
{
"type": "contactField",
"field": "languages",
"op": "includes",
"value": "pt-BR"
},
{
"type": "receiveMarketing",
"value": true
}
]
},
"createdAt": "2026-06-28T12:00:00.000Z",
"updatedAt": "2026-07-01T09:00:00.000Z"
}
}{
"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>"
}Autorizaciones
ntfContactBearerAuthntfContactApiKeyHeader
Autorización: Portador sk_live_xxxxx
Parámetros de ruta
Cuerpo
application/json
Maximum string length:
128DSL v1: versión, coincidencia (todas|cualquiera), reglas (comieron 32). Tipos: etiqueta, propiedad, campo de contacto, tema, recibirMarketing.
Show child attributes
Show child attributes
Ejemplo:
{
"version": 1,
"match": "all",
"rules": [
{ "type": "tag", "tagId": "cltag01vip" },
{
"type": "property",
"key": "cidade",
"op": "contains",
"value": "cachoeiro",
"ignoreCase": true
},
{
"type": "topic",
"topicId": "cltopic01",
"subscribed": true
},
{
"type": "contactField",
"field": "languages",
"op": "includes",
"value": "pt-BR"
},
{ "type": "receiveMarketing", "value": true }
]
}
Respuesta
Actualizado.
Show child attributes
Show child attributes
Ejemplo:
{
"id": "clseg01abc",
"name": "Cachoeiro VIP con marketing",
"definition": {
"version": 1,
"match": "all",
"rules": [
{ "type": "tag", "tagId": "cltag01vip" },
{
"type": "property",
"key": "cidade",
"op": "contains",
"value": "cachoeiro",
"ignoreCase": true
},
{
"type": "topic",
"topicId": "cltopic01",
"subscribed": true
},
{
"type": "contactField",
"field": "languages",
"op": "includes",
"value": "pt-BR"
},
{ "type": "receiveMarketing", "value": true }
]
},
"createdAt": "2026-06-28T12:00:00.000Z",
"updatedAt": "2026-07-01T09:00:00.000Z"
}
¿Esta página le ayudó?
⌘I

