> For the complete documentation index, see [llms.txt](https://codemash.gitbook.io/codemash/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://codemash.gitbook.io/codemash/cloud/sms/integrations/providers/telnyx.md).

# Telnyx

Connect Telnyx to SMS — coming soon; Norbix cannot send through Telnyx yet.

Telnyx delivers SMS over its own private network, with messaging profiles and number management.

{% hint style="warning" %}
Cloud has no screen for this yet. On **Add New Integration** the Telnyx card shows **COMING SOON**, the note *Sending SMS through Telnyx is not supported yet.* and a turned-off **Connect** button, and Norbix refuses every send and every test through Telnyx (`CM-ERRORS-SMS-005`, *Sending SMS through Telnyx is not supported yet. Use Twilio or the Fake provider.*). To send SMS today, use [Twilio](/codemash/cloud/sms/integrations/providers/twilio.md), or [Fake SMS (Test Me)](/codemash/cloud/sms/integrations/providers/fake-sms.md) for practice. The settings below can already be saved with the SDK, the CLI or the API.
{% endhint %}

<figure><img src="https://712692422-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHy372bqsaex2cqS3ikhL%2Fuploads%2Fgit-blob-febcc844ee70bb953401848b42ea61f24f5fc849%2Ftelnyx-card-1.png?alt=media" alt="The Telnyx card on Select SMS Integration: COMING SOON badge, a grey Connect button and the note Sending SMS through Telnyx is not supported yet."><figcaption><p>The Telnyx card is not connectable yet.</p></figcaption></figure>

## Get your credentials

1. Sign in to the [Telnyx portal](https://portal.telnyx.com/).
2. Under **Messaging** create or open a messaging profile and copy its **Profile ID**.
3. Under **Numbers** assign a number to that profile (E.164 format), and under **Auth → API Keys** create an **API key**.

## Connect it in Cloud

**Where:** SMS → Integrations → **Add New Integration** → Telnyx — **Connect** is turned off for now.

The form exists in Cloud and opens only by its address, `/projects/<project>/sms/integrations/new/telnyx`; it starts with the note *Sending SMS through Telnyx is not supported yet.* An integration saved there (or from code) stays in the [integrations list](/codemash/cloud/sms/integrations.md) with **SENDING NOT SUPPORTED YET**, can be edited and deleted, and is not offered on campaigns, trigger actions or template tests.

| Field                | Required | What it does                                                                   | Example                                |
| -------------------- | -------- | ------------------------------------------------------------------------------ | -------------------------------------- |
| Messaging Profile ID | yes      | The Telnyx messaging profile used to send.                                     | `40000000-0000-0000-0000-000000000000` |
| Sender Phone Number  | yes      | The number the SMS comes from, in E.164 format; it must belong to the profile. | `+15551234567`                         |
| API Key              | yes      | Secret; encrypted on save and never shown again.                               | `KEYxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx`  |
| Integration Name     | yes      | The name in your integrations list.                                            | `Telnyx production`                    |

<figure><img src="https://712692422-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHy372bqsaex2cqS3ikhL%2Fuploads%2Fgit-blob-4e2d8ad7a1972f99a9070fa3ce7ca56802fef937%2Ftelnyx-form-1.png?alt=media" alt="New Telnyx Integration form with the note Sending SMS through Telnyx is not supported yet. and the empty fields"><figcaption><p>The Telnyx form, opened by its address.</p></figcaption></figure>

## Test and set as default

**Test integration** answers *Test failed* with `Sending SMS through Telnyx is not supported yet. Use Twilio or the Fake provider.`, and the integration is not offered as a sender, so setting it as default has no use yet. See [Test an integration](/codemash/cloud/sms/integrations/test.md) and [Set an integration as default](/codemash/cloud/sms/integrations/set-default.md) for the flow once Telnyx goes live.

## Common errors

| Message                                                                           | Cause                                    | Fix                                                                                                                                                 |
| --------------------------------------------------------------------------------- | ---------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- |
| Sending SMS through Telnyx is not supported yet. Use Twilio or the Fake provider. | Every send or test through Telnyx today. | Use [Twilio](/codemash/cloud/sms/integrations/providers/twilio.md) or [Fake SMS (Test Me)](/codemash/cloud/sms/integrations/providers/fake-sms.md). |
| Secret is not provided (`CM-ERRORS-SECRETS-001`)                                  | An update without the secret fields.     | Send every secret again on each save.                                                                                                               |
| Required                                                                          | An empty field on the form.              | Fill every field.                                                                                                                                   |

## Do it from code

```ts
const { id } = await norbix.hub.notifications.saveSmsIntegration({
  integration: {
    provider: 'Telnyx',
    integrationName: 'Telnyx production',
    isEnabled: true,
    messagingProfileId: '40000000-0000-0000-0000-000000000000',
    fromPhoneNumber: '+15551234567',
    apiKey: 'KEYxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
  } as any, // the TS type knows only the shared fields
});
```

```sh
norbix hub notifications sms integration save --integration '{"provider":"Telnyx","integrationName":"Telnyx production","isEnabled":true,"messagingProfileId":"40000000-0000-0000-0000-000000000000","fromPhoneNumber":"+15551234567","apiKey":"KEYxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"}'
```

The client setup is on the [SMS page](/codemash/cloud/sms.md#use-it-from-code). API: [Save Sms Integration](/codemash/api-reference/notifications/sms/save-sms-integration.md)
