Telnyx 10dlc Rubyのロゴ

Telnyx 10dlc Ruby

組織
team-telnyx
telnyx-10dlc-ruby

10DLC brand and campaign registration for US A2P messaging compliance. Assign phone numbers to campaigns.

Add to TypingMind

概要

公開者team-telnyx
リポジトリai
スキル名telnyx-10dlc-ruby
スター
217
フォーク
21
同梱ファイル
1
ライセンスMIT
リンク
  • Markdown形式の指示

    モデルが必要に応じて読み込むSKILL.mdファイルです。関連するリクエストがあったときだけトークンを消費します。

  • どのLLMでも利用可能

    AIスキルはプロバイダー固有のコードではなく、通常のMarkdownなので、GPT、Claude、Gemini、Grok、ローカルモデルで利用できます。

  • 1個の同梱ファイル

    モデルが作業中に読み取れるスクリプト、テンプレート、参考資料です。ファイルは読み取り専用で、実行されることはありません。

  • オープンソース

    team-telnyxがGitHubで公開しています。インストールする前にソースを確認してください。

インストール

AIスキル「Telnyx 10dlc Ruby」をTypingMindにインストールすれば、どのLLMでも利用できます。SKILL.mdを読み取れる別のAIエージェントに追加することもできます。

1

TypingMindにインストール

TypingMindはGitHubフォルダから直接スキルをインストールします。SKILL.mdを読み取り、リソースファイルをまとめてローカルに保存します。

  1. アプリを開き、「プラグイン」→「スキル」に移動します。
  2. 「GitHubからインストール」を選択します。
  3. 以下のスキルフォルダのURLを貼り付けて確定します。
    https://github.com/team-telnyx/ai/tree/main/providers/claude/plugins/telnyx-numbers/skills/telnyx-10dlc-ruby
  4. スキルを利用したいチャットごとに、そのスキルを有効にしてください。
「プラグイン」→「スキル」→「スキルを追加」→「GitHubのURLから」を選択し、フォルダのURLを貼り付けて「続行」を押します。
2

別のAIエージェントにインストール

Agent Skills形式を読み取れるAIエージェントなら、このスキルを利用できます。フォルダをそのAIエージェントのスキルディレクトリにコピーしてください。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/team-telnyx/ai.git /tmp/ai
mkdir -p .claude/skills
cp -r /tmp/ai/providers/claude/plugins/telnyx-numbers/skills/telnyx-10dlc-ruby .claude/skills/telnyx-10dlc-ruby
コピー後、新しいスキルを読み込むためにClaude Codeを再起動してください。

TypingMindで使用

TypingMindのチャットでTelnyx 10dlc Rubyを有効にするだけで、あとはモデルが対応します。名前と説明がシステムプロンプトに含まれ、関連するリクエストがあると、モデルが指示の全文を自動で読み込みます。手動で呼び出す必要はなく、実際に使用されるまでトークンを消費しません。

関連するリクエストがあるとすぐに、モデルが自動的にTelnyx 10dlc Rubyを読み込みます。

どのAIモデルでも利用可能

AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、Telnyx 10dlc Rubyは作成時に想定されたモデルに縛られません。TypingMindに一度インストールすれば、ご自身のAPIキーを使って、GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama、またはご自身で実行するローカルモデルで利用できます。

  • 必要なときだけ読み込み

    システムプロンプトには名前と説明だけが含まれます。関連するリクエストが初めてあったときに指示を取得するため、スキルを使わない間は指示の読み込みにトークンを消費しません。

  • チャットの途中でモデルを切り替え

    スキルはコードではなく指示なので、モデルを切り替えてもそのまま使えます。次のモデルも同じSKILL.mdを読み込みます。

スキルの指示

モデルが読み込むSKILL.mdの内容です。スキルはモデルが従う指示なので、インストールする前に確認してください。

Telnyx 10DLC - Ruby

Installation

bash
gem install telnyx

Setup

ruby
require "telnyx"

client = Telnyx::Client.new(
  api_key: ENV["TELNYX_API_KEY"], # This is the default and can be omitted
)

All examples below assume client is already initialized as shown above.

Error Handling

All API calls can fail with network errors, rate limits (429), validation errors (422), or authentication errors (401). Always handle errors in production code:

ruby
telnyx_brand = client.messaging_10dlc.brand.create(
  country: "US",
  display_name: "ABC Mobile",
  email: "support@example.com",
  entity_type: :PRIVATE_PROFIT,
  vertical: :TECHNOLOGY
)
puts(telnyx_brand)

Common error codes: 401 invalid API key, 403 insufficient permissions, 404 resource not found, 422 validation error (check field formats), 429 rate limited (retry with exponential backoff).

Important Notes

  • Pagination: Use .auto_paging_each for automatic iteration: page.auto_paging_each { |item| puts item.id }.

Operational Caveats

  • 10DLC is sequential: create the brand first, then submit the campaign, then attach messaging infrastructure such as the messaging profile.
  • Registration calls are not enough by themselves. Messaging cannot use the campaign until the assignment step completes successfully.
  • Treat registration status fields as part of the control flow. Do not assume the campaign is send-ready until the returned status fields confirm it.

Reference Use Rules

Do not invent Telnyx parameters, enums, response fields, or webhook fields.

Core Tasks

Create a brand

Brand registration is the entrypoint for any US A2P 10DLC campaign flow.

client.messaging_10dlc.brand.create() — POST /10dlc/brand

ParameterTypeRequiredDescription
entity_typeobjectYesEntity type behind the brand.
display_namestringYesDisplay name, marketing name, or DBA name of the brand.
countrystringYesISO2 2 characters country code.
emailstringYesValid email address of brand support contact.
verticalobjectYesVertical or industry segment of the brand.
company_namestringNo(Required for Non-profit/private/public) Legal company name.
first_namestringNoFirst name of business contact.
last_namestringNoLast name of business contact.
...+16 optional params in references/api-details.md
ruby
telnyx_brand = client.messaging_10dlc.brand.create(
  country: "US",
  display_name: "ABC Mobile",
  email: "support@example.com",
  entity_type: :PRIVATE_PROFIT,
  vertical: :TECHNOLOGY
)

puts(telnyx_brand)

Primary response fields:

  • telnyx_brand.brandId
  • telnyx_brand.identityStatus
  • telnyx_brand.status
  • telnyx_brand.displayName
  • telnyx_brand.state
  • telnyx_brand.altBusinessId

Submit a campaign

Campaign submission is the compliance-critical step that determines whether traffic can be provisioned.

client.messaging_10dlc.campaign_builder.submit() — POST /10dlc/campaignBuilder

ParameterTypeRequiredDescription
brand_idstring (UUID)YesAlphanumeric identifier of the brand associated with this ca...
descriptionstringYesSummary description of this campaign.
usecasestringYesCampaign usecase.
age_gatedbooleanNoAge gated message content in campaign.
auto_renewalbooleanNoCampaign subscription auto-renewal option.
direct_lendingbooleanNoDirect lending or loan arrangement
...+29 optional params in references/api-details.md
ruby
telnyx_campaign_csp = client.messaging_10dlc.campaign_builder.submit(
  brand_id: "BXXXXXX",
  description: "Two-factor authentication messages",
  usecase: "2FA",
    sample1: "Your verification code is {{code}}",
)

puts(telnyx_campaign_csp)

Primary response fields:

  • telnyx_campaign_csp.campaignId
  • telnyx_campaign_csp.brandId
  • telnyx_campaign_csp.campaignStatus
  • telnyx_campaign_csp.submissionStatus
  • telnyx_campaign_csp.failureReasons
  • telnyx_campaign_csp.status

Assign a messaging profile to a campaign

Messaging profile assignment is the practical handoff from registration to send-ready messaging infrastructure.

client.messaging_10dlc.phone_number_assignment_by_profile.assign() — POST /10dlc/phoneNumberAssignmentByProfile

ParameterTypeRequiredDescription
messaging_profile_idstring (UUID)YesThe ID of the messaging profile that you want to link to the...
campaign_idstring (UUID)YesThe ID of the campaign you want to link to the specified mes...
tcr_campaign_idstring (UUID)NoThe TCR ID of the shared campaign you want to link to the sp...
ruby
response = client.messaging_10dlc.phone_number_assignment_by_profile.assign(
  messaging_profile_id: "4001767e-ce0f-4cae-9d5f-0d5e636e7809",
    campaign_id: "CXXX001",
)

puts(response)

Primary response fields:

  • response.messagingProfileId
  • response.campaignId
  • response.taskId
  • response.tcrCampaignId

Webhook Verification

Telnyx signs webhooks with Ed25519. Each request includes telnyx-signature-ed25519 and telnyx-timestamp headers. Always verify signatures in production:

ruby
# In your webhook handler (e.g., Sinatra — use raw body):
post "/webhooks" do
  payload = request.body.read
  headers = {
    "telnyx-signature-ed25519" => request.env["HTTP_TELNYX_SIGNATURE_ED25519"],
    "telnyx-timestamp" => request.env["HTTP_TELNYX_TIMESTAMP"],
  }
  begin
    event = client.webhooks.unwrap(payload, headers)
  rescue => e
    halt 400, "Invalid signature: #{e.message}"
  end
  # Signature valid — event is the parsed webhook payload
  puts "Received event: #{event.data.event_type}"
  status 200
end

Webhooks

These webhook payload fields are inline because they are part of the primary integration path.

Campaign Status Update

FieldTypeDescription
brandIdstringBrand ID associated with the campaign.
campaignIdstringThe ID of the campaign.
createDatestringUnix timestamp when campaign was created.
cspIdstringAlphanumeric identifier of the CSP associated with this campaign.
isTMobileRegisteredbooleanIndicates whether the campaign is registered with T-Mobile.
typeenum: TELNYX_EVENT, REGISTRATION, MNO_REVIEW, TELNYX_REVIEW, NUMBER_POOL_PROVISIONED, NUMBER_POOL_DEPROVISIONED, TCR_EVENT, VERIFIED
descriptionstringDescription of the event.
statusenum: ACCEPTED, REJECTED, DORMANT, success, failedThe status of the campaign.

If you need webhook fields that are not listed inline here, read the webhook payload reference before writing the handler.


Important Supporting Operations

Use these when the core tasks above are close to your flow, but you need a common variation or follow-up step.

Get Brand

Inspect the current state of an existing brand registration.

client.messaging_10dlc.brand.retrieve() — GET /10dlc/brand/{brandId}

ParameterTypeRequiredDescription
brand_idstring (UUID)YesUnique identifier of the brand.
ruby
brand = client.messaging_10dlc.brand.retrieve("BXXX001")

puts(brand)

Primary response fields:

  • brand.status
  • brand.state
  • brand.altBusinessId
  • brand.altBusinessIdType
  • brand.assignedCampaignsCount
  • brand.brandId

Qualify By Usecase

Fetch the current state before updating, deleting, or making control-flow decisions.

client.messaging_10dlc.campaign_builder.brand.qualify_by_usecase() — GET /10dlc/campaignBuilder/brand/{brandId}/usecase/{usecase}

ParameterTypeRequiredDescription
usecasestringYesUnique identifier of the usecase.
brand_idstring (UUID)YesUnique identifier of the brand.
ruby
response = client.messaging_10dlc.campaign_builder.brand.qualify_by_usecase("usecase", brand_id: "brandId")

puts(response)

Primary response fields:

  • response.annualFee
  • response.maxSubUsecases
  • response.minSubUsecases
  • response.mnoMetadata
  • response.monthlyFee
  • response.quarterlyFee

Create New Phone Number Campaign

Create or provision an additional resource when the core tasks do not cover this flow.

client.messaging_10dlc.phone_number_campaigns.create() — POST /10dlc/phone_number_campaigns

ParameterTypeRequiredDescription
phone_numberstring (E.164)YesThe phone number you want to link to a specified campaign.
campaign_idstring (UUID)YesThe ID of the campaign you want to link to the specified pho...
ruby
phone_number_campaign = client.messaging_10dlc.phone_number_campaigns.create(
  campaign_id: "4b300178-131c-d902-d54e-72d90ba1620j",
  phone_number: "+18005550199"
)

puts(phone_number_campaign)

Primary response fields:

  • phone_number_campaign.assignmentStatus
  • phone_number_campaign.brandId
  • phone_number_campaign.campaignId
  • phone_number_campaign.createdAt
  • phone_number_campaign.failureReasons
  • phone_number_campaign.phoneNumber

Get campaign

Inspect the current state of an existing campaign registration.

client.messaging_10dlc.campaign.retrieve() — GET /10dlc/campaign/{campaignId}

ParameterTypeRequiredDescription
campaign_idstring (UUID)YesUnique identifier of the campaign.
ruby
telnyx_campaign_csp = client.messaging_10dlc.campaign.retrieve("CXXX001")

puts(telnyx_campaign_csp)

Primary response fields:

  • telnyx_campaign_csp.status
  • telnyx_campaign_csp.ageGated
  • telnyx_campaign_csp.autoRenewal
  • telnyx_campaign_csp.billedDate
  • telnyx_campaign_csp.brandDisplayName
  • telnyx_campaign_csp.brandId

List Brands

Inspect available resources or choose an existing resource before mutating it.

client.messaging_10dlc.brand.list() — GET /10dlc/brand

ParameterTypeRequiredDescription
sortenum (assignedCampaignsCount, -assignedCampaignsCount, brandId, -brandId, createdAt, ...)NoSpecifies the sort order for results.
pageintegerNoPage number to retrieve (1-based).
records_per_pageintegerNonumber of records per page.
...+6 optional params in references/api-details.md
ruby
page = client.messaging_10dlc.brand.list

puts(page)

Primary response fields:

  • page.page
  • page.records
  • page.totalRecords

Get Brand Feedback By Id

Fetch the current state before updating, deleting, or making control-flow decisions.

client.messaging_10dlc.brand.get_feedback() — GET /10dlc/brand/feedback/{brandId}

ParameterTypeRequiredDescription
brand_idstring (UUID)YesUnique identifier of the brand.
ruby
response = client.messaging_10dlc.brand.get_feedback("BXXX001")

puts(response)

Primary response fields:

  • response.brandId
  • response.category

Additional Operations

Use the core tasks above first. The operations below are indexed here with exact SDK methods and required params; use references/api-details.md for full optional params, response schemas, and lower-frequency webhook payloads. Before using any operation below, read the optional-parameters section and the response-schemas section so you do not guess missing fields.

OperationSDK methodEndpointUse whenRequired params
Get Brand SMS OTP Statusclient.messaging_10dlc.brand.get_sms_otp_by_reference()GET /10dlc/brand/smsOtp/{referenceId}Fetch the current state before updating, deleting, or making control-flow decisions.reference_id
Update Brandclient.messaging_10dlc.brand.update()PUT /10dlc/brand/{brandId}Inspect the current state of an existing brand registration.entity_type, display_name, country, email, +2 more
Delete Brandclient.messaging_10dlc.brand.delete()DELETE /10dlc/brand/{brandId}Inspect the current state of an existing brand registration.brand_id
Resend brand 2FA emailclient.messaging_10dlc.brand.resend_2fa_email()POST /10dlc/brand/{brandId}/2faEmailCreate or provision an additional resource when the core tasks do not cover this flow.brand_id
List External Vettingsclient.messaging_10dlc.brand.external_vetting.list()GET /10dlc/brand/{brandId}/externalVettingFetch the current state before updating, deleting, or making control-flow decisions.brand_id
Order Brand External Vettingclient.messaging_10dlc.brand.external_vetting.order()POST /10dlc/brand/{brandId}/externalVettingCreate or provision an additional resource when the core tasks do not cover this flow.evp_id, vetting_class, brand_id
Import External Vetting Recordclient.messaging_10dlc.brand.external_vetting.imports()PUT /10dlc/brand/{brandId}/externalVettingModify an existing resource without recreating it.evp_id, vetting_id, brand_id
Revet Brandclient.messaging_10dlc.brand.revet()PUT /10dlc/brand/{brandId}/revetModify an existing resource without recreating it.brand_id
Get Brand SMS OTP Status by Brand IDclient.messaging_10dlc.brand.retrieve_sms_otp_status()GET /10dlc/brand/{brandId}/smsOtpFetch the current state before updating, deleting, or making control-flow decisions.brand_id
Trigger Brand SMS OTPclient.messaging_10dlc.brand.trigger_sms_otp()POST /10dlc/brand/{brandId}/smsOtpCreate or provision an additional resource when the core tasks do not cover this flow.pin_sms, success_sms, brand_id
Verify Brand SMS OTPclient.messaging_10dlc.brand.verify_sms_otp()PUT /10dlc/brand/{brandId}/smsOtpModify an existing resource without recreating it.otp_pin, brand_id
List Campaignsclient.messaging_10dlc.campaign.list()GET /10dlc/campaignInspect available resources or choose an existing resource before mutating it.None
Accept Shared Campaignclient.messaging_10dlc.campaign.accept_sharing()POST /10dlc/campaign/acceptSharing/{campaignId}Create or provision an additional resource when the core tasks do not cover this flow.campaign_id
Get Campaign Costclient.messaging_10dlc.campaign.usecase.get_cost()GET /10dlc/campaign/usecase/costInspect available resources or choose an existing resource before mutating it.None
Update campaignclient.messaging_10dlc.campaign.update()PUT /10dlc/campaign/{campaignId}Inspect the current state of an existing campaign registration.campaign_id
Deactivate campaignclient.messaging_10dlc.campaign.deactivate()DELETE /10dlc/campaign/{campaignId}Inspect the current state of an existing campaign registration.campaign_id
Submit campaign appeal for manual reviewclient.messaging_10dlc.campaign.submit_appeal()POST /10dlc/campaign/{campaignId}/appealCreate or provision an additional resource when the core tasks do not cover this flow.appeal_reason, campaign_id
Get Campaign Mno Metadataclient.messaging_10dlc.campaign.get_mno_metadata()GET /10dlc/campaign/{campaignId}/mnoMetadataFetch the current state before updating, deleting, or making control-flow decisions.campaign_id
Get campaign operation statusclient.messaging_10dlc.campaign.get_operation_status()GET /10dlc/campaign/{campaignId}/operationStatusFetch the current state before updating, deleting, or making control-flow decisions.campaign_id
Get OSR campaign attributesclient.messaging_10dlc.campaign.osr.get_attributes()GET /10dlc/campaign/{campaignId}/osr/attributesFetch the current state before updating, deleting, or making control-flow decisions.campaign_id
Get Sharing Statusclient.messaging_10dlc.campaign.get_sharing_status()GET /10dlc/campaign/{campaignId}/sharingFetch the current state before updating, deleting, or making control-flow decisions.campaign_id
List shared partner campaignsclient.messaging_10dlc.partner_campaigns.list_shared_by_me()GET /10dlc/partnerCampaign/sharedByMeInspect available resources or choose an existing resource before mutating it.None
Get Sharing Statusclient.messaging_10dlc.partner_campaigns.retrieve_sharing_status()GET /10dlc/partnerCampaign/{campaignId}/sharingFetch the current state before updating, deleting, or making control-flow decisions.campaign_id
List Shared Campaignsclient.messaging_10dlc.partner_campaigns.list()GET /10dlc/partner_campaignsInspect available resources or choose an existing resource before mutating it.None
Get Single Shared Campaignclient.messaging_10dlc.partner_campaigns.retrieve()GET /10dlc/partner_campaigns/{campaignId}Fetch the current state before updating, deleting, or making control-flow decisions.campaign_id
Update Single Shared Campaignclient.messaging_10dlc.partner_campaigns.update()PATCH /10dlc/partner_campaigns/{campaignId}Modify an existing resource without recreating it.campaign_id
Get Assignment Task Statusclient.messaging_10dlc.phone_number_assignment_by_profile.retrieve_status()GET /10dlc/phoneNumberAssignmentByProfile/{taskId}Fetch the current state before updating, deleting, or making control-flow decisions.task_id
Get Phone Number Statusclient.messaging_10dlc.phone_number_assignment_by_profile.list_phone_number_status()GET /10dlc/phoneNumberAssignmentByProfile/{taskId}/phoneNumbersFetch the current state before updating, deleting, or making control-flow decisions.task_id
List phone number campaignsclient.messaging_10dlc.phone_number_campaigns.list()GET /10dlc/phone_number_campaignsInspect available resources or choose an existing resource before mutating it.None
Get Single Phone Number Campaignclient.messaging_10dlc.phone_number_campaigns.retrieve()GET /10dlc/phone_number_campaigns/{phoneNumber}Fetch the current state before updating, deleting, or making control-flow decisions.phone_number
Create New Phone Number Campaignclient.messaging_10dlc.phone_number_campaigns.update()PUT /10dlc/phone_number_campaigns/{phoneNumber}Modify an existing resource without recreating it.phone_number, campaign_id, phone_number
Delete Phone Number Campaignclient.messaging_10dlc.phone_number_campaigns.delete()DELETE /10dlc/phone_number_campaigns/{phoneNumber}Remove, detach, or clean up an existing resource.phone_number

For exhaustive optional parameters, full response schemas, and complete webhook payloads, see references/api-details.md.

同梱ファイル

スキルが読み込まれている間、モデルは必要に応じてこれらを読み取ります。読み取り可能なファイルとして提供され、実行されることはありません。

よくある質問

AIスキル「Telnyx 10dlc Ruby」では何ができますか?

10DLC brand and campaign registration for US A2P messaging compliance. Assign phone numbers to campaigns.

TypingMindでTelnyx 10dlc Rubyを使うメリットは何ですか?

一度インストールすれば、どのモデルでも使えるからです。Telnyx 10dlc Rubyはプロバイダー固有のコードではなく、通常のMarkdownで記述されているため、同じスキルをGPT-5、Claude、Gemini、Grok、ローカルモデルで利用できます。チャットの途中でモデルを切り替えても、そのまま使い続けられます。TypingMindは自分のAPIキーで動作するため、シート単位のサブスクリプションではなく、プロバイダーに直接料金を支払います。スキルとチャットは自分のストレージに保持されます。

TypingMindにTelnyx 10dlc Rubyをインストールするにはどうすればよいですか?

TypingMindで「プラグイン」→「スキル」→「GitHubからインストール」を開き、https://github.com/team-telnyx/ai/tree/main/providers/claude/plugins/telnyx-numbers/skills/telnyx-10dlc-rubyを貼り付けてください。TypingMindがSKILL.mdを読み込み、関連ファイルをまとめて、チャットごとに有効にできるスキルとしてインストールします。

Telnyx 10dlc Rubyを使えるAIモデルはどれですか?

TypingMindに接続したどのモデルでも利用できます。AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、GPT、Claude、Gemini、Grok、ローカルモデルのいずれも、リクエストの内容がこのスキルの用途に合ったときに、このスキルを読み込めます。

Telnyx 10dlc Rubyで使えるAIモデルの数に制限はありますか?

数に制限はありません。スキルに対応したモデルであれば、GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llamaなど、どのモデルでもTelnyx 10dlc Rubyを利用できます。すべてTypingMind上で、自分のAPIキーを使って利用できます。

AIスキル「Telnyx 10dlc Ruby」は無料ですか?

はい。team-telnyxがMITライセンスのもとでGitHubに公開しています。ご利用のAIプロバイダーに支払うのは、使用したトークンの料金だけです。

AIスキルとは何ですか?

AIスキルは、特定のタスクの実行方法をAIモデルに教える、再利用可能な指示のセットです。オープンなAgent Skills形式に従い、名前と説明を含むSKILL.mdファイルに加え、モデルが必要とするスクリプト、テンプレート、参照ファイルで構成されます。モデルはリクエストがスキルに合致したときだけ指示を読み込むため、インストール済みのスキルも、使うまでは費用がかかりません。

AIスキルは、プラグインやMCPサーバーとどう違いますか?

プラグインやMCPサーバーは、モデルが呼び出せる新しいツールを提供します。ツールとは、どこかで実行され、結果を返すコードです。一方、AIスキルは、タスクへの取り組み方、従うべき手順、望ましい出力の例といった知識や進め方をモデルに伝えます。スキルは通常のMarkdownで記述されているため、サーバー、APIキー、実行環境は不要で、どのモデルでも利用できます。

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇