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

# Authentication

> Create a GreenTick API key and send it as a Bearer token.

Every route except `GET /health` and `GET /openapi.json` needs an API key for one WhatsApp Business account. The key starts with `gt_live_`.

## Create a key

Open **Developer** in the dashboard, choose the WhatsApp Business account, enter a **Key name**, and click **Create API key**. The secret is shown once. Store it in a secret manager. The dashboard keeps only a prefix after that.

If **Developer** says the section is in progress, key creation is turned off in that environment. Email [hello@greentick.ai](mailto:hello@greentick.ai) if you need it enabled.

## Send the key

```bash theme={null}
curl "https://api.greentick.ai/v1/api-key" \
  --header "Authorization: Bearer gt_live_YOUR_API_KEY"
```

A valid key returns `success: true`, the key name, and the account timezone. Use that timezone when you schedule a template without an offset in `scheduledAt`. The same check is [Check the API key](https://docs.greentick.ai/api/api-key/check-the-api-key.md).

The Bearer scheme is required. A bare `gt_live_…` value, or a Firebase login token, is rejected with `401` and code `UNAUTHORIZED`.

## Which number the key uses

A key is scoped to the WhatsApp Business account you selected when you created it. When that account has more than one phone number, pass `phoneNumberRef` from [List WhatsApp phone numbers](https://docs.greentick.ai/api/phone-numbers/list-whatsapp-phone-numbers.md) on send and list calls. If the account has a single number, GreenTick can use that number when the field is omitted.

## Replace a key

Revoke a key from **Developer** when it leaks or when someone with **Manage developer app** leaves the team. Revoked keys fail immediately. Create a new key to replace one. GreenTick cannot show the old secret again.

> [!WARNING]
>
> Do not put the API key in a frontend app, a public spreadsheet cell, or a client-side WhatsApp widget. Keep it on a server. Google Sheets stores the key in that spreadsheet's document properties for the add-on.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.