Validar automação (não salva)
curl --request POST \
--url https://apiv3.usecorvex.com.br/api/v1/automations/validate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Store-Id: <x-store-id>' \
--data '
{
"name": "Lembrete PIX",
"trigger_event": "pix.generated",
"steps": [
{
"type": "delay",
"minutes": 30,
"nextId": "mail-1"
},
{
"id": "mail-1",
"type": "action",
"name": "send_email",
"data": {
"template_id": "aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa"
}
}
]
}
'const options = {
method: 'POST',
headers: {
'X-Store-Id': '<x-store-id>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: 'Lembrete PIX',
trigger_event: 'pix.generated',
steps: [
{type: 'delay', minutes: 30, nextId: 'mail-1'},
{
id: 'mail-1',
type: 'action',
name: 'send_email',
data: {template_id: 'aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa'}
}
]
})
};
fetch('https://apiv3.usecorvex.com.br/api/v1/automations/validate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://apiv3.usecorvex.com.br/api/v1/automations/validate"
payload = {
"name": "Lembrete PIX",
"trigger_event": "pix.generated",
"steps": [
{
"type": "delay",
"minutes": 30,
"nextId": "mail-1"
},
{
"id": "mail-1",
"type": "action",
"name": "send_email",
"data": { "template_id": "aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa" }
}
]
}
headers = {
"X-Store-Id": "<x-store-id>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true,
"data": {
"valid": true,
"automation": {
"name": "Lembrete PIX",
"trigger_event": "pix.generated",
"steps": [
{
"type": "delay",
"minutes": 30,
"nextId": "mail-1"
},
{
"id": "mail-1",
"type": "action",
"name": "send_email",
"data": {
"template_id": "aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa"
}
}
],
"active": false
}
}
}{
"success": false,
"error": {
"message": "X-Store-Id deve ser um UUID válido",
"code": "VALIDATION_ERROR"
},
"meta": {
"timestamp": "2026-09-24T14:00:00.000Z",
"status": 400
}
}{
"success": false,
"error": {
"message": "Esta rota exige uma API Key. Use Authorization: Bearer cvx_live_...",
"code": "AUTH_API_KEY_REQUIRED"
},
"meta": {
"timestamp": "2026-09-24T14:00:00.000Z",
"status": 401
}
}{
"success": false,
"error": {
"message": "Sua API Key não tem o escopo necessário para esta operação.",
"code": "AUTH_SCOPE_DENIED"
},
"meta": {
"timestamp": "2026-09-24T14:00:00.000Z",
"status": 403
}
}{
"success": false,
"error": {
"message": "Recurso não encontrado",
"code": "RESOURCE_NOT_FOUND"
},
"meta": {
"timestamp": "2026-09-24T14:00:00.000Z",
"status": 404
}
}{
"success": false,
"message": "Muitas requisições. Tente novamente em instantes.",
"error": "RATE_LIMITED",
"retryAfter": 12
}Referência HTTP
Validar automação (não salva)
Testa o JSON do fluxo sem gravar. Escopo automations:read. Confere gatilho, steps, operators e se cada template_id existe nesta loja no canal certo.
POST
/
api
/
v1
/
automations
/
validate
Validar automação (não salva)
curl --request POST \
--url https://apiv3.usecorvex.com.br/api/v1/automations/validate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Store-Id: <x-store-id>' \
--data '
{
"name": "Lembrete PIX",
"trigger_event": "pix.generated",
"steps": [
{
"type": "delay",
"minutes": 30,
"nextId": "mail-1"
},
{
"id": "mail-1",
"type": "action",
"name": "send_email",
"data": {
"template_id": "aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa"
}
}
]
}
'const options = {
method: 'POST',
headers: {
'X-Store-Id': '<x-store-id>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: 'Lembrete PIX',
trigger_event: 'pix.generated',
steps: [
{type: 'delay', minutes: 30, nextId: 'mail-1'},
{
id: 'mail-1',
type: 'action',
name: 'send_email',
data: {template_id: 'aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa'}
}
]
})
};
fetch('https://apiv3.usecorvex.com.br/api/v1/automations/validate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://apiv3.usecorvex.com.br/api/v1/automations/validate"
payload = {
"name": "Lembrete PIX",
"trigger_event": "pix.generated",
"steps": [
{
"type": "delay",
"minutes": 30,
"nextId": "mail-1"
},
{
"id": "mail-1",
"type": "action",
"name": "send_email",
"data": { "template_id": "aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa" }
}
]
}
headers = {
"X-Store-Id": "<x-store-id>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true,
"data": {
"valid": true,
"automation": {
"name": "Lembrete PIX",
"trigger_event": "pix.generated",
"steps": [
{
"type": "delay",
"minutes": 30,
"nextId": "mail-1"
},
{
"id": "mail-1",
"type": "action",
"name": "send_email",
"data": {
"template_id": "aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa"
}
}
],
"active": false
}
}
}{
"success": false,
"error": {
"message": "X-Store-Id deve ser um UUID válido",
"code": "VALIDATION_ERROR"
},
"meta": {
"timestamp": "2026-09-24T14:00:00.000Z",
"status": 400
}
}{
"success": false,
"error": {
"message": "Esta rota exige uma API Key. Use Authorization: Bearer cvx_live_...",
"code": "AUTH_API_KEY_REQUIRED"
},
"meta": {
"timestamp": "2026-09-24T14:00:00.000Z",
"status": 401
}
}{
"success": false,
"error": {
"message": "Sua API Key não tem o escopo necessário para esta operação.",
"code": "AUTH_SCOPE_DENIED"
},
"meta": {
"timestamp": "2026-09-24T14:00:00.000Z",
"status": 403
}
}{
"success": false,
"error": {
"message": "Recurso não encontrado",
"code": "RESOURCE_NOT_FOUND"
},
"meta": {
"timestamp": "2026-09-24T14:00:00.000Z",
"status": 404
}
}{
"success": false,
"message": "Muitas requisições. Tente novamente em instantes.",
"error": "RATE_LIMITED",
"retryAfter": 12
}