---
title: "Create a messaging program"
description: "Create a program (name required). `POST /api/v1/sms/messaging-programs`"
url: https://www.unitpost.com/docs/sms/post-sms-messaging-programs
section: "SMS API reference"
updated: 2026-10-13
---
# Create a messaging program

`POST /api/v1/sms/messaging-programs`

Create a program (`name` required). Each field is checked by the carriers' rules (the dashboard's own): lengths, help and stop replies that are a sentence and not just a keyword, links to a real web address (no localhost, bare IP or other scheme). Pass an `Idempotency-Key` so a retry never makes a second one. Requires the `sms:manage` capability.

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `Idempotency-Key` | header | string | no | Any unique string (1–256 characters, e.g. a UUID). Retrying with the same key and the same body within 24 hours returns the first result instead of sending again; the same key with a different body is `409 invalid_idempotent_request`, and one still in flight is `409 concurrent_idempotent_requests`. |

## Request body

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `name` | string | yes | — |
| `description` | string \| null | no | — |
| `message_type` | enum | no | One of: `transactional`, `marketing`. |
| `canonical_purpose` | string \| null | no | — |
| `frequency_disclosure` | string \| null | no | — |
| `opt_in_type` | string \| null | no | — |
| `opt_in_workflow` | string \| null | no | — |
| `opt_in_confirmation` | string \| null | no | — |
| `help_message` | string \| null | no | — |
| `stop_message` | string \| null | no | — |
| `terms_url` | string \| null | no | — |
| `privacy_url` | string \| null | no | — |
| `monthly_volume` | string \| null | no | — |
| `sample_messages` | string[] | no | — |
| `embedded_links` | boolean | no | — |
| `embedded_link_sample` | string \| null | no | — |
| `embedded_phones` | boolean | no | — |
| `age_gated` | boolean | no | — |
| `provider_overrides` | object \| null | no | — |
| `recipe_id` | enum | no | The compliance recipe the program follows; its version is the recipe's current one. Left out, it's derived from `canonical_purpose`. One of: `ACCOUNT_NOTIFICATIONS`, `SECURITY_ALERTS`, `ONE_TIME_PASSCODES`, `ORDER_UPDATES`, `APPOINTMENT_REMINDERS`, `CUSTOMER_SUPPORT`, `MARKETING_PROMOTIONS`, `OTHER_CUSTOM`. |
| `consent_setup_id` | string \| null | no | A consent setup (`cset_…`) this workspace has. |

## Response fields (201)

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `name` | string | yes | — |
| `description` | string \| null | no | — |
| `message_type` | enum | yes | One of: `transactional`, `marketing`. |
| `canonical_purpose` | string \| null | no | — |
| `frequency_disclosure` | string \| null | no | — |
| `opt_in_type` | string \| null | no | — |
| `opt_in_workflow` | string \| null | no | — |
| `opt_in_confirmation` | string \| null | no | — |
| `help_message` | string \| null | no | — |
| `stop_message` | string \| null | no | — |
| `terms_url` | string \| null | no | — |
| `privacy_url` | string \| null | no | — |
| `monthly_volume` | string \| null | no | — |
| `sample_messages` | string[] | yes | — |
| `embedded_links` | boolean | yes | — |
| `embedded_link_sample` | string \| null | no | — |
| `embedded_phones` | boolean | yes | — |
| `age_gated` | boolean | yes | — |
| `provider_overrides` | object \| null | no | — |
| `recipe_id` | string \| null | yes | — |
| `consent_setup_id` | string \| null | no | A consent setup (`cset_…`) this workspace has. |
| `object` | string | yes | — |
| `id` | string | yes | — |
| `recipe_version` | integer \| null | yes | — |
| `revision` | integer | yes | Moves on a material change; registrations keep the revision they copied. |
| `readiness` | object | yes | Whether the program has what a registration needs; `missing` names the fields still to fill (the wizard's own check). |
| `archived_at` | string \| null | yes | — |
| `created_at` | string | yes | — |
| `updated_at` | string | yes | — |

## Responses

| Status | Description |
| --- | --- |
| 201 | The program. |
| 400 | The body isn't JSON, or the `Idempotency-Key` header is not 1–256 characters. |
| 401 | Missing or invalid API key. |
| 403 | Insufficient scope. |
| 404 | Not found, or SMS is not enabled for this workspace. |
| 409 | The `Idempotency-Key` is in use by a request still running, or with another body. |
| 422 | A field that breaks a carrier rule (named in `details`), a consent setup that isn't yours, or an unknown key. |

## Example request

```bash
curl -X POST 'https://www.unitpost.com/api/v1/sms/messaging-programs' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'User-Agent: my-app/1.0' \
  -H 'Content-Type: application/json' \
  -d '{ }'
```

## Example response (201)

```json
{
  "name": "Example",
  "description": "string",
  "message_type": "transactional",
  "canonical_purpose": "string",
  "frequency_disclosure": "string",
  "opt_in_type": "string",
  "opt_in_workflow": "string",
  "opt_in_confirmation": "string",
  "help_message": "string",
  "stop_message": "string",
  "terms_url": "https://example.com",
  "privacy_url": "https://example.com",
  "monthly_volume": "string",
  "sample_messages": [
    "string"
  ],
  "embedded_links": false,
  "embedded_link_sample": "string",
  "embedded_phones": false,
  "age_gated": false,
  "provider_overrides": {
    "toll_free": {
      "use_case_category": "string"
    },
    "ten_dlc": {
      "use_case": "string",
      "sub_use_cases": [
        "string"
      ]
    }
  },
  "recipe_id": "recipe_123",
  "consent_setup_id": "consent_setup_123",
  "object": "sms_messaging_program",
  "id": "id_123",
  "recipe_version": 0,
  "revision": 0,
  "readiness": {
    "ready": false,
    "missing": [
      "string"
    ]
  },
  "archived_at": "2026-01-01T00:00:00.000Z",
  "created_at": "2026-01-01T00:00:00.000Z",
  "updated_at": "2026-01-01T00:00:00.000Z"
}
```

## Links

- HTML reference (with Node.js, Python, Ruby, PHP, Laravel, Go, Java, Rust, .NET and CLI examples): https://www.unitpost.com/docs/sms/post-sms-messaging-programs
- OpenAPI 3.1 (full schemas): https://www.unitpost.com/api/v1/openapi.json
