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

# Register a Sender ID

> Register a custom SMS sender ID and fetch the sender IDs registered on your app.

<div className="dj-endpoint">
  <span className={`dj-method dj-method-post`}>POST</span>
  <code>/api/v1/messaging/sender\_id</code>
</div>

Register a custom name to send SMS from (your Sender ID), and list the sender IDs registered on your app. This page covers two endpoints: register a sender ID and fetch your registered sender IDs.

## Headers

| Header          | Required | Description                                         |
| --------------- | -------- | --------------------------------------------------- |
| `Authorization` | Yes      | Your app's secret key, sent as-is — *not* `Bearer`. |
| `AppId`         | Yes      | The App ID from your dashboard.                     |
| `Content-Type`  | Yes      | `application/json`                                  |

## Body parameters

| Parameter   | Type   | Required | Description                                                           |
| ----------- | ------ | -------- | --------------------------------------------------------------------- |
| `sender_id` | string | Yes      | The custom sender name to register. Must be fewer than 11 characters. |

## Response

A `200` confirms the registration request under `entity.message`. The sender ID is *not* active until Dojah approves it — you’ll receive an email once it’s activated. See the panel on the right.

## Fetch registered Sender IDs

List the sender IDs registered on your app, each with its activation status and creation time. This endpoint takes no query parameters.

```http GET /api/v1/messaging/sender_ids theme={null}
curl "https://api.dojah.io/api/v1/messaging/sender_ids" \
  -H "Authorization: {{secret_key}}" \
  -H "AppId: {{app_id}}"
```

```json 200 — OK theme={null}
{
  "entity": [
    {
      "sender_id": "Dojah",
      "activated": true,
      "createdAt": "2020-10-30T09:54:17.145Z"
    }
  ]
}
```

## Errors

| Code  | Meaning                                                                                                             |
| ----- | ------------------------------------------------------------------------------------------------------------------- |
| `400` | Bad request — a required field is missing or malformed.                                                             |
| `401` | Unauthorized — check your `Authorization` key and `AppId`.                                                          |
| `402` | Payment required — your wallet balance is too low. [Fund your wallet](/api-reference/core-concepts/wallet-billing). |
| `422` | Unprocessable — e.g. an unregistered `sender_id` or invalid `channel`.                                              |
| `429` | Too many requests — slow your request rate and retry.                                                               |

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST "https://api.dojah.io/api/v1/messaging/sender_id" \
    -H "Authorization: {{secret_key}}" \
    -H "AppId: {{app_id}}" \
    -H "Content-Type: application/json" \
    -d '{ "sender_id": "MyBrand" }'
  ```

  ```js Node.js theme={null}
  const res = await fetch("https://api.dojah.io/api/v1/messaging/sender_id", {
    method: "POST",
    headers: {
      Authorization: process.env.DOJAH_SECRET_KEY,
      AppId: process.env.DOJAH_APP_ID,
      "Content-Type": "application/json",
    },
    body: JSON.stringify({
      sender_id: "MyBrand",
    }),
  });
  const data = await res.json();
  ```

  ```python Python theme={null}
  import os, requests

  res = requests.post(
      "https://api.dojah.io/api/v1/messaging/sender_id",
      headers={
          "Authorization": os.environ["DOJAH_SECRET_KEY"],
          "AppId": os.environ["DOJAH_APP_ID"],
      },
      json={ "sender_id": "MyBrand" },
  )
  data = res.json()
  ```

  ```php PHP theme={null}
  <?php
  $ch = curl_init("https://api.dojah.io/api/v1/messaging/sender_id");
  curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_POST => true,
    CURLOPT_HTTPHEADER => [
      "Authorization: " . getenv("DOJAH_SECRET_KEY"),
      "AppId: " . getenv("DOJAH_APP_ID"),
      "Content-Type: application/json",
    ],
    CURLOPT_POSTFIELDS => json_encode([
      "sender_id" => "MyBrand",
    ]),
  ]);
  $data = json_decode(curl_exec($ch), true);
  ```
</RequestExample>

<ResponseExample>
  ```json POST /api/v1/messaging/sender_id theme={null}
  {
    "entity": {
      "message": "Sender ID Request Successful, you will get an email once it's activated."
    }
  }
  ```
</ResponseExample>
