Você está integrando a API pública da Telepatia Synapse.
Endpoint: GET /v1/webhooks/{webhook_id}
Base URL: https://scribe-api.telepatia.ai
Auth: Authorization: Bearer ${SYNAPSE_API_KEY}
Requisição:
- webhook_id [path]: string (obrigatório)
Sucesso 200:
- id: string
- url: string
- name?: string
- events: array<WebhookEventName>
- event?: string
- isActive: boolean
- signingSecretPrefix?: string
- signingSecretVersion?: integer
- createdAt?: string
- updatedAt?: string
- deletedAt?: string
Erros (envelope: { error: { type, code, message, param? } }):
- 401: authentication_required
- 403: permission_denied, permission_denied_role
- 404: resource_not_found
- 503: service_unavailable
Gere código na linguagem do arquivo atual que:
1. Leia SYNAPSE_API_KEY do ambiente (não fixe o valor no código).
2. Chame o endpoint com requisição e resposta tipadas.
3. Mapeie o envelope de erros para exceções tipadas por código de status.
4. Adicione um teste de caminho feliz usando o token Bearer.