PATCH /teams/{teamId}/integrations/{id}/webhooks/{webhookId}
url (so out), events, active
- Access: Team member
- Service:
https://api.axuz.net
Accepted authentication
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.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
teamId | path | string | yes | |
id | path | string | yes | |
webhookId | path | string | yes |
Request body
application/json · Required
| Name | Type | Required | Description |
|---|---|---|---|
url | string<uri> | no | |
events | array<string> | no | |
active | boolean | no | true reativa e torna o autor do PATCH o novo criador. |
channel_ids | array<string<uuid>> | no | Substitui a lista. |
{
"url": "https://example.test/",
"events": [
"task.created"
],
"active": true,
"channel_ids": [
"00000000-0000-0000-0000-000000000000"
]
}Responses
200
Atualizado
| Name | Type | Required | Description |
|---|---|---|---|
id | string<uuid> | yes | |
integration_id | string<uuid> | yes | |
direction | string | yes | enum: |
url | string<uri> | no | So direction=out; https. |
events | array<string> | yes | |
channel_ids | array<string<uuid>> | no | Canais privados/DM autorizados (default vazio = so publicos). |
active | boolean | yes | |
secret_version | integer | yes | |
created_at | string<date-time> | yes | |
updated_at | string<date-time> | yes | |
secret_rotated_at | string<date-time> | no |
400
Corpo/parametro invalido (invalid, invalid_body, invalid_cursor...)
| Name | Type | Required | Description |
|---|---|---|---|
error | string | yes |
401
Sem credencial valida
| Name | Type | Required | Description |
|---|---|---|---|
error | string | yes |
403
Sem permissao (nao e owner/admin; token sem escopo; token de integracao em rota nao permitida)
| Name | Type | Required | Description |
|---|---|---|---|
error | string | yes |
404
Nao existe NESTE time (404 uniforme: nao vaza existencia entre times)
| Name | Type | Required | Description |
|---|---|---|---|
error | string | yes |
429
Limite de requisições excedido.
| Name | Type | Required | Description |
|---|---|---|---|
error | string | yes |
500
Erro interno. Tente de novo com backoff; reporte o X-Request-Id.
| Name | Type | Required | Description |
|---|---|---|---|
error | string | yes |
Examples
"Try it" is turned off in this reference. Use the examples with your test credential.
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())