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

# Getting Started

> Authentication, base URL, sender hash, and request headers

## 1. Base URL

Use the following sandbox host for testing:

```text theme={null}
https://testqa.cpaas.globeteleservices.com
```

Replace the sandbox host with your assigned production CPaaS+ host when moving to production.

## 2. Sender Hash

The sender hash identifies the registered WhatsApp sender. It forms part of the message API endpoint:

```text theme={null}
/api/whatsapp/{Sender Hash}/messages
```

Find the sender hash in the CPaaS+ Portal under **Numbers** in the WhatsApp channel.

Example:

```text theme={null}
25bd1f59-e3e8-4997-9d6f-8ff103ced889
```

Replace this example with the sender hash assigned to your account.

## 3. Authentication

All API requests require a Bearer token in the `Authorization` header.

```http theme={null}
Authorization: Bearer <token>
```

Generate the token from the **API** tab in the CPaaS+ Portal. Each token is associated with a specific WhatsApp sender account.

Store the token securely. It cannot be viewed again in the Portal after generation. Tokens can be generated or revoked from the same **API** tab.

## 4. Request Headers

Include the following headers in API requests:

```http theme={null}
Accept: application/json
Content-Type: application/json
Authorization: Bearer <token>
```

Use JSON for message request bodies. Media uploads use `multipart/form-data`.

## 5. Message Endpoint

Send WhatsApp messages using the following endpoint:

```http theme={null}
POST https://testqa.cpaas.globeteleservices.com/api/whatsapp/{Sender Hash}/messages
```

Replace `{Sender Hash}` with your registered sender's hash.

Specify the message type in the JSON request body. For example, text messages use `"type": "text"`, while image messages use `"type": "image"` and include an `image` object.

## 6. Recipient Number Format

Pass the recipient's WhatsApp number in international format without the leading `+` sign.

Example:

```json theme={null}
{
  "to": "919373084880"
}
```

Follow the field requirements for the relevant message type. Phone numbers included inside a contact-card object represent the contact details being shared, not the message recipient.

## 7. Media Messages

Image, audio, video, document, and sticker messages use a media ID to reference an uploaded file.

Upload the media first, then pass the returned ID in the appropriate message object, such as `image.id` or `audio.id`.

The media upload endpoint and full request schema are not specified here. Refer to the available media upload documentation for those details.

## 8. Integration Considerations

* Use the sandbox host for testing and your assigned production host for live traffic.
* Obtain the sender hash from the CPaaS+ Portal.
* Generate and securely store the Bearer token.
* Format recipient numbers without a leading `+` sign.
* Upload media before sending messages that reference a media ID.
* Check the 24-hour customer-service window described in [Integration Notes](/docs/integration-notes.md).


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