Criar webhook
curl --request POST \
--url https://apiv3.usecorvex.com.br/api/v1/webhooks \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Store-Id: <x-store-id>' \
--data '
{
"name": "ERP pedidos",
"description": null,
"url": "https://example.com/hooks/corvex",
"events": [
"ORDER_CREATED",
"ORDER_PAID"
],
"secret": "optional-signing-secret",
"active": true,
"retryAttempts": 3,
"timeout": 30,
"headers": null
}
'const options = {
method: 'POST',
headers: {
'X-Store-Id': '<x-store-id>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: 'ERP pedidos',
description: null,
url: 'https://example.com/hooks/corvex',
events: ['ORDER_CREATED', 'ORDER_PAID'],
secret: 'optional-signing-secret',
active: true,
retryAttempts: 3,
timeout: 30,
headers: null
})
};
fetch('https://apiv3.usecorvex.com.br/api/v1/webhooks', 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/webhooks"
payload = {
"name": "ERP pedidos",
"description": None,
"url": "https://example.com/hooks/corvex",
"events": ["ORDER_CREATED", "ORDER_PAID"],
"secret": "optional-signing-secret",
"active": True,
"retryAttempts": 3,
"timeout": 30,
"headers": None
}
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": {
"webhook": {
"id": "cccccccc-cccc-4ccc-8ccc-cccccccccccc",
"storeId": "11111111-1111-4111-8111-111111111111",
"name": "ERP pedidos",
"description": null,
"url": "https://example.com/hooks/corvex",
"events": [
"ORDER_CREATED",
"ORDER_PAID"
],
"active": true,
"retryAttempts": 3,
"timeout": 30,
"hasSecret": true,
"headers": null,
"createdAt": "2026-09-24T14:00:00.000Z",
"updatedAt": "2026-09-24T14:00:00.000Z"
}
}
}{
"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,
"message": "Muitas requisições. Tente novamente em instantes.",
"error": "RATE_LIMITED",
"retryAfter": 12
}Gerenciar (API v1)
Criar webhook
O secret é opcional e nunca volta nas respostas. Use hasSecret para saber se está configurado.
POST
/
api
/
v1
/
webhooks
Criar webhook
curl --request POST \
--url https://apiv3.usecorvex.com.br/api/v1/webhooks \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Store-Id: <x-store-id>' \
--data '
{
"name": "ERP pedidos",
"description": null,
"url": "https://example.com/hooks/corvex",
"events": [
"ORDER_CREATED",
"ORDER_PAID"
],
"secret": "optional-signing-secret",
"active": true,
"retryAttempts": 3,
"timeout": 30,
"headers": null
}
'const options = {
method: 'POST',
headers: {
'X-Store-Id': '<x-store-id>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: 'ERP pedidos',
description: null,
url: 'https://example.com/hooks/corvex',
events: ['ORDER_CREATED', 'ORDER_PAID'],
secret: 'optional-signing-secret',
active: true,
retryAttempts: 3,
timeout: 30,
headers: null
})
};
fetch('https://apiv3.usecorvex.com.br/api/v1/webhooks', 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/webhooks"
payload = {
"name": "ERP pedidos",
"description": None,
"url": "https://example.com/hooks/corvex",
"events": ["ORDER_CREATED", "ORDER_PAID"],
"secret": "optional-signing-secret",
"active": True,
"retryAttempts": 3,
"timeout": 30,
"headers": None
}
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": {
"webhook": {
"id": "cccccccc-cccc-4ccc-8ccc-cccccccccccc",
"storeId": "11111111-1111-4111-8111-111111111111",
"name": "ERP pedidos",
"description": null,
"url": "https://example.com/hooks/corvex",
"events": [
"ORDER_CREATED",
"ORDER_PAID"
],
"active": true,
"retryAttempts": 3,
"timeout": 30,
"hasSecret": true,
"headers": null,
"createdAt": "2026-09-24T14:00:00.000Z",
"updatedAt": "2026-09-24T14:00:00.000Z"
}
}
}{
"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,
"message": "Muitas requisições. Tente novamente em instantes.",
"error": "RATE_LIMITED",
"retryAfter": 12
}Authorizations
API Key no formato cvx_live_..., criada no painel Corvex. Não use JWT de sessão nem x-api-key.
Headers
UUID da loja. A chave precisa ter esta loja autorizada.
Body
application/json
Required string length:
1 - 100URL HTTPS que recebe o POST.
Maximum string length:
500Eventos que disparam o webhook.
Required array length:
1 - 20 elementsAvailable options:
ORDER_CREATED, ORDER_PAID, ORDER_REFUNDED, ORDER_CANCELLED, ORDER_COMPLETED, SUBSCRIPTION_CREATED, SUBSCRIPTION_CANCELLED, SUBSCRIPTION_RENEWED, CUSTOMER_CREATED, CUSTOMER_UPDATED, PRODUCT_CREATED, PRODUCT_UPDATED, PRODUCT_DELETED, CHECKOUT_CREATED, CHECKOUT_UPDATED, CART_ABANDONED, PAYMENT_PROCESSED, PAYMENT_FAILED, MEMBER_AREA_ACCESS_GRANTED, MEMBER_AREA_ACCESS_REVOKED Maximum string length:
500Opcional. Nunca volta nas respostas; use hasSecret.
Maximum string length:
100Padrão 3.
Required range:
0 <= x <= 10Timeout em segundos. Padrão 30.
Required range:
5 <= x <= 300Headers extras no POST. null para limpar.
Show child attributes
Show child attributes
Response
Criado.