> For the complete documentation index, see [llms.txt](https://docs.zenfinder.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.zenfinder.ai/getting-started/quick-start.md).

# Quick Start

### Send your first message

### 1. Get your API key

Generate a key in Business Manager, scoped to `zenfinder_business_messaging`. See Authentication.

### 2. Find your Phone Number ID

Every message is sent *from* a specific `phoneNumberId` tied to your ZBA. You'll find this in Business Manager under your account's registered numbers.

### 3. Send a text message

```bash
curl -X POST https://api.zenfinder.ai/business/v1.0/{phoneNumberId}/messages \
  -H "Authorization: Bearer zf_live_xxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "messaging_product": "zenfinder",
    "to": "2348012345678",
    "type": "text",
    "text": { "body": "Hi! Your order is on its way." }
  }'
```

### 4. Read the response

A successful send returns a `zmid`-prefixed message ID:

```bash
{
  "messaging_product": "zenfinder",
  "messages": [
    { "id": "zmid.HBgLMjM0ODAxMjM0NTY3..." }
  ]
}
```

Hold onto this ID — it's how you'll correlate delivery status and read receipts back to this specific message.

### 5. Try a template message

For anything outside the 24-hour free-form messaging window (e.g. marketing, or the first message to a new recipient), you'll need an approved **template**. See the Templates section of the API reference to create one — reviews are handled automatically and are typically fast.

### 6. Handle errors gracefully

Requests can fail for reasons like an unapproved template, a blocked recipient, or an expired messaging window. See Errors & Idempotency for the full error code table and how to safely retry.

### Common first-integration gotchas

* **`to` must be digits-only E.164** (no `+`, no spaces) — this becomes the recipient's `zen_id`.
* **`messaging_product`** — send `"zenfinder"` (or `"whatsapp"` if porting existing code); it's never echoed back as anything but `"zenfinder"`.
* **Idempotency-Key** — always set this header on sends from any code path that might retry, to avoid double-sending. See the next page.


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.zenfinder.ai/getting-started/quick-start.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
