> For the complete documentation index, see [llms.txt](https://docs.skyone.cloud/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.skyone.cloud/skyone-studio/integracoes/fluxos/gatilhos/gatilhos-api-gateway-adicao-e-configuracao.md). Agents can also search and read this documentation through its [MCP server](https://docs.skyone.cloud/~gitbook/mcp).

# Gatilhos API Gateway: Adição e Configuração

Este gatilho, diferentemente dos demais, executa o fluxo em conjunto com um API Gateway configurado dentro do **Skyone Studio.**

A seguir, saiba adicionar e configurar um Gatilho API Gateway:

* [Adicionar Gatilho API Gateway](#adicionar-gatilho-api-gateway)
  * [Configurações](#configuracoes)

### Adicionar Gatilho API Gateway <a href="#adicionar-gatilho-api-gateway" id="adicionar-gatilho-api-gateway"></a>

Para adicionar um gatilho API Gateway, siga os seguintes passos:

1. Clique em "**Comece com um gatilho"**.
2. Clique no sinal de mais da opção **API Gateway.** Em seguida, abrirá o modal para configurá-lo e visualizar mais informações.&#x20;
3. Este modal é dividido em duas áreas: **Cabeçalho** e **Configurações**.

<figure><img src="https://2406186417-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FlGHvosl2xodpQaXzCzxY%2Fuploads%2FUN2R6ghb2ycFjYMbXABf%2Fgatilho-apigateway2.gif?alt=media&amp;token=51c3c8a7-606f-476c-a489-a6654aad6737" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
[Saiba sobre o Cabeçalho do Módulo aqui](https://docs.skyone.cloud/skyone-studio/integracoes/cabecalho-dos-modulos.md).&#x20;
{% endhint %}

#### Configurações <a href="#configuracoes" id="configuracoes"></a>

Selecione os campos **API Gateway, Versão e Rota** previamente cadastrados.

{% hint style="warning" %}
Não é possível utilizar a mesma rota em mais de um Gatilho API Gateway.
{% endhint %}

Além disso, a tela de configurações possui mais os seguintes itens:

* **URL do gatilho:** Após selecionar as configurações anteriores, a URL do gatilho será exibida.
* **URL token OAuth2:** Este campo é exibido para tipos OAuth2 e permite gerar o token OAuth2. Para isso, faça uma requisição POST para a URL exibida, utilizando o exemplo de requisição fornecido. [Leia mais aqui](https://docs.skyone.cloud/skyone-studio/api-gateway.md#oauth2).&#x20;
* **Usar JSON Schema na requisição (opcional):** Permite enviar um JSON Schema para validação do API Gateway.&#x20;
* **Especificação da requisição:** Os campos Body e Query são opcionais.

{% hint style="info" %}
Os dados do BODY e da QUERY informados aqui aparecerão, respectivamente, como os parâmetros **body** e **query** do Gatilho API Gateway na configuração dos módulos subsequentes.
{% endhint %}

Para finalizar as configurações do gatilho, clique em "**Salvar**".&#x20;

Leia também:&#x20;

* [Editar gatilhos](https://docs.skyone.cloud/skyone-studio/integracoes/edicao-de-gatilhos-e-modulos-no-fluxo.md)
* [Caso de uso: parâmetros de gatilho API Gateway](https://docs.skyone.cloud/skyone-studio/how-to/caso-de-uso-parametros-de-gatilho-api-gateway.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.skyone.cloud/skyone-studio/integracoes/fluxos/gatilhos/gatilhos-api-gateway-adicao-e-configuracao.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
