> ## 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.

# Quickstart

> Confirm your API key, pick a phone number, and send an approved WhatsApp template.

This path checks that the key works, then sends one approved template. Create the key first. The steps are in [Authentication](https://docs.greentick.ai/api/authentication.md).

**1. Confirm the key**

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

`success: true` means the key is active. The response includes the account timezone.

**2. Read the phone number**

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

Copy `ref` from the number you want to send on. That value is `phoneNumberRef` on later calls. You can omit it when the account has only one number.

**3. Pick an approved template**

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

Use the template `name` and `language`. Variables are named, and the names must match the template.

**4. Send the template**

```bash theme={null}
curl --request POST "https://api.greentick.ai/v1/messages" \
  --header "Authorization: Bearer gt_live_YOUR_API_KEY" \
  --header "Content-Type: application/json" \
  --data '{
    "to": "919876543210",
    "type": "template",
    "phoneNumberRef": "668f1a2b3c4d5e6f7a8b9c0a",
    "template": {
      "name": "order_update",
      "language": "en_US",
      "variables": {
        "customer_name": "Akshay",
        "order_id": "ord_123"
      }
    }
  }'
```

`to` is the customer's phone number with country code. A successful response includes `messageId`, the WhatsApp message id (`wamid`), and `conversationId`. The same conversation then shows in **Live Chat**.

A free-form text message only sends inside 24 hours of the customer's last message. Templates can start a conversation. Field-by-field options, including `scheduledAt`, are on [Send a WhatsApp message](https://docs.greentick.ai/api/messages/send-a-whatsapp-message.md) and in [Send messages](https://docs.greentick.ai/developers/send-messages.md).

> [!TIP]
>
> Some write calls accept an `Idempotency-Key` header. Send the same key when you retry that route. GreenTick replays the stored response instead of performing the write again.


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