---
title: "Create Text Messaging Sender"
description: "How to call Create Text Messaging Sender (POST /api/text-messaging-senders) in the Klaviyo REST API: authentication, parameters, request and response bodies, and an example request."
url: "https://developers.klaviyo.com/en/reference/create_text_messaging_sender"
revision: "2026-10-15"
operationId: "create_text_messaging_sender"
method: "POST"
endpoint: "https://a.klaviyo.com/api/text-messaging-senders"
authentication: "privateKey"
scopes: ["sender-config:write"]
rateLimits: {"burst":"1/s","steady":"15/m"}
revisionHeader: {"name":"revision","required":true}
deprecated: false
openApi: "https://raw.githubusercontent.com/klaviyo/openapi/2026-10-15/openapi/stable/apis/create_text_messaging_sender.json"
jsonApi: {"include":["text-messaging-sender-registration"],"fields":{"text-messaging-sender-registration":["created_at","decided_at","failures","id","status","submitted_at","updated_at"],"text-messaging-sender":["created_at","forwarding_number","id","sender_details","sender_details.country","sender_identifier","sender_type","status"]}}
related: ["https://developers.klaviyo.com/en/reference/text-messaging/llms.txt","https://developers.klaviyo.com/en/reference/get_text_messaging_configuration.md","https://developers.klaviyo.com/en/reference/create_text_messaging_configuration.md","https://developers.klaviyo.com/en/reference/get_text_messaging_senders.md","https://developers.klaviyo.com/en/reference/get_text_messaging_sender.md","https://developers.klaviyo.com/en/reference/get_text_messaging_sender_registration.md","https://developers.klaviyo.com/en/reference/create_text_messaging_sender_registration.md","https://developers.klaviyo.com/en/reference/get_messaging_sender_registration_for_text_messaging_sender.md","https://developers.klaviyo.com/en/reference/get_messaging_sender_registration_id_for_text_messaging_sender.md"]
---

# Create Text Messaging Sender

> This is the Markdown version of https://developers.klaviyo.com/en/reference/create_text_messaging_sender

```http
POST https://a.klaviyo.com/api/text-messaging-senders
```

Create a sender and submit its initial registration.

A toll-free number is provisioned in all supported regions (US + CA), so the response is the sender for the requested country and the sibling-region sender also appears in list/retrieve.

- Revision header: `revision: 2026-10-15` (required)
- Scopes: `sender-config:write`
- Rate limits: Burst: `1/s`, Steady: `15/m`
- OpenAPI: [Download this endpoint's OpenAPI document](https://raw.githubusercontent.com/klaviyo/openapi/2026-10-15/openapi/stable/apis/create_text_messaging_sender.json)

## Example request

### curl

```bash
curl --request POST \
     --url 'https://a.klaviyo.com/api/text-messaging-senders' \
     --header 'Authorization: Klaviyo-API-Key your-private-api-key' \
     --header 'accept: application/vnd.api+json' \
     --header 'revision: 2026-10-15' \
     --header 'content-type: application/vnd.api+json' \
     --data '{
  "data": {
    "type": "text-messaging-sender",
    "attributes": {
      "sender_type": "alpha",
      "sender_details": {
        "country": "US"
      },
      "text-messaging-sender-registration": {
        "data": {
          "type": "text-messaging-sender-registration",
          "attributes": {
            "first_name": "Jane",
            "last_name": "Doe",
            "phone_number": "+15551234567",
            "email": "jane@example.com",
            "address": {
              "street_address_1": "125 Summer Street",
              "city": "Boston",
              "region": "MA",
              "postal_code": "02110",
              "country": "US",
              "street_address_2": "Suite 400"
            },
            "business_type": "GOVERNMENT",
            "business_name": "Acme Corp",
            "business_website": "https://acme.example.com",
            "business_registration_country": "US",
            "privacy_policy_url": "https://acme.example.com/privacy",
            "terms_of_service_url": "https://acme.example.com/terms"
          }
        }
      },
      "forwarding_number": "+15557654321"
    }
  }
}'
```

### CLI

```bash
klaviyo text-messaging create-text-messaging-sender \
  -d '{
  "data": {
    "type": "text-messaging-sender",
    "attributes": {
      "sender_type": "alpha",
      "sender_details": {
        "country": "US"
      },
      "text-messaging-sender-registration": {
        "data": {
          "type": "text-messaging-sender-registration",
          "attributes": {
            "first_name": "Jane",
            "last_name": "Doe",
            "phone_number": "+15551234567",
            "email": "jane@example.com",
            "address": {
              "street_address_1": "125 Summer Street",
              "city": "Boston",
              "region": "MA",
              "postal_code": "02110",
              "country": "US",
              "street_address_2": "Suite 400"
            },
            "business_type": "GOVERNMENT",
            "business_name": "Acme Corp",
            "business_website": "https://acme.example.com",
            "business_registration_country": "US",
            "privacy_policy_url": "https://acme.example.com/privacy",
            "terms_of_service_url": "https://acme.example.com/terms"
          }
        }
      },
      "forwarding_number": "+15557654321"
    }
  }
}'
```

Sign in first with `klaviyo auth login`. [Install the Klaviyo CLI](https://developers.klaviyo.com/en/docs/klaviyo_cli.md)

### Python

```python
from klaviyo_api import KlaviyoAPI

klaviyo = KlaviyoAPI("your-private-api-key")

response = klaviyo.Text_Messaging.create_text_messaging_sender(
    {
        "data": {
            "type": "text-messaging-sender",
            "attributes": {
                "sender_type": "alpha",
                "sender_details": {
                    "country": "US",
                },
                "text-messaging-sender-registration": {
                    "data": {
                        "type": "text-messaging-sender-registration",
                        "attributes": {
                            "first_name": "Jane",
                            "last_name": "Doe",
                            "phone_number": "+15551234567",
                            "email": "jane@example.com",
                            "address": {
                                "street_address_1": "125 Summer Street",
                                "city": "Boston",
                                "region": "MA",
                                "postal_code": "02110",
                                "country": "US",
                                "street_address_2": "Suite 400",
                            },
                            "business_type": "GOVERNMENT",
                            "business_name": "Acme Corp",
                            "business_website": "https://acme.example.com",
                            "business_registration_country": "US",
                            "privacy_policy_url": "https://acme.example.com/privacy",
                            "terms_of_service_url": "https://acme.example.com/terms",
                        },
                    },
                },
                "forwarding_number": "+15557654321",
            },
        },
    },
)
```

Install it with `pip install klaviyo-api`. [The Python SDK on GitHub](https://github.com/klaviyo/klaviyo-api-python)

### Node.js

```javascript
import { ApiKeySession, TextMessagingApi } from 'klaviyo-api'

const session = new ApiKeySession('your-private-api-key')
const textMessagingApi = new TextMessagingApi(session)

const response = await textMessagingApi.createTextMessagingSender(
  {
    data: {
      type: 'text-messaging-sender',
      attributes: {
        senderType: 'alpha',
        senderDetails: {
          country: 'US',
        },
        textMessagingSenderRegistration: {
          data: {
            type: 'text-messaging-sender-registration',
            attributes: {
              firstName: 'Jane',
              lastName: 'Doe',
              phoneNumber: '+15551234567',
              email: 'jane@example.com',
              address: {
                streetAddress1: '125 Summer Street',
                city: 'Boston',
                region: 'MA',
                postalCode: '02110',
                country: 'US',
                streetAddress2: 'Suite 400',
              },
              businessType: 'GOVERNMENT',
              businessName: 'Acme Corp',
              businessWebsite: 'https://acme.example.com',
              businessRegistrationCountry: 'US',
              privacyPolicyUrl: 'https://acme.example.com/privacy',
              termsOfServiceUrl: 'https://acme.example.com/terms',
            },
          },
        },
        forwardingNumber: '+15557654321',
      },
    },
  },
)
```

Install it with `npm install klaviyo-api`. [The Node.js SDK on GitHub](https://github.com/klaviyo/klaviyo-api-node)

### Ruby

```ruby
require 'klaviyo-api-sdk'

KlaviyoAPI.configure do |config|
  config.api_key['Klaviyo-API-Key'] = 'Klaviyo-API-Key your-private-api-key'
end

response = KlaviyoAPI::TextMessaging.create_text_messaging_sender(
  {
    data: {
      type: 'text-messaging-sender',
      attributes: {
        sender_type: 'alpha',
        sender_details: {
          country: 'US',
        },
        'text-messaging-sender-registration' => {
          data: {
            type: 'text-messaging-sender-registration',
            attributes: {
              first_name: 'Jane',
              last_name: 'Doe',
              phone_number: '+15551234567',
              email: 'jane@example.com',
              address: {
                street_address_1: '125 Summer Street',
                city: 'Boston',
                region: 'MA',
                postal_code: '02110',
                country: 'US',
                street_address_2: 'Suite 400',
              },
              business_type: 'GOVERNMENT',
              business_name: 'Acme Corp',
              business_website: 'https://acme.example.com',
              business_registration_country: 'US',
              privacy_policy_url: 'https://acme.example.com/privacy',
              terms_of_service_url: 'https://acme.example.com/terms',
            },
          },
        },
        forwarding_number: '+15557654321',
      },
    },
  },
)
```

Install it with `gem install klaviyo-api-sdk`. [The Ruby SDK on GitHub](https://github.com/klaviyo/klaviyo-api-ruby)

### PHP

```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');

use KlaviyoAPI\KlaviyoAPI;

$klaviyo = new KlaviyoAPI('your-private-api-key');

$response = $klaviyo->TextMessaging->createTextMessagingSender(
    [
        'data' => [
            'type' => 'text-messaging-sender',
            'attributes' => [
                'sender_type' => 'alpha',
                'sender_details' => [
                    'country' => 'US',
                ],
                'text-messaging-sender-registration' => [
                    'data' => [
                        'type' => 'text-messaging-sender-registration',
                        'attributes' => [
                            'first_name' => 'Jane',
                            'last_name' => 'Doe',
                            'phone_number' => '+15551234567',
                            'email' => 'jane@example.com',
                            'address' => [
                                'street_address_1' => '125 Summer Street',
                                'city' => 'Boston',
                                'region' => 'MA',
                                'postal_code' => '02110',
                                'country' => 'US',
                                'street_address_2' => 'Suite 400',
                            ],
                            'business_type' => 'GOVERNMENT',
                            'business_name' => 'Acme Corp',
                            'business_website' => 'https://acme.example.com',
                            'business_registration_country' => 'US',
                            'privacy_policy_url' => 'https://acme.example.com/privacy',
                            'terms_of_service_url' => 'https://acme.example.com/terms',
                        ],
                    ],
                ],
                'forwarding_number' => '+15557654321',
            ],
        ],
    ],
);
```

Install it with `composer require klaviyo/api`. [The PHP SDK on GitHub](https://github.com/klaviyo/klaviyo-api-php)

## Query parameters

- `fields[text-messaging-sender-registration]` (string[]): For more information please visit [API overview](https://developers.klaviyo.com/en/reference.md) Allowed values: `created_at`, `decided_at`, `failures`, `id`, `status`, `submitted_at`, `updated_at`
- `fields[text-messaging-sender]` (string[]): For more information please visit [API overview](https://developers.klaviyo.com/en/reference.md) Allowed values: `created_at`, `forwarding_number`, `id`, `sender_details`, `sender_details.country`, `sender_identifier`, `sender_type`, `status`
- `include` (string[]): For more information please visit [API overview](https://developers.klaviyo.com/en/reference.md) Allowed values: `text-messaging-sender-registration`

## Headers

- `revision` (string, required): API endpoint revision (format: YYYY-MM-DD[.suffix]) Default: `2026-10-15`

## Request body

Content type: `application/vnd.api+json` (required)

- `data` (object, required)
  - `type` (string, required): Allowed values: `text-messaging-sender`
  - `attributes` (object, required)
    - `sender_type` (string, required): The kind of sender to create. Must be `toll_free` in v1. Allowed values: `alpha`, `long_code`, `short_code`, `toll_free`, `vanity_short_code`
    - `sender_details` (object, required)
      - `country` (string, required): ISO 3166-1 alpha-2 country code for the sender. Supported values: `US` and `CA`. Allowed values: `CA`, `US` Example: `US`
    - `text-messaging-sender-registration` (object, required): Toll-free verification submitted with the new sender.
      - `data` (object, required): Fields nested this deep are in [the endpoint's OpenAPI document](https://raw.githubusercontent.com/klaviyo/openapi/2026-10-15/openapi/stable/apis/create_text_messaging_sender.json).
    - `forwarding_number` (string, nullable): E.164 phone number to forward inbound voice calls to. Optional. Example: `+15557654321`

### Example request body

```json
{
  "data": {
    "type": "text-messaging-sender",
    "attributes": {
      "sender_type": "alpha",
      "sender_details": {
        "country": "US"
      },
      "text-messaging-sender-registration": {
        "data": {
          "type": "text-messaging-sender-registration",
          "attributes": {
            "first_name": "Jane",
            "last_name": "Doe",
            "phone_number": "+15551234567",
            "email": "jane@example.com",
            "address": {
              "street_address_1": "125 Summer Street",
              "city": "Boston",
              "region": "MA",
              "postal_code": "02110",
              "country": "US",
              "street_address_2": "Suite 400"
            },
            "business_type": "GOVERNMENT",
            "business_name": "Acme Corp",
            "business_website": "https://acme.example.com",
            "business_registration_country": "US",
            "privacy_policy_url": "https://acme.example.com/privacy",
            "terms_of_service_url": "https://acme.example.com/terms"
          }
        }
      },
      "forwarding_number": "+15557654321"
    }
  }
}
```

## Responses

### 201: Success

Content type: `application/vnd.api+json`

- `data` (object, required)
  - `type` (string, required): Allowed values: `text-messaging-sender`
  - `id` (string, required): The unique identifier for this text-messaging sender. Example: `01HX2Z8RG7Y4PWFQK3V0M5N1B7`
  - `attributes` (object, required)
    - `sender_type` (string, required): The kind of sender (e.g. toll-free, short-code, long-code, alpha). Allowed values: `alpha`, `long_code`, `short_code`, `toll_free`, `vanity_short_code`
    - `sender_details` (object, required)
      - `country` (string, required): ISO 3166-1 alpha-2 country code the sender is provisioned in. Example: `US`
    - `status` (string, required): The lifecycle status of this sender. Allowed values: `active`, `pending_registration`, `registering`, `registration_failed`, `suspended`
    - `created_at` (string<date-time>, required): ISO8601 timestamp when the sender was created. Example: `2026-05-19T14:30:00Z`
    - `forwarding_number` (string, nullable): E.164 phone number inbound voice calls are forwarded to. Null when no forwarding is configured.
    - `sender_identifier` (string, nullable): The sender's outbound address — E.164 phone number for phone-number senders. Null while the sender is still pending registration. Example: `+18005551234`
  - `relationships` (object)
    - `text-messaging-sender-registration` (object)
      - `data` (object): Fields nested this deep are in [the endpoint's OpenAPI document](https://raw.githubusercontent.com/klaviyo/openapi/2026-10-15/openapi/stable/apis/create_text_messaging_sender.json).
      - `links` (object): Fields nested this deep are in [the endpoint's OpenAPI document](https://raw.githubusercontent.com/klaviyo/openapi/2026-10-15/openapi/stable/apis/create_text_messaging_sender.json).
  - `links` (object, required)
    - `self` (string<uri>, required)
- `included` (object[])
  - `type` (string, required): Allowed values: `text-messaging-sender-registration`
  - `id` (string, required): The unique identifier for this sender registration. Example: `01HX2Z8RG7Y4PWFQK3V0M5N1C8`
  - `attributes` (object, required)
    - `status` (string, required): The lifecycle status of this sender registration. Allowed values: `action_required`, `approved`, `in_review`, `rejected`
    - `failures` (object[], required): Failures recorded against this registration.
      - `detail` (string, required): Human-readable description of the failure.
    - `created_at` (string<date-time>, required): ISO8601 timestamp when the registration was created. Example: `2026-05-19T14:30:00Z`
    - `updated_at` (string<date-time>, required): ISO8601 timestamp when the registration was last updated. Example: `2026-05-19T14:30:00Z`
    - `submitted_at` (string<date-time>, nullable): ISO8601 timestamp when the registration was submitted. Null until the customer submits the registration. Example: `2022-11-08T00:00:00+00:00`
    - `decided_at` (string<date-time>, nullable): ISO8601 timestamp when the registration was approved or rejected. Null until the carrier returns a decision. Example: `2022-11-08T00:00:00+00:00`
  - `relationships` (object)
    - `text-messaging-sender` (object)
      - `data` (object): Fields nested this deep are in [the endpoint's OpenAPI document](https://raw.githubusercontent.com/klaviyo/openapi/2026-10-15/openapi/stable/apis/create_text_messaging_sender.json).
      - `links` (RelationshipLinks): Fields nested this deep are in [the endpoint's OpenAPI document](https://raw.githubusercontent.com/klaviyo/openapi/2026-10-15/openapi/stable/apis/create_text_messaging_sender.json).
  - `links` (ObjectLinks, required): Same fields as the first ObjectLinks above.
- `links` (ObjectLinks): Same fields as the first ObjectLinks above.
- `meta` (object): Response-level metadata
  - `agent_hints` (object): Optional hints emitted by the API for agent callers
    - `next_steps` (string[]): Suggested follow-up actions for agents to take after this response

#### Example response body

```json
{
  "data": {
    "type": "text-messaging-sender",
    "id": "01HX2Z8RG7Y4PWFQK3V0M5N1B7",
    "attributes": {
      "sender_type": "alpha",
      "sender_details": {
        "country": "US"
      },
      "status": "active",
      "created_at": "2026-05-19T14:30:00Z",
      "forwarding_number": "string",
      "sender_identifier": "+18005551234"
    },
    "relationships": {
      "text-messaging-sender-registration": {
        "data": {
          "type": "text-messaging-sender-registration",
          "id": "string"
        },
        "links": {
          "self": "https://www.example.com",
          "related": "https://www.example.com"
        }
      }
    },
    "links": {
      "self": "https://www.example.com"
    }
  },
  "included": [
    {
      "type": "text-messaging-sender-registration",
      "id": "01HX2Z8RG7Y4PWFQK3V0M5N1C8",
      "attributes": {
        "status": "action_required",
        "failures": [
          {
            "detail": "string"
          }
        ],
        "created_at": "2026-05-19T14:30:00Z",
        "updated_at": "2026-05-19T14:30:00Z",
        "submitted_at": "2022-11-08T00:00:00+00:00",
        "decided_at": "2022-11-08T00:00:00+00:00"
      },
      "relationships": {
        "text-messaging-sender": {
          "data": {
            "type": "text-messaging-sender",
            "id": "string"
          },
          "links": {
            "self": "https://www.example.com",
            "related": "https://www.example.com"
          }
        }
      },
      "links": {
        "self": "https://www.example.com"
      }
    }
  ],
  "links": {
    "self": "https://www.example.com"
  },
  "meta": {
    "agent_hints": {
      "next_steps": [
        "string"
      ]
    }
  }
}
```

### 4XX: Client Error

Content type: `application/vnd.api+json`

- `errors` (object[], required)
  - `id` (string, required)
  - `code` (string, required)
  - `title` (string, required)
  - `detail` (string, required)
  - `source` (object)
    - `pointer` (string)
    - `parameter` (string)

#### Example response body

```json
{
  "errors": [
    {
      "id": "string",
      "code": "string",
      "title": "string",
      "detail": "string",
      "source": {
        "pointer": "string",
        "parameter": "string"
      }
    }
  ]
}
```

### 5XX: Server Error

Content type: `application/vnd.api+json`

- `errors` (object[], required)
  - `id` (string, required)
  - `code` (string, required)
  - `title` (string, required)
  - `detail` (string, required)
  - `source` (object)
    - `pointer` (string)
    - `parameter` (string)

#### Example response body

```json
{
  "errors": [
    {
      "id": "string",
      "code": "string",
      "title": "string",
      "detail": "string",
      "source": {
        "pointer": "string",
        "parameter": "string"
      }
    }
  ]
}
```
