> ## Documentation Index
> Fetch the complete documentation index at: https://docs.zipdin.com.br/llms.txt
> Use this file to discover all available pages before exploring further.

# Quick Start

> Faça sua primeira chamada à API Zipdin em menos de 5 minutos

# Quick Start

Siga os passos abaixo para configurar o acesso e realizar sua primeira chamada à API.

## Pré-requisitos

<Steps>
  <Step title="Credenciais de Acesso">
    Solicite suas credenciais (`client_id` e `client_secret`) ao time de integrações da Zipdin.

    <Note>
      Cada parceiro recebe credenciais separadas para **homologação** e **produção**.
    </Note>
  </Step>

  <Step title="Obter Token de Acesso">
    Autentique-se via OAuth2 para obter um Bearer token:

    <CodeGroup>
      ```bash cURL theme={null}
      curl -X POST https://api.zipdin.com.br/oauth/token \
        -H "Content-Type: application/x-www-form-urlencoded" \
        -d "grant_type=client_credentials" \
        -d "client_id=SEU_CLIENT_ID" \
        -d "client_secret=SEU_CLIENT_SECRET" \
        -d "scope=api"
      ```

      ```python Python theme={null}
      import requests

      response = requests.post(
          "https://api.zipdin.com.br/oauth/token",
          data={
              "grant_type": "client_credentials",
              "client_id": "SEU_CLIENT_ID",
              "client_secret": "SEU_CLIENT_SECRET",
              "scope": "api"
          }
      )
      token = response.json()["access_token"]
      ```

      ```javascript JavaScript theme={null}
      const response = await fetch("https://api.zipdin.com.br/oauth/token", {
        method: "POST",
        headers: { "Content-Type": "application/x-www-form-urlencoded" },
        body: new URLSearchParams({
          grant_type: "client_credentials",
          client_id: "SEU_CLIENT_ID",
          client_secret: "SEU_CLIENT_SECRET",
          scope: "api"
        })
      });
      const { access_token } = await response.json();
      ```
    </CodeGroup>

    **Resposta:**

    ```json theme={null}
    {
      "access_token": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...",
      "token_type": "Bearer",
      "expires_in": 3600,
      "scope": "api"
    }
    ```
  </Step>

  <Step title="Fazer sua Primeira Chamada">
    Use o token para consultar um endpoint. Exemplo: listar propostas de um CPF.

    <CodeGroup>
      ```bash cURL theme={null}
      curl -X GET "https://api.zipdin.com.br/api/v1/propostas?nu_cpf=12345678901" \
        -H "Authorization: Bearer SEU_ACCESS_TOKEN" \
        -H "Content-Type: application/json"
      ```

      ```python Python theme={null}
      import requests

      response = requests.get(
          "https://api.zipdin.com.br/api/v1/propostas",
          params={"nu_cpf": "12345678901"},
          headers={"Authorization": f"Bearer {token}"}
      )
      propostas = response.json()
      ```

      ```javascript JavaScript theme={null}
      const response = await fetch(
        "https://api.zipdin.com.br/api/v1/propostas?nu_cpf=12345678901",
        { headers: { "Authorization": `Bearer ${access_token}` } }
      );
      const propostas = await response.json();
      ```
    </CodeGroup>
  </Step>
</Steps>

## Próximos Passos

<CardGroup cols={3}>
  <Card title="Autenticação" icon="key" href="/authentication">
    Detalhes completos do fluxo OAuth2 + PKCE
  </Card>

  <Card title="Webhooks" icon="bell" href="/guides/webhooks">
    Configurar notificações de eventos
  </Card>

  <Card title="API E-Consignado" icon="file-invoice-dollar" href="/docs/e-consignado/overview">
    Explorar endpoints de consignado
  </Card>
</CardGroup>
