Conta parceira URL base da API
https://crm.vdgestaobranding.com/api/v1A documentação fica em developers.vdgestaobranding.com, mas todas as chamadas vão para crm.vdgestaobranding.com/api/v1 .
GET /operationsoperations:manage
Listar operações (clientes finais) Requer chave de conta (vdk_acct_live_… / vdk_acct_test_…), plano Agência ou Enterprise. A operação precisa pertencer à conta da chave. Filtre por external_id para achar a operação de um cliente do seu sistema.
external_id — ID do cliente no seu sistema. cURL JavaScript Python PHP
curl -X GET "https://crm.vdgestaobranding.com/api/v1/operations" \
-H "Authorization: Bearer $VDCRM_API_KEY"Resposta 200
{
"data": [
{
"id": "op1…",
"name": "Cliente Exemplo Ltda",
"external_id": "cli-42",
"slug": "cliente-exemplo",
"color": null,
"icon": null,
"cnpj": "12345678000190",
"archived": false,
"created_at": "2026-11-03T15:00:00Z"
}
],
"quota": {
"used": 3,
"limit": 50
}
}POST /operationsoperations:manage
Idempotency-Key
Criar operação para um cliente final Requer chave de conta (vdk_acct_live_… / vdk_acct_test_…), plano Agência ou Enterprise. A operação precisa pertencer à conta da chave. external_id é único na conta (409 external_id_taken se repetido, com operation_id existente).
cURL JavaScript Python PHP
curl -X POST "https://crm.vdgestaobranding.com/api/v1/operations" \
-H "Authorization: Bearer $VDCRM_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"name": "Cliente Exemplo Ltda",
"external_id": "cli-42",
"cnpj": "12345678000190",
"legal_name": "Cliente Exemplo Ltda"
}'Resposta 201
{
"id": "op1…",
"name": "Cliente Exemplo Ltda",
"external_id": "cli-42",
"slug": "cliente-exemplo",
"color": null,
"icon": null,
"cnpj": "12345678000190",
"archived": false,
"created_at": "2026-11-03T15:00:00Z"
}GET /operations/{id}operations:manage
Obter operação Requer chave de conta (vdk_acct_live_… / vdk_acct_test_…), plano Agência ou Enterprise. A operação precisa pertencer à conta da chave.
cURL JavaScript Python PHP
curl -X GET "https://crm.vdgestaobranding.com/api/v1/operations/{id}" \
-H "Authorization: Bearer $VDCRM_API_KEY"Resposta 200
{
"id": "op1…",
"name": "Cliente Exemplo Ltda",
"external_id": "cli-42",
"slug": "cliente-exemplo",
"color": null,
"icon": null,
"cnpj": "12345678000190",
"archived": false,
"created_at": "2026-11-03T15:00:00Z"
}PATCH /operations/{id}operations:manage
Atualizar operação Requer chave de conta (vdk_acct_live_… / vdk_acct_test_…), plano Agência ou Enterprise. A operação precisa pertencer à conta da chave.
cURL JavaScript Python PHP
curl -X PATCH "https://crm.vdgestaobranding.com/api/v1/operations/{id}" \
-H "Authorization: Bearer $VDCRM_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Cliente Exemplo",
"external_id": "cli-42"
}'Resposta 200
{
"id": "op1…",
"name": "Cliente Exemplo Ltda",
"external_id": "cli-42",
"slug": "cliente-exemplo",
"color": null,
"icon": null,
"cnpj": "12345678000190",
"archived": false,
"created_at": "2026-11-03T15:00:00Z"
}POST /operations/{id}/archiveoperations:manage
Arquivar operação Requer chave de conta (vdk_acct_live_… / vdk_acct_test_…), plano Agência ou Enterprise. A operação precisa pertencer à conta da chave. Chamadas a uma operação arquivada retornam 409 operation_archived.
cURL JavaScript Python PHP
curl -X POST "https://crm.vdgestaobranding.com/api/v1/operations/{id}/archive" \
-H "Authorization: Bearer $VDCRM_API_KEY"Resposta 200
{
"id": "op1…",
"name": "Cliente Exemplo Ltda",
"external_id": "cli-42",
"slug": "cliente-exemplo",
"color": null,
"icon": null,
"cnpj": "12345678000190",
"archived": true,
"created_at": "2026-11-03T15:00:00Z"
}POST /operations/{id}/restoreoperations:manage
Restaurar operação Requer chave de conta (vdk_acct_live_… / vdk_acct_test_…), plano Agência ou Enterprise. A operação precisa pertencer à conta da chave.
cURL JavaScript Python PHP
curl -X POST "https://crm.vdgestaobranding.com/api/v1/operations/{id}/restore" \
-H "Authorization: Bearer $VDCRM_API_KEY"Resposta 200
{
"id": "op1…",
"name": "Cliente Exemplo Ltda",
"external_id": "cli-42",
"slug": "cliente-exemplo",
"color": null,
"icon": null,
"cnpj": "12345678000190",
"archived": false,
"created_at": "2026-11-03T15:00:00Z"
}GET /operations/{id}/keyskeys:manage
Listar chaves da operação Requer chave de conta (vdk_acct_live_… / vdk_acct_test_…), plano Agência ou Enterprise. A operação precisa pertencer à conta da chave.
cURL JavaScript Python PHP
curl -X GET "https://crm.vdgestaobranding.com/api/v1/operations/{id}/keys" \
-H "Authorization: Bearer $VDCRM_API_KEY"Resposta 200
{
"data": [
{
"id": "k1…",
"name": "Back-end JMR",
"mode": "live",
"prefix": "vdk_live_ab12",
"scopes": [
"inbox:write"
],
"expires_at": null,
"created_at": "2026-11-03T15:00:00Z",
"last_used_at": null,
"revoked_at": null
}
]
}POST /operations/{id}/keyskeys:manage
Idempotency-Key
Criar chave de operação Requer chave de conta (vdk_acct_live_… / vdk_acct_test_…), plano Agência ou Enterprise. A operação precisa pertencer à conta da chave. A chave completa aparece só nesta resposta; guarde-a em um cofre de segredos. Chave de conta de teste só emite chaves de teste. Máximo de 25 chaves ativas por operação.
cURL JavaScript Python PHP
curl -X POST "https://crm.vdgestaobranding.com/api/v1/operations/{id}/keys" \
-H "Authorization: Bearer $VDCRM_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"name": "Back-end JMR",
"mode": "live",
"scopes": [
"inbox:read",
"inbox:write",
"contacts:write",
"webhooks:manage"
],
"expires_at": null,
"allowed_ips": []
}'Resposta 201
{
"id": "k1…",
"name": "Back-end JMR",
"mode": "live",
"prefix": "vdk_live_ab12",
"scopes": [
"inbox:read",
"inbox:write"
],
"key": "vdk_live_…"
}DELETE /operations/{id}/keys/{keyId}keys:manage
Revogar chave de operação Requer chave de conta (vdk_acct_live_… / vdk_acct_test_…), plano Agência ou Enterprise. A operação precisa pertencer à conta da chave. Efeito imediato.
cURL JavaScript Python PHP
curl -X DELETE "https://crm.vdgestaobranding.com/api/v1/operations/{id}/keys/{keyId}" \
-H "Authorization: Bearer $VDCRM_API_KEY"POST /operations/{id}/embed/sessionsembed:create
Idempotency-Key
Criar sessão de embed para um usuário final Requer chave de conta (vdk_acct_live_… / vdk_acct_test_…), plano Agência ou Enterprise. A operação precisa pertencer à conta da chave. Mesmo corpo de POST /embed/sessions; external_user_id é um atalho para user.external_id.
cURL JavaScript Python PHP
curl -X POST "https://crm.vdgestaobranding.com/api/v1/operations/{id}/embed/sessions" \
-H "Authorization: Bearer $VDCRM_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"user": {
"external_id": "u-123",
"name": "Ana",
"email": "ana@cliente.com"
},
"modules": [
"inbox"
],
"permissions": [
"inbox:read",
"inbox:reply"
],
"phone_number_refs": [
"a0b1…"
]
}'Resposta 201
{
"session_id": "es1…",
"token": "vdex_…",
"url": "https://crm.vdgestaobranding.com/embed?t=vdex_…",
"modules": [
"inbox"
],
"test": false
}POST /operations/{id}/connect-sessionsconnect:create
Idempotency-Key
Criar link de conexão do WhatsApp Requer chave de conta (vdk_acct_live_… / vdk_acct_test_…), plano Agência ou Enterprise. A operação precisa pertencer à conta da chave. Link de uso único (30 min) para o cliente final abrir a janela da Meta. Ao concluir: webhook phone_number.connected; em erro: connect_session.failed.
cURL JavaScript Python PHP
curl -X POST "https://crm.vdgestaobranding.com/api/v1/operations/{id}/connect-sessions" \
-H "Authorization: Bearer $VDCRM_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"redirect_url": "https://painel.parceiro.com/whatsapp/conectado"
}'Resposta 201
{
"session_id": "cs1…",
"status": "pending",
"expires_at": "2026-11-03T15:30:00Z",
"operation_id": "op1…",
"url": "https://crm.vdgestaobranding.com/conectar/…"
}GET /operations/{id}/membersmembers:manage
Listar membros com acesso à operação Requer chave de conta (vdk_acct_live_… / vdk_acct_test_…), plano Agência ou Enterprise. A operação precisa pertencer à conta da chave.
cURL JavaScript Python PHP
curl -X GET "https://crm.vdgestaobranding.com/api/v1/operations/{id}/members" \
-H "Authorization: Bearer $VDCRM_API_KEY"Resposta 200
{
"data": [
{
"user_id": "u1…",
"email": "ana@cliente.com",
"role": "atendente",
"operation_ids": [
"op1…"
]
}
]
}POST /operations/{id}/membersmembers:manage
Idempotency-Key
Convidar membro para a operação Requer chave de conta (vdk_acct_live_… / vdk_acct_test_…), plano Agência ou Enterprise. A operação precisa pertencer à conta da chave.
cURL JavaScript Python PHP
curl -X POST "https://crm.vdgestaobranding.com/api/v1/operations/{id}/members" \
-H "Authorization: Bearer $VDCRM_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"email": "ana@cliente.com",
"role": "atendente"
}'PATCH /operations/{id}/members/{userId}members:manage
Alterar perfil do membro Requer chave de conta (vdk_acct_live_… / vdk_acct_test_…), plano Agência ou Enterprise. A operação precisa pertencer à conta da chave.
cURL JavaScript Python PHP
curl -X PATCH "https://crm.vdgestaobranding.com/api/v1/operations/{id}/members/{userId}" \
-H "Authorization: Bearer $VDCRM_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"role": "admin"
}'Resposta 200
{
"user_id": "u1…",
"role": "admin",
"operation_id": "op1…"
}DELETE /operations/{id}/members/{userId}members:manage
Remover acesso de atendente à operação Requer chave de conta (vdk_acct_live_… / vdk_acct_test_…), plano Agência ou Enterprise. A operação precisa pertencer à conta da chave.
cURL JavaScript Python PHP
curl -X DELETE "https://crm.vdgestaobranding.com/api/v1/operations/{id}/members/{userId}" \
-H "Authorization: Bearer $VDCRM_API_KEY"