> For the complete documentation index, see [llms.txt](https://docs.giro.tech/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.giro.tech/desenvolvedores/api-gtscr/webhooks/criar-webhook.md).

# Criar Webhook

## Configurar Webhook da Organização

> Define a URL e o Segredo para onde a API deve enviar os callbacks (notificações de sucesso, erro ou assinatura de documentos). Apenas um webhook pode ser configurado por organização (sobrescreve o anterior).<br>

```json
{"openapi":"3.0.0","info":{"title":"API de Consultas GTSCR","version":"1.0.0"},"servers":[{"url":"https://api.staging.scr.gtbanker.com.br/api","description":"Servidor de Homologação"},{"url":"https://api.scr.gtbanker.com.br/api","description":"Servidor de Produção"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{}},"paths":{"/webhooks":{"post":{"tags":["Configuração Webhooks"],"summary":"Configurar Webhook da Organização","description":"Define a URL e o Segredo para onde a API deve enviar os callbacks (notificações de sucesso, erro ou assinatura de documentos). Apenas um webhook pode ser configurado por organização (sobrescreve o anterior).\n","operationId":"createOrUpdateWebhook","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["payloadUrl","secret"],"properties":{"payloadUrl":{"type":"string","format":"uri","description":"URL HTTPS onde a notificação será entregue (POST)."},"secret":{"type":"string","description":"Token ou chave secreta enviada no Header 'Authorization' da notificação para validar a origem."}}}}}},"responses":{"201":{"description":"Webhook configurado com sucesso."},"400":{"description":"URL inválida ou dados incompletos.","content":{"application/json":{"schema":{"type":"object","description":"Representa um erro ocorrido durante a consulta","properties":{"errorCode":{"type":"string","description":"Código do erro"},"description":{"type":"string","description":"Descrição detalhada do erro"}}}}}}}}}}}
```

<figure><img src="https://978140111-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FF6l1W0qI0y7eF7f0QRDC%2Fuploads%2Fgit-blob-f5d2064d02c970341ca52b2c083eb1f585bc436a%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

{% embed url="<https://giro.tech/central-de-atendimento/>" %}
