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

# Add and Verify Tenant Sender Numbers

> Create, OTP-verify, list, and remove Sinjapp Business tenant sender numbers, and understand pending, active, and rejected statuses.

A sender number is the Sinjapp account that appears as the sender for customer messages.

## Statuses

| Status                         | Meaning                                                                  |
| ------------------------------ | ------------------------------------------------------------------------ |
| `pending_verification`         | The number was created and is waiting for OTP confirmation               |
| `active`                       | The number is confirmed and can be used if the account is verified       |
| `pending_account_verification` | OTP is correct, but the Sinjapp account still needs account verification |
| `rejected`                     | The number cannot be used for sending                                    |

## Create A Sender Number

Requires `messages.send` scope.

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST "https://{tenant}.sinjapp.org/api/v1/sender-numbers" \
    -H "X-Api-Key: {tenant_api_key}" \
    -H "Accept: application/json" \
    -H "Content-Type: application/json" \
    -d '{
      "phone": "{sender_phone}",
      "display_name": "Support line"
    }'
  ```

  ```js JavaScript theme={null}
  const response = await fetch('https://{tenant}.sinjapp.org/api/v1/sender-numbers', {
    method: 'POST',
    headers: {
      'X-Api-Key': tenantApiKey,
      'Accept': 'application/json',
      'Content-Type': 'application/json',
    },
    body: JSON.stringify({
      phone: senderPhone,
      display_name: 'Support line',
    }),
  })

  const senderNumber = await response.json()
  ```

  ```php PHP theme={null}
  <?php

  $response = file_get_contents('https://{tenant}.sinjapp.org/api/v1/sender-numbers', false, stream_context_create([
      'http' => [
          'method' => 'POST',
          'header' => [
              'X-Api-Key: ' . $tenantApiKey,
              'Accept: application/json',
              'Content-Type: application/json',
          ],
          'content' => json_encode([
              'phone' => $senderPhone,
              'display_name' => 'Support line',
          ]),
          'timeout' => 30,
      ],
  ]));

  $senderNumber = json_decode($response, true);
  ```

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

  response = requests.post(
      "https://{tenant}.sinjapp.org/api/v1/sender-numbers",
      headers={
          "X-Api-Key": tenant_api_key,
          "Accept": "application/json",
          "Content-Type": "application/json",
      },
      json={
          "phone": sender_phone,
          "display_name": "Support line",
      },
      timeout=30,
  )

  sender_number = response.json()
  ```
</CodeGroup>

After creation, the sender number owner receives an OTP inside Sinjapp. The tenant customer enters the OTP in the tenant dashboard.

## List Sender Numbers

<CodeGroup>
  ```bash cURL theme={null}
  curl "https://{tenant}.sinjapp.org/api/v1/sender-numbers" \
    -H "X-Api-Key: {tenant_api_key}" \
    -H "Accept: application/json"
  ```

  ```js JavaScript theme={null}
  const response = await fetch('https://{tenant}.sinjapp.org/api/v1/sender-numbers', {
    headers: {
      'X-Api-Key': tenantApiKey,
      'Accept': 'application/json',
    },
  })

  const senderNumbers = await response.json()
  ```

  ```php PHP theme={null}
  <?php

  $response = file_get_contents('https://{tenant}.sinjapp.org/api/v1/sender-numbers', false, stream_context_create([
      'http' => [
          'method' => 'GET',
          'header' => [
              'X-Api-Key: ' . $tenantApiKey,
              'Accept: application/json',
          ],
          'timeout' => 30,
      ],
  ]));

  $senderNumbers = json_decode($response, true);
  ```

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

  response = requests.get(
      "https://{tenant}.sinjapp.org/api/v1/sender-numbers",
      headers={
          "X-Api-Key": tenant_api_key,
          "Accept": "application/json",
      },
      timeout=30,
  )

  sender_numbers = response.json()
  ```
</CodeGroup>
