Links
CRUD de links. Dashboard usa /links (JWT); integrações usam /api/v1/links (API Key + scopes links:read/write). Paginação page/pageSize. A Public API não expõe GET :id nem DELETE :id/permanent.
Tag no Swagger: Links · Auth: JWT (Dashboard) + API Key (Public) · 4 endpoints
GET/api/v1/links
Lista links do workspace da chave (paginado).
Response
{ data: Link[], total, page, pageSize, totalPages }Errors: 401 (chave inválida/ausente) · 403 (sem scope) · 400 VALIDATION_ERROR
POST/api/v1/links
Cria um link. Status real 201. Erros de validação retornam 400 (não 422).
Request body
| Campo | Tipo | Obrigatório | Regras |
|---|---|---|---|
| destinationUrl | string (url) | sim | URL válida. |
| slug | string | não | Min 1, max 20, regex ^[a-zA-Z0-9_-]+$. |
| redirectType | enum (12 valores) | não | Default ALL_301. |
| title | string | não | Max 255. |
| description | string | não | Max 5000. |
| isActive | boolean | não | — |
| expiresAt | string (date-time) | não | — |
| domainId | string (uuid) | não | — |
Response
Link criado (inclui shortUrl)Errors: 401 · 403 · 400 VALIDATION_ERROR · 409 CONFLICT · 409 QUOTA_EXCEEDED
PATCH/api/v1/links/:id
Atualiza parcialmente um link.
Response
Link atualizadoErrors: 401 · 403 · 404 · 400 VALIDATION_ERROR · 409 CONFLICT
DELETE/api/v1/links/:id
Soft delete. Status real 204. Sem versão permanent na Public API.
Response
204 No ContentErrors: 401 · 403 · 404