Skip to main contenttelnyx-numbers-compliance-go
Manage regulatory requirements, number bundles, supporting documents, and verified numbers for compliance. This skill provides Go SDK examples.
インストールへ移動 Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
直接コマンドでは確認用 Prompt が省略されます。実行前にソースを確認してください。
npx skills add https://github.com/team-telnyx/telnyx-toolkit --skill telnyx-numbers-compliance-goコマンドは1行のまま表示されます。コピー前に横へスクロールして全体を確認してください。
ローカルで確認しますか?SkillsMP が現在取得できるファイルをダウンロードできます。
SOC
| name | telnyx-numbers-compliance-go |
| description | Manage regulatory requirements, number bundles, supporting documents, and verified numbers for compliance. This skill provides Go SDK examples. |
| metadata | {"author":"telnyx","product":"numbers-compliance","language":"go","generated_by":"telnyx-ext-skills-generator"} |
Telnyx Numbers Compliance - Go
Installation
go get github.com/team-telnyx/telnyx-go
Setup
import (
"context"
"fmt"
"os"
"github.com/team-telnyx/telnyx-go"
"github.com/team-telnyx/telnyx-go/option"
)
client := telnyx.NewClient(
option.WithAPIKey(os.Getenv("TELNYX_API_KEY")),
)
All examples below assume client is already initialized as shown above.
Retrieve Bundles
Get all allowed bundles.
GET /bundle_pricing/billing_bundles
page, err := client.BundlePricing.BillingBundles.List(context.TODO(), telnyx.BundlePricingBillingBundleListParams{})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", page)
Get Bundle By Id
Get a single bundle by ID.
GET /bundle_pricing/billing_bundles/{bundle_id}
billingBundle, err := client.BundlePricing.BillingBundles.Get(
context.TODO(),
"8661948c-a386-4385-837f-af00f40f111a",
telnyx.BundlePricingBillingBundleGetParams{},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", billingBundle.Data)
Get User Bundles
Get a paginated list of user bundles.
GET /bundle_pricing/user_bundles
page, err := client.BundlePricing.UserBundles.List(context.TODO(), telnyx.BundlePricingUserBundleListParams{})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", page)
Create User Bundles
Creates multiple user bundles for the user.
POST /bundle_pricing/user_bundles/bulk
userBundle, err := client.BundlePricing.UserBundles.New(context.TODO(), telnyx.BundlePricingUserBundleNewParams{})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", userBundle.Data)
Get Unused User Bundles
Returns all user bundles that aren't in use.
GET /bundle_pricing/user_bundles/unused
response, err := client.BundlePricing.UserBundles.ListUnused(context.TODO(), telnyx.BundlePricingUserBundleListUnusedParams{})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", response.Data)
Get User Bundle by Id
Retrieves a user bundle by its ID.
GET /bundle_pricing/user_bundles/{user_bundle_id}
userBundle, err := client.BundlePricing.UserBundles.Get(
context.TODO(),
"ca1d2263-d1f1-43ac-ba53-248e7a4bb26a",
telnyx.BundlePricingUserBundleGetParams{},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", userBundle.Data)
Deactivate User Bundle
Deactivates a user bundle by its ID.
DELETE /bundle_pricing/user_bundles/{user_bundle_id}
response, err := client.BundlePricing.UserBundles.Deactivate(
context.TODO(),
"ca1d2263-d1f1-43ac-ba53-248e7a4bb26a",
telnyx.BundlePricingUserBundleDeactivateParams{},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", response.Data)
Get User Bundle Resources
Retrieves the resources of a user bundle by its ID.
GET /bundle_pricing/user_bundles/{user_bundle_id}/resources
response, err := client.BundlePricing.UserBundles.ListResources(
context.TODO(),
"ca1d2263-d1f1-43ac-ba53-248e7a4bb26a",
telnyx.BundlePricingUserBundleListResourcesParams{},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", response.Data)
List all document links
List all documents links ordered by created_at descending.
page, err := client.DocumentLinks.List(context.TODO(), telnyx.DocumentLinkListParams{})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", page)
List all documents
List all documents ordered by created_at descending.
page, err := client.Documents.List(context.TODO(), telnyx.DocumentListParams{})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", page)
Upload a document
Upload a document.
Uploaded files must be linked to a service within 30 minutes or they will be automatically deleted.
response, err := client.Documents.UploadJson(context.TODO(), telnyx.DocumentUploadJsonParams{
Document: telnyx.DocumentUploadJsonParamsDocument{},
})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", response.Data)
Retrieve a document
document, err := client.Documents.Get(context.TODO(), "6a09cdc3-8948-47f0-aa62-74ac943d6c58")
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", document.Data)
Update a document
document, err := client.Documents.Update(
context.TODO(),
"6a09cdc3-8948-47f0-aa62-74ac943d6c58",
telnyx.DocumentUpdateParams{
DocServiceDocument: telnyx.DocServiceDocumentParam{},
},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", document.Data)
Delete a document
Delete a document.
A document can only be deleted if it's not linked to a service.
document, err := client.Documents.Delete(context.TODO(), "6a09cdc3-8948-47f0-aa62-74ac943d6c58")
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", document.Data)
Download a document
GET /documents/{id}/download
response, err := client.Documents.Download(context.TODO(), "6a09cdc3-8948-47f0-aa62-74ac943d6c58")
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", response)
Generate a temporary download link for a document
Generates a temporary pre-signed URL that can be used to download the document directly from the storage backend without authentication.
GET /documents/{id}/download_link
response, err := client.Documents.GenerateDownloadLink(context.TODO(), "550e8400-e29b-41d4-a716-446655440000")
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", response.Data)
List all requirements
List all requirements with filtering, sorting, and pagination
page, err := client.Requirements.List(context.TODO(), telnyx.RequirementListParams{})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", page)
Retrieve a document requirement
Retrieve a document requirement record
requirement, err := client.Requirements.Get(context.TODO(), "a9dad8d5-fdbd-49d7-aa23-39bb08a5ebaa")
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", requirement.Data)
List all requirement types
List all requirement types ordered by created_at descending
requirementTypes, err := client.RequirementTypes.List(context.TODO(), telnyx.RequirementTypeListParams{})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", requirementTypes.Data)
Retrieve a requirement types
Retrieve a requirement type by id
GET /requirement_types/{id}
requirementType, err := client.RequirementTypes.Get(context.TODO(), "a38c217a-8019-48f8-bff6-0fdd9939075b")
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", requirementType.Data)
Retrieve regulatory requirements
GET /regulatory_requirements
regulatoryRequirement, err := client.RegulatoryRequirements.Get(context.TODO(), telnyx.RegulatoryRequirementGetParams{})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", regulatoryRequirement.Data)
List requirement groups
requirementGroups, err := client.RequirementGroups.List(context.TODO(), telnyx.RequirementGroupListParams{})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", requirementGroups)
Create a new requirement group
POST /requirement_groups — Required: country_code, phone_number_type, action
requirementGroup, err := client.RequirementGroups.New(context.TODO(), telnyx.RequirementGroupNewParams{
Action: telnyx.RequirementGroupNewParamsActionOrdering,
CountryCode: "US",
PhoneNumberType: telnyx.RequirementGroupNewParamsPhoneNumberTypeLocal,
})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", requirementGroup.ID)
Get a single requirement group by ID
GET /requirement_groups/{id}
requirementGroup, err := client.RequirementGroups.Get(context.TODO(), "id")
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", requirementGroup.ID)
Update requirement values in requirement group
PATCH /requirement_groups/{id}
requirementGroup, err := client.RequirementGroups.Update(
context.TODO(),
"id",
telnyx.RequirementGroupUpdateParams{},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", requirementGroup.ID)
Delete a requirement group by ID
DELETE /requirement_groups/{id}
requirementGroup, err := client.RequirementGroups.Delete(context.TODO(), "id")
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", requirementGroup.ID)
Submit a Requirement Group for Approval
POST /requirement_groups/{id}/submit_for_approval
requirementGroup, err := client.RequirementGroups.SubmitForApproval(context.TODO(), "id")
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", requirementGroup.ID)
List all Verified Numbers
Gets a paginated list of Verified Numbers.
page, err := client.VerifiedNumbers.List(context.TODO(), telnyx.VerifiedNumberListParams{})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", page)
Request phone number verification
Initiates phone number verification procedure.
POST /verified_numbers — Required: phone_number, verification_method
verifiedNumber, err := client.VerifiedNumbers.New(context.TODO(), telnyx.VerifiedNumberNewParams{
PhoneNumber: "+15551234567",
VerificationMethod: telnyx.VerifiedNumberNewParamsVerificationMethodSMS,
})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", verifiedNumber.PhoneNumber)
Retrieve a verified number
GET /verified_numbers/{phone_number}
verifiedNumberDataWrapper, err := client.VerifiedNumbers.Get(context.TODO(), "+15551234567")
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", verifiedNumberDataWrapper.Data)
Delete a verified number
DELETE /verified_numbers/{phone_number}
verifiedNumberDataWrapper, err := client.VerifiedNumbers.Delete(context.TODO(), "+15551234567")
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", verifiedNumberDataWrapper.Data)
Submit verification code
POST /verified_numbers/{phone_number}/actions/verify — Required: verification_code
verifiedNumberDataWrapper, err := client.VerifiedNumbers.Actions.SubmitVerificationCode(
context.TODO(),
"+15551234567",
telnyx.VerifiedNumberActionSubmitVerificationCodeParams{
VerificationCode: "123456",
},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", verifiedNumberDataWrapper.Data)
このリポジトリの他の Skills
Complete Telnyx toolkit — ready-to-use tools (STT, TTS, RAG, Networking, 10DLC) plus SDK documentation for JavaScript, Python, Go, Java, and Ruby.
Automated Telnyx bot account signup via challenge-response
Track agent activities using the Telnyx AI Missions API. Use this skill when executing multi-step tasks that should be logged and tracked. Supports creating voice/SMS agents, scheduling calls, and retrieving conversation insights. Use when tasks involve calling people, sending SMS, or any substantial tracked work.