# Zambox Messaging API

Version: 0.4.4

High-speed messaging and notification engine for Zambia. Unified API for SMS, WhatsApp, Transactional Email, Prepaid Mobile Money Wallet, and Sender IDs.

## Servers
- https://zambox.zambrite.com – Default environment

## GET `/api/billing/v1/wallet`

Get wallet balance

**Tags:** Prepaid Wallet & Billing

### Responses

**200** – Wallet balance

Content-Type: `application/json`

```json
{
  "organizationId": "00000000-0000-4000-8000-000000000000",
  "currency": "string",
  "balance": 1,
  "frozenAmount": 1,
  "available": 1,
  "lowBalanceThreshold": 1,
  "low": true,
  "enforceBalance": true,
  "updatedAt": "string",
  "unitPrices": null
}
```

**401** – Unauthorized

Content-Type: `application/json`

```json
{
  "error": "string"
}
```

**429** – Rate limit exceeded

Content-Type: `application/json`

```json
{
  "error": "string"
}
```

### Example

```bash
curl -X GET "https://zambox.zambrite.com/api/billing/v1/wallet" \
  -H "Accept: application/json"
```

## POST `/api/billing/v1/wallet/funding`

Start a wallet top-up

**Tags:** Prepaid Wallet & Billing

### Request Body

Content-Type: `application/json`

```json
{
  "method": "mobile_money",
  "amount": 1,
  "idempotencyKey": "00000000-0000-4000-8000-000000000000",
  "accountNumber": "string"
}
```

### Responses

**201** – Payment started

Content-Type: `application/json`

```json
{
  "reference": "string",
  "status": "string",
  "amount": 1,
  "currency": "string",
  "cardRedirectionUrl": null
}
```

**400** – Validation error

Content-Type: `application/json`

```json
{
  "error": "string"
}
```

**401** – Unauthorized

Content-Type: `application/json`

```json
{
  "error": "string"
}
```

**429** – Rate limit exceeded

Content-Type: `application/json`

```json
{
  "error": "string"
}
```

**503** – Funding provider unavailable

Content-Type: `application/json`

```json
{
  "error": "string"
}
```

### Example

```bash
curl -X POST "https://zambox.zambrite.com/api/billing/v1/wallet/funding" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d "{
  \"method\": \"mobile_money\",
  \"amount\": 1,
  \"idempotencyKey\": \"00000000-0000-4000-8000-000000000000\",
  \"accountNumber\": \"string\"
}"
```

## GET `/api/billing/v1/wallet/funding/{reference}`

Get top-up status

**Tags:** Prepaid Wallet & Billing

### Parameters
| Name | Location | Type | Description |
| --- | --- | --- | --- |
| reference | path | any | Required |

### Responses

**200** – Payment status

Content-Type: `application/json`

```json
{
  "reference": "string",
  "status": "string",
  "amount": 1,
  "currency": "string",
  "gatewayMessage": null,
  "settledAt": null
}
```

**401** – Unauthorized

Content-Type: `application/json`

```json
{
  "error": "string"
}
```

**404** – Not found

Content-Type: `application/json`

```json
{
  "error": "string"
}
```

**429** – Rate limit exceeded

Content-Type: `application/json`

```json
{
  "error": "string"
}
```

### Example

```bash
curl -X GET "https://zambox.zambrite.com/api/billing/v1/wallet/funding/:reference" \
  -H "Accept: application/json"
```

## GET `/api/messaging/v1/batches/{id}`

Get batch status — all messages in a bulk send batch

**Tags:** Delivery & Lifecycle

### Parameters
| Name | Location | Type | Description |
| --- | --- | --- | --- |
| id | path | any | Required |

### Responses

**200** – Batch status

Content-Type: `application/json`

```json
{
  "batchId": "00000000-0000-4000-8000-000000000000",
  "count": 1,
  "messages": [
    {
      "id": "00000000-0000-4000-8000-000000000000",
      "channel": "string",
      "to": "string",
      "status": "string",
      "externalId": null,
      "errorCode": null,
      "errorMessage": null,
      "sentAt": null,
      "failedAt": null,
      "createdAt": "string",
      "updatedAt": "string"
    }
  ]
}
```

**400** – Bad request

Content-Type: `application/json`

```json
{
  "error": "string"
}
```

**401** – Unauthorized

Content-Type: `application/json`

```json
{
  "error": "string"
}
```

**404** – Batch not found

Content-Type: `application/json`

```json
{
  "error": "string"
}
```

**429** – Rate limit exceeded

Content-Type: `application/json`

```json
{
  "error": "string"
}
```

### Example

```bash
curl -X GET "https://zambox.zambrite.com/api/messaging/v1/batches/:id" \
  -H "Accept: application/json"
```

## POST `/api/messaging/v1/email/send`

Send single email

**Tags:** Transactional Email

### Request Body

Content-Type: `application/json`

```json
{
  "to": "user@example.com",
  "subject": "string",
  "body": "string",
  "htmlBody": null,
  "from": null,
  "replyTo": null,
  "metadata": null,
  "webhook": null
}
```

### Responses

**201** – Queued

Content-Type: `application/json`

```json
{
  "id": "00000000-0000-4000-8000-000000000000",
  "status": "queued",
  "channel": "email"
}
```

**400** – Validation error

Content-Type: `application/json`

```json
{
  "error": "string"
}
```

**401** – Unauthorized

Content-Type: `application/json`

```json
{
  "error": "string"
}
```

**429** – Rate limit exceeded

Content-Type: `application/json`

```json
{
  "error": "string"
}
```

### Example

```bash
curl -X POST "https://zambox.zambrite.com/api/messaging/v1/email/send" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d "{
  \"to\": \"user@example.com\",
  \"subject\": \"string\",
  \"body\": \"string\",
  \"htmlBody\": null,
  \"from\": null,
  \"replyTo\": null,
  \"metadata\": null,
  \"webhook\": null
}"
```

## POST `/api/messaging/v1/email/send-bulk`

Send bulk email

**Tags:** Transactional Email

### Request Body

Content-Type: `application/json`

```json
{
  "from": null,
  "subject": "string",
  "body": "string",
  "htmlBody": null,
  "to": [
    "user@example.com"
  ],
  "metadata": null,
  "webhook": null
}
```

### Responses

**201** – Bulk queued

Content-Type: `application/json`

```json
{
  "batchId": "00000000-0000-4000-8000-000000000000",
  "count": 1,
  "messages": [
    {
      "id": "00000000-0000-4000-8000-000000000000",
      "to": "string",
      "status": "queued"
    }
  ]
}
```

**400** – Validation error

Content-Type: `application/json`

```json
{
  "error": "string"
}
```

**401** – Unauthorized

Content-Type: `application/json`

```json
{
  "error": "string"
}
```

**429** – Rate limit or backpressure limit reached

Content-Type: `application/json`

```json
{
  "error": "string"
}
```

### Example

```bash
curl -X POST "https://zambox.zambrite.com/api/messaging/v1/email/send-bulk" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d "{
  \"from\": null,
  \"subject\": \"string\",
  \"body\": \"string\",
  \"htmlBody\": null,
  \"to\": [
    \"user@example.com\"
  ],
  \"metadata\": null,
  \"webhook\": null
}"
```

## GET `/api/messaging/v1/messages/{id}`

Get message status

**Tags:** Delivery & Lifecycle

### Parameters
| Name | Location | Type | Description |
| --- | --- | --- | --- |
| id | path | any | Required |

### Responses

**200** – Message status

Content-Type: `application/json`

```json
{
  "id": "00000000-0000-4000-8000-000000000000",
  "channel": "string",
  "to": "string",
  "status": "string",
  "externalId": null,
  "errorCode": null,
  "errorMessage": null,
  "sentAt": null,
  "failedAt": null,
  "createdAt": "string",
  "updatedAt": "string"
}
```

**400** – Bad request

Content-Type: `application/json`

```json
{
  "error": "string"
}
```

**401** – Unauthorized

Content-Type: `application/json`

```json
{
  "error": "string"
}
```

**404** – Not found

Content-Type: `application/json`

```json
{
  "error": "string"
}
```

**429** – Rate limit exceeded

Content-Type: `application/json`

```json
{
  "error": "string"
}
```

### Example

```bash
curl -X GET "https://zambox.zambrite.com/api/messaging/v1/messages/:id" \
  -H "Accept: application/json"
```

## GET `/api/messaging/v1/messages/{id}/delivery-logs`

Get message delivery logs

**Tags:** Delivery & Lifecycle

### Parameters
| Name | Location | Type | Description |
| --- | --- | --- | --- |
| id | path | any | Required |

### Responses

**200** – Delivery logs

Content-Type: `application/json`

```json
{
  "messageId": "00000000-0000-4000-8000-000000000000",
  "logs": [
    {
      "id": "00000000-0000-4000-8000-000000000000",
      "eventType": "string",
      "errorCode": null,
      "errorMessage": null,
      "createdAt": "string"
    }
  ]
}
```

**400** – Bad request

Content-Type: `application/json`

```json
{
  "error": "string"
}
```

**401** – Unauthorized

Content-Type: `application/json`

```json
{
  "error": "string"
}
```

**404** – Not found

Content-Type: `application/json`

```json
{
  "error": "string"
}
```

**429** – Rate limit exceeded

Content-Type: `application/json`

```json
{
  "error": "string"
}
```

### Example

```bash
curl -X GET "https://zambox.zambrite.com/api/messaging/v1/messages/:id/delivery-logs" \
  -H "Accept: application/json"
```

## GET `/api/messaging/v1/messages/{id}/webhook-deliveries`

Get message webhook delivery history

**Tags:** Delivery & Lifecycle

### Parameters
| Name | Location | Type | Description |
| --- | --- | --- | --- |
| id | path | any | Required |

### Responses

**200** – Webhook delivery attempts

Content-Type: `application/json`

```json
{
  "messageId": "00000000-0000-4000-8000-000000000000",
  "deliveries": [
    {
      "id": "00000000-0000-4000-8000-000000000000",
      "eventId": "string",
      "eventType": "string",
      "targetUrl": "string",
      "status": "string",
      "attemptCount": 1,
      "maxAttempts": 1,
      "nextRetryAt": null,
      "lastAttemptAt": null,
      "deliveredAt": null,
      "failedAt": null,
      "lastHttpStatus": null,
      "lastError": null,
      "responseBody": null,
      "createdAt": "string",
      "updatedAt": "string"
    }
  ]
}
```

**400** – Bad request

Content-Type: `application/json`

```json
{
  "error": "string"
}
```

**401** – Unauthorized

Content-Type: `application/json`

```json
{
  "error": "string"
}
```

**404** – Not found

Content-Type: `application/json`

```json
{
  "error": "string"
}
```

**429** – Rate limit exceeded

Content-Type: `application/json`

```json
{
  "error": "string"
}
```

### Example

```bash
curl -X GET "https://zambox.zambrite.com/api/messaging/v1/messages/:id/webhook-deliveries" \
  -H "Accept: application/json"
```

## POST `/api/messaging/v1/sms/send`

Send single SMS

**Tags:** SMS Messaging

### Request Body

Content-Type: `application/json`

No example available for this content type.

### Responses

**201** – Queued

Content-Type: `application/json`

```json
{
  "id": "00000000-0000-4000-8000-000000000000",
  "status": "queued",
  "channel": "sms"
}
```

**400** – Validation error

Content-Type: `application/json`

```json
{
  "error": "string"
}
```

**401** – Unauthorized

Content-Type: `application/json`

```json
{
  "error": "string"
}
```

**409** – Idempotency-Key reused with a different body (idempotency_conflict) or still in progress

Content-Type: `application/json`

```json
{
  "error": "string",
  "code": "string"
}
```

**422** – Blocked by a send guard (sms_unrendered_placeholder) when the guard is in block mode

Content-Type: `application/json`

```json
{
  "error": "string",
  "code": "string"
}
```

**429** – Rate limit exceeded

Content-Type: `application/json`

```json
{
  "error": "string"
}
```

### Example

```bash
curl -X POST "https://zambox.zambrite.com/api/messaging/v1/sms/send" \
  -H "Accept: application/json"
```

## POST `/api/messaging/v1/sms/send-bulk`

Send bulk SMS

**Tags:** SMS Messaging

### Request Body

Content-Type: `application/json`

No example available for this content type.

### Responses

**201** – Bulk queued

Content-Type: `application/json`

```json
{
  "batchId": "00000000-0000-4000-8000-000000000000",
  "count": 1,
  "messages": [
    {
      "id": "00000000-0000-4000-8000-000000000000",
      "to": "string",
      "status": "queued"
    }
  ]
}
```

**400** – Validation error

Content-Type: `application/json`

```json
{
  "error": "string"
}
```

**401** – Unauthorized

Content-Type: `application/json`

```json
{
  "error": "string"
}
```

**429** – Rate limit or backpressure limit reached

Content-Type: `application/json`

```json
{
  "error": "string"
}
```

### Example

```bash
curl -X POST "https://zambox.zambrite.com/api/messaging/v1/sms/send-bulk" \
  -H "Accept: application/json"
```

## POST `/api/messaging/v1/whatsapp/send`

Send single WhatsApp message

Send a WhatsApp message through the platform Mesa number by default. Configure your own mesa.zambrite.com API key and connected session in Dashboard → Email & WhatsApp to send from your own number. Mesa currently supports text messages; richer message types require your own supported provider. All channels debit the same organization wallet. The `message.type` field determines the message shape: `text`, `template`, `image`, `document`, `audio`, `video`, `sticker`, `location`, `reaction`, or `interactive`.

**Tags:** WhatsApp Messaging

### Request Body

Content-Type: `application/json`

```json
{
  "to": "string",
  "message": {
    "type": "text",
    "text": {
      "body": "string"
    }
  },
  "category": null,
  "metadata": null,
  "webhook": null
}
```

### Responses

**201** – Message queued

Content-Type: `application/json`

```json
{
  "id": "00000000-0000-4000-8000-000000000000",
  "status": "queued",
  "channel": "whatsapp"
}
```

**400** – Validation error

Content-Type: `application/json`

```json
{
  "error": "string"
}
```

**401** – Unauthorized

Content-Type: `application/json`

```json
{
  "error": "string"
}
```

**429** – Rate limit exceeded

Content-Type: `application/json`

```json
{
  "error": "string"
}
```

### Example

```bash
curl -X POST "https://zambox.zambrite.com/api/messaging/v1/whatsapp/send" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d "{
  \"to\": \"string\",
  \"message\": {
    \"type\": \"text\",
    \"text\": {
      \"body\": \"string\"
    }
  },
  \"category\": null,
  \"metadata\": null,
  \"webhook\": null
}"
```

## POST `/api/messaging/v1/whatsapp/send-bulk`

Send bulk WhatsApp messages

Send the same WhatsApp message to multiple recipients in one call through the platform Mesa number by default. Add your own Mesa API key and connected session in Dashboard → Email & WhatsApp to use your own number. Mesa supports text; richer types require your own supported provider. All channels debit the same organization wallet. Supports message types: text, template, image, document, audio, video, sticker, location. Types `reaction` and `interactive` are per-recipient and cannot be used in bulk sends.

**Tags:** WhatsApp Messaging

### Request Body

Content-Type: `application/json`

```json
{
  "message": {
    "type": "text",
    "text": {
      "body": "string"
    }
  },
  "category": null,
  "to": [
    "string"
  ],
  "metadata": null,
  "webhook": null
}
```

### Responses

**201** – Bulk queued

Content-Type: `application/json`

```json
{
  "batchId": "00000000-0000-4000-8000-000000000000",
  "count": 1,
  "messages": [
    {
      "id": "00000000-0000-4000-8000-000000000000",
      "to": "string",
      "status": "queued"
    }
  ]
}
```

**400** – Validation error

Content-Type: `application/json`

```json
{
  "error": "string"
}
```

**401** – Unauthorized

Content-Type: `application/json`

```json
{
  "error": "string"
}
```

**429** – Rate limit or backpressure limit reached

Content-Type: `application/json`

```json
{
  "error": "string"
}
```

### Example

```bash
curl -X POST "https://zambox.zambrite.com/api/messaging/v1/whatsapp/send-bulk" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d "{
  \"message\": {
    \"type\": \"text\",
    \"text\": {
      \"body\": \"string\"
    }
  },
  \"category\": null,
  \"to\": [
    \"string\"
  ],
  \"metadata\": null,
  \"webhook\": null
}"
```

## GET `/api/providers/email-domain`

Get your platform email domain and DNS records

Requires features: providers.view

**Tags:** Transactional Email

**Requires authentication.**

**Features:** providers.view

### Responses

**200** – Domain verification state

Content-Type: `application/json`

```json
{
  "domain": null,
  "sender": null,
  "status": "string",
  "records": [
    {}
  ]
}
```

### Example

```bash
curl -X GET "https://zambox.zambrite.com/api/providers/email-domain" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
```

## POST `/api/providers/email-domain`

Authorize and verify your email domain for platform sending

Register your domain, publish the returned DNS records, then verify. Until Resend confirms verification, email uses the platform sender.

Requires features: providers.manage

**Tags:** Transactional Email

**Requires authentication.**

**Features:** providers.manage

### Request Body

Content-Type: `application/json`

```json
{
  "action": "register",
  "domain": "string",
  "sender": "user@example.com"
}
```

### Responses

**200** – Domain verification state

Content-Type: `application/json`

```json
{
  "domain": null,
  "sender": null,
  "status": "string",
  "records": [
    {}
  ]
}
```

### Example

```bash
curl -X POST "https://zambox.zambrite.com/api/providers/email-domain" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d "{
  \"action\": \"register\",
  \"domain\": \"string\",
  \"sender\": \"user@example.com\"
}"
```

## GET `/api/providers/sender-ids`

List SMS sender IDs for the organization

Requires features: providers.sender_ids.view

**Tags:** Sender ID Management

**Requires authentication.**

**Features:** providers.sender_ids.view

### Parameters
| Name | Location | Type | Description |
| --- | --- | --- | --- |
| status | query | any | Optional |
| organizationId | query | any | Optional |
| allTenants | query | any | Optional |
| page | query | any | Optional |
| pageSize | query | any | Optional |

### Responses

**200** – Sender IDs

Content-Type: `application/json`

```json
{
  "items": [
    {
      "id": "00000000-0000-4000-8000-000000000000",
      "tenantId": "00000000-0000-4000-8000-000000000000",
      "organizationId": "00000000-0000-4000-8000-000000000000",
      "senderId": "string",
      "status": "draft",
      "companyName": null,
      "purpose": null,
      "sampleMessages": null,
      "brandUrl": null,
      "contactDetails": null,
      "esignDocumentId": null,
      "esignSigningUrl": null,
      "signedAt": null,
      "activatedAt": null,
      "rejectionReason": null,
      "createdAt": "string",
      "updatedAt": "string"
    }
  ],
  "total": 1,
  "page": 1,
  "pageSize": 1,
  "totalPages": 1
}
```

**400** – Invalid request

Content-Type: `application/json`

```json
{
  "error": "string"
}
```

### Example

```bash
curl -X GET "https://zambox.zambrite.com/api/providers/sender-ids?allTenants=false&page=1&pageSize=20" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
```

## POST `/api/providers/sender-ids`

Request a new SMS sender ID

Requires features: providers.sender_ids.manage

**Tags:** Sender ID Management

**Requires authentication.**

**Features:** providers.sender_ids.manage

### Request Body

Content-Type: `application/json`

```json
{
  "senderId": "string",
  "companyName": "string",
  "purpose": "Transactional alerts, OTPs, and notifications",
  "sampleMessages": [],
  "brandUrl": null,
  "contactDetails": null
}
```

### Responses

**201** – Sender ID request created

Content-Type: `application/json`

```json
{
  "id": "00000000-0000-4000-8000-000000000000",
  "tenantId": "00000000-0000-4000-8000-000000000000",
  "organizationId": "00000000-0000-4000-8000-000000000000",
  "senderId": "string",
  "status": "draft",
  "companyName": null,
  "purpose": null,
  "sampleMessages": null,
  "brandUrl": null,
  "contactDetails": null,
  "esignDocumentId": null,
  "esignSigningUrl": null,
  "signedAt": null,
  "activatedAt": null,
  "rejectionReason": null,
  "createdAt": "string",
  "updatedAt": "string"
}
```

**400** – Validation failed

Content-Type: `application/json`

```json
{
  "error": "string"
}
```

**409** – Sender ID already in use

Content-Type: `application/json`

```json
{
  "error": "string"
}
```

**422** – Sender ID rejected as not a brand name, a test name or another organisation's brand

Content-Type: `application/json`

```json
{
  "error": "string"
}
```

### Example

```bash
curl -X POST "https://zambox.zambrite.com/api/providers/sender-ids" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d "{
  \"senderId\": \"string\",
  \"companyName\": \"string\",
  \"purpose\": \"Transactional alerts, OTPs, and notifications\",
  \"sampleMessages\": [],
  \"brandUrl\": null,
  \"contactDetails\": null
}"
```

## DELETE `/api/providers/sender-ids/{id}`

Withdraw a sender ID request

Requires features: providers.sender_ids.manage

**Tags:** Sender ID Management

**Requires authentication.**

**Features:** providers.sender_ids.manage

### Parameters
| Name | Location | Type | Description |
| --- | --- | --- | --- |
| id | path | any | Required |

### Responses

**200** – Withdrawn

Content-Type: `application/json`

```json
{
  "ok": true,
  "id": "00000000-0000-4000-8000-000000000000"
}
```

**404** – Not found

Content-Type: `application/json`

```json
{
  "error": "string"
}
```

### Example

```bash
curl -X DELETE "https://zambox.zambrite.com/api/providers/sender-ids/:id" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
```

## GET `/api/providers/sender-ids/{id}`

Get an SMS sender ID

Requires features: providers.sender_ids.view

**Tags:** Sender ID Management

**Requires authentication.**

**Features:** providers.sender_ids.view

### Parameters
| Name | Location | Type | Description |
| --- | --- | --- | --- |
| id | path | any | Required |

### Responses

**200** – Sender ID

Content-Type: `application/json`

```json
{
  "id": "00000000-0000-4000-8000-000000000000",
  "tenantId": "00000000-0000-4000-8000-000000000000",
  "organizationId": "00000000-0000-4000-8000-000000000000",
  "senderId": "string",
  "status": "draft",
  "companyName": null,
  "purpose": null,
  "sampleMessages": null,
  "brandUrl": null,
  "contactDetails": null,
  "esignDocumentId": null,
  "esignSigningUrl": null,
  "signedAt": null,
  "activatedAt": null,
  "rejectionReason": null,
  "createdAt": "string",
  "updatedAt": "string"
}
```

**404** – Not found

Content-Type: `application/json`

```json
{
  "error": "string"
}
```

### Example

```bash
curl -X GET "https://zambox.zambrite.com/api/providers/sender-ids/:id" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
```

## PATCH `/api/providers/sender-ids/{id}`

Approve, reject, or advance a sender ID (platform operators)

Requires features: providers.sender_ids.approve

**Tags:** Sender ID Management

**Requires authentication.**

**Features:** providers.sender_ids.approve

### Parameters
| Name | Location | Type | Description |
| --- | --- | --- | --- |
| id | path | any | Required |

### Request Body

Content-Type: `application/json`

```json
{
  "status": "active",
  "rejectionReason": null
}
```

### Responses

**200** – Updated sender ID

Content-Type: `application/json`

```json
{
  "id": "00000000-0000-4000-8000-000000000000",
  "tenantId": "00000000-0000-4000-8000-000000000000",
  "organizationId": "00000000-0000-4000-8000-000000000000",
  "senderId": "string",
  "status": "draft",
  "companyName": null,
  "purpose": null,
  "sampleMessages": null,
  "brandUrl": null,
  "contactDetails": null,
  "esignDocumentId": null,
  "esignSigningUrl": null,
  "signedAt": null,
  "activatedAt": null,
  "rejectionReason": null,
  "createdAt": "string",
  "updatedAt": "string"
}
```

**400** – Validation failed

Content-Type: `application/json`

```json
{
  "error": "string"
}
```

**404** – Not found

Content-Type: `application/json`

```json
{
  "error": "string"
}
```

### Example

```bash
curl -X PATCH "https://zambox.zambrite.com/api/providers/sender-ids/:id" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d "{
  \"status\": \"active\",
  \"rejectionReason\": null
}"
```

## PUT `/api/providers/sender-ids/{id}`

Update a draft sender ID request

Requires features: providers.sender_ids.manage

**Tags:** Sender ID Management

**Requires authentication.**

**Features:** providers.sender_ids.manage

### Parameters
| Name | Location | Type | Description |
| --- | --- | --- | --- |
| id | path | any | Required |

### Request Body

Content-Type: `application/json`

```json
{
  "purpose": "Transactional alerts, OTPs, and notifications",
  "sampleMessages": [],
  "brandUrl": null,
  "contactDetails": null
}
```

### Responses

**200** – Updated sender ID

Content-Type: `application/json`

```json
{
  "id": "00000000-0000-4000-8000-000000000000",
  "tenantId": "00000000-0000-4000-8000-000000000000",
  "organizationId": "00000000-0000-4000-8000-000000000000",
  "senderId": "string",
  "status": "draft",
  "companyName": null,
  "purpose": null,
  "sampleMessages": null,
  "brandUrl": null,
  "contactDetails": null,
  "esignDocumentId": null,
  "esignSigningUrl": null,
  "signedAt": null,
  "activatedAt": null,
  "rejectionReason": null,
  "createdAt": "string",
  "updatedAt": "string"
}
```

**400** – Validation failed

Content-Type: `application/json`

```json
{
  "error": "string"
}
```

**404** – Not found

Content-Type: `application/json`

```json
{
  "error": "string"
}
```

**409** – Not editable in current status

Content-Type: `application/json`

```json
{
  "error": "string"
}
```

### Example

```bash
curl -X PUT "https://zambox.zambrite.com/api/providers/sender-ids/:id" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d "{
  \"purpose\": \"Transactional alerts, OTPs, and notifications\",
  \"sampleMessages\": [],
  \"brandUrl\": null,
  \"contactDetails\": null
}"
```

## POST `/api/providers/sender-ids/{id}/resend`

Prepare a new declaration for an unsigned draft sender ID

Requires features: providers.sender_ids.manage

**Tags:** Sender ID Management

**Requires authentication.**

**Features:** providers.sender_ids.manage

### Parameters
| Name | Location | Type | Description |
| --- | --- | --- | --- |
| id | path | any | Required |

### Responses

**200** – Declaration prepared

Content-Type: `application/json`

```json
{
  "id": "00000000-0000-4000-8000-000000000000",
  "tenantId": "00000000-0000-4000-8000-000000000000",
  "organizationId": "00000000-0000-4000-8000-000000000000",
  "senderId": "string",
  "status": "draft",
  "companyName": null,
  "purpose": null,
  "sampleMessages": null,
  "brandUrl": null,
  "contactDetails": null,
  "esignDocumentId": null,
  "esignSigningUrl": null,
  "signedAt": null,
  "activatedAt": null,
  "rejectionReason": null,
  "createdAt": "string",
  "updatedAt": "string"
}
```

**400** – Invalid request

Content-Type: `application/json`

```json
{
  "error": "string"
}
```

**404** – Sender ID not found

Content-Type: `application/json`

```json
{
  "error": "string"
}
```

**409** – Sender ID is not an unsigned draft

Content-Type: `application/json`

```json
{
  "error": "string"
}
```

**502** – Declaration preparation failed

Content-Type: `application/json`

```json
{
  "error": "string"
}
```

**503** – Declaration service unavailable

Content-Type: `application/json`

```json
{
  "error": "string"
}
```

### Example

```bash
curl -X POST "https://zambox.zambrite.com/api/providers/sender-ids/:id/resend" \
  -H "Accept: application/json" \
  -H "authorization: Bearer <token>"
```