PATCH /teams/{teamId}/integrations/{id}/webhooks/{webhookId}
url (so out), events, active
- Acesso: Membro da equipe
- Serviço:
https://api.axuz.net
Autenticação aceita
sessionCookie— Sessão plena Axuz (cookie de sessão da casa). Sessão restrita é 403 enrollment_required.bearerSession— JWT de acesso da sessão em `Authorization: Bearer`.
Responde PATCH .../webhooks/{webhookId} (url/eventos/ativo/ canais privados). Reativar (active=true) torna o autor do PATCH o novo "criador" — reconfirmacao apos o criador original perder o papel de admin.
Parâmetros
| Nome | Em | Tipo | Obrigatório | Descrição |
|---|---|---|---|---|
teamId | path | string | sim | |
id | path | string | sim | |
webhookId | path | string | sim |
Corpo da requisição
application/json · Obrigatório
| Nome | Tipo | Obrigatório | Descrição |
|---|---|---|---|
url | string<uri> | não | |
events | array<string> | não | |
active | boolean | não | true reativa e torna o autor do PATCH o novo criador. |
channel_ids | array<string<uuid>> | não | Substitui a lista. |
{
"url": "https://example.test/",
"events": [
"task.created"
],
"active": true,
"channel_ids": [
"00000000-0000-0000-0000-000000000000"
]
}Respostas
200
Atualizado
| Nome | Tipo | Obrigatório | Descrição |
|---|---|---|---|
id | string<uuid> | sim | |
integration_id | string<uuid> | sim | |
direction | string | sim | enum: |
url | string<uri> | não | So direction=out; https. |
events | array<string> | sim | |
channel_ids | array<string<uuid>> | não | Canais privados/DM autorizados (default vazio = so publicos). |
active | boolean | sim | |
secret_version | integer | sim | |
created_at | string<date-time> | sim | |
updated_at | string<date-time> | sim | |
secret_rotated_at | string<date-time> | não |
400
Corpo/parametro invalido (invalid, invalid_body, invalid_cursor...)
| Nome | Tipo | Obrigatório | Descrição |
|---|---|---|---|
error | string | sim |
401
Sem credencial valida
| Nome | Tipo | Obrigatório | Descrição |
|---|---|---|---|
error | string | sim |
403
Sem permissao (nao e owner/admin; token sem escopo; token de integracao em rota nao permitida)
| Nome | Tipo | Obrigatório | Descrição |
|---|---|---|---|
error | string | sim |
404
Nao existe NESTE time (404 uniforme: nao vaza existencia entre times)
| Nome | Tipo | Obrigatório | Descrição |
|---|---|---|---|
error | string | sim |
429
Limite de requisições excedido.
| Nome | Tipo | Obrigatório | Descrição |
|---|---|---|---|
error | string | sim |
500
Erro interno. Tente de novo com backoff; reporte o X-Request-Id.
| Nome | Tipo | Obrigatório | Descrição |
|---|---|---|---|
error | string | sim |
Exemplos
O "Try it" está desligado nesta referência. Use os exemplos com a sua credencial de teste.
curl
curl -sS -X PATCH 'https://api.axuz.net/teams/TEAM_ID/integrations/ID/webhooks/WEBHOOK_ID' \
-H "Authorization: Bearer $AXUZ_TOKEN" \
-H "Content-Type: application/json" \
-d '{"url":"https://example.test/","events":["task.created"],"active":true,"channel_ids":["00000000-0000-0000-0000-000000000000"]}'Node.js
const res = await fetch("https://api.axuz.net/teams/TEAM_ID/integrations/ID/webhooks/WEBHOOK_ID", {
method: 'PATCH',
headers: {
Authorization: `Bearer ${process.env.AXUZ_TOKEN}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"url": "https://example.test/",
"events": [
"task.created"
],
"active": true,
"channel_ids": [
"00000000-0000-0000-0000-000000000000"
]
}),
});
if (!res.ok) throw new Error(`HTTP ${res.status}: ${await res.text()}`);
console.log(await res.json());Python
import os
import requests
res = requests.request(
"PATCH",
"https://api.axuz.net/teams/TEAM_ID/integrations/ID/webhooks/WEBHOOK_ID",
headers={
"Authorization": f"Bearer {os.environ['AXUZ_TOKEN']}",
},
json={
"url": "https://example.test/",
"events": [
"task.created",
],
"active": True,
"channel_ids": [
"00000000-0000-0000-0000-000000000000",
],
},
timeout=30,
)
res.raise_for_status()
print(res.json())