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

# Errors

> Read GreenTick error codes, rate limits, and how list endpoints paginate.

Requests and responses are JSON. Send `Content-Type: application/json` on calls that include a body.

A successful call returns `success: true`. Most also include a `data` object. A failed call returns `success: false`, a `code`, and a `message`.

```json theme={null}
{
  "success": false,
  "code": "INVALID_TO",
  "message": "to (E.164 phone) is required"
}
```

## Status codes

| Status | Code | Meaning |
| - | - | - |
| 400 | | The body or query failed validation. Read `code` and `message` |
| 401 | `UNAUTHORIZED` | Missing Bearer token, or the key is invalid or revoked |
| 403 | `PLAN_EXPIRED` | The plan is expired, or the Developer API is not on the plan |
| 404 | | The resource does not exist on this account |
| 409 | `IDEMPOTENCY_IN_PROGRESS` | A write with this `Idempotency-Key` is still running. Retry with the same key |
| 429 | `RATE_LIMITED` | Write rate limit. Wait for the `Retry-After` header, then retry |

Phone numbers are digits with a country code, such as `919876543210`. GreenTick strips formatting before it calls WhatsApp. An invalid number returns `400` with code `INVALID_TO`. Template variables are named. They are not positional `{{1}}` placeholders.

## Pagination

List calls that paginate accept `limit` and return `nextCursor`. Pass that value as `cursor` to fetch the next page. `nextCursor` is null when there are no more results.

[List conversations](https://docs.greentick.ai/api/conversations/list-conversations.md) is one of these calls. A `search` query on that route filters the current result and turns cursor pagination off. Message history uses `before` and `after` instead of `cursor`. See [List messages in a conversation](https://docs.greentick.ai/api/conversations/list-messages-in-a-conversation.md).

## Retries

When a write documents an `Idempotency-Key` header, keep the key for that attempt. A repeat of the same route and key returns the stored response. Use a new key only when you intend a new write.


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