---
title: "Gerar novo link da automação"
method: POST
path: "/v1/automations/{id}/hook/regenerate"
tags: ["Automações"]
---

# Gerar novo link da automação

`POST /v1/automations/{id}/hook/regenerate`

## Request

- Base URL: `https://api.ararahq.com`
- URL: `https://api.ararahq.com/v1/automations/{id}/hook/regenerate`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/ararahq/apis/ararahq-api/docs/v1/automations/:id/hook/regenerate/post.ts> (a function with typed inputs; its response is checked against the schema)

Troca o token do link próprio da automação. O link antigo para de
funcionar na hora. Só existe em automação com gatilho `webhook`
(`409 HOOK_UNAVAILABLE_FOR_TRIGGER` nas demais).
Permissão: `AUTOMATIONS_MANAGE`.

## Path parameters

- `id` string, uuid, required

## Response `200`

Link novo

- AutomationHook
  - `url` string, required: Link próprio da automação (`https://api.ararahq.com/hooks/a/ara_hook_...`).
  - `signatureEnabled` boolean, required
  - `hasSecret` boolean, required: Diz só se o segredo existe. O valor nunca volta em leitura.

## Other responses

- `401`: Chave inexistente, revogada, expirada, com prefixo errado (`ara_` sem `ara_live_`) ou vinda de IP fora da allowlist. O corpo é o JSON padrão do Spring, sem `error.code`.
- `403`: Dois casos, com corpos diferentes: - Autenticação: header `Authorization` ausente, Bearer que não começa com `ara_`, chave sem a permissão da rota ou rota que não aceita chave de API. Corpo no formato padrão do Spring, sem `error.code`. - Regra de negócio, no formato `{ "error": { ... } }`: `PLAN_FEATURE_LOCKED`, `PLAN_LIMIT_REACHED`, `ACCOUNT_NOT_ACTIVATED`, `NO_DEDICATED_NUMBER`, `ORGANIZATION_SUSPENDED`, `NUMBER_BLOCKED`, `FRAUD_SUSPECTED`, `RESOURCE_FORBIDDEN`, `VIEWER_READ_ONLY`.
- `404`: `AUTOMATION_NOT_FOUND`: automação inexistente ou de outra organização.
- `409`: `HOOK_UNAVAILABLE_FOR_TRIGGER`: só automação com gatilho `webhook` tem link próprio.
- `429`: `RATE_LIMIT_EXCEEDED`: limite geral da API (1.200 leituras ou 3.000 escritas por minuto, por usuário da chave).

## Changes

- **2026-10-12** `d576cd28afc0`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/ararahq/apis/ararahq-api/changes/v1/automations/:id/hook/regenerate/post.md)

---

[API](https://skmtc.dev/ararahq/apis/ararahq-api.md) - [All operations](https://skmtc.dev/ararahq/apis/ararahq-api/llms.txt) - [OpenAPI document](https://skmtc.dev/ararahq/apis/ararahq-api/revisions/d576cd28afc0?raw)
