This is the public Twilio REST API.
This Motoko client was generated by the OpenAPI Generator project.
- API version: 1.0.0
- Generator version: 7.22.0-SNAPSHOT
- Build package: org.openapitools.codegen.languages.MotokoClientCodegen
This package ships a curated subset of the upstream OpenAPI surface. Only the following APIs are included; models are kept for them transitively, and any others have been pruned:
- MessagingV1AlphaSender
- MessagingV1BrandRegistration
- MessagingV1BrandRegistrationOtp
- MessagingV1BrandVetting
- MessagingV1ChannelSender
- MessagingV1Deactivations
- MessagingV1DestinationAlphaSender
- MessagingV1DomainCerts
- MessagingV1DomainConfig
- MessagingV1DomainConfigMessagingService
- MessagingV1DomainValidateDns
- MessagingV1ExternalCampaign
- MessagingV1LinkshorteningMessagingService
- MessagingV1LinkshorteningMessagingServiceDomainAssociation
- MessagingV1PhoneNumber
- MessagingV1RequestManagedCert
- MessagingV1Service
- MessagingV1ShortCode
- MessagingV1TollfreeVerification
- MessagingV1UsAppToPerson
- MessagingV1UsAppToPersonUsecase
- MessagingV1Usecase
- Api20100401Account
- Api20100401Balance
- Api20100401Message
- Api20100401Media
- Api20100401MediaInstance
- Api20100401UserDefinedMessage
- Api20100401UserDefinedMessageSubscription
- Api20100401IncomingPhoneNumber
- Api20100401IncomingPhoneNumberLocal
- Api20100401IncomingPhoneNumberMobile
- Api20100401IncomingPhoneNumberTollFree
- Api20100401AvailablePhoneNumberCountry
- Api20100401DependentPhoneNumber
- AccountEnumStatus
- AccountEnumType
- ApiV2010Account
- ApiV2010AccountAddress
- ApiV2010AccountAddressDependentPhoneNumber
- ApiV2010AccountApplication
- ApiV2010AccountApplicationSmsFallbackMethod
- ApiV2010AccountApplicationSmsMethod
- ApiV2010AccountApplicationStatusCallbackMethod
- ApiV2010AccountApplicationVoiceFallbackMethod
- ApiV2010AccountApplicationVoiceMethod
- ApiV2010AccountAuthorizedConnectApp
- ApiV2010AccountAvailablePhoneNumberCountry
- ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberLocal
- ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberLocalCapabilities
- ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberMachineToMachine
- ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberMobile
- ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberNational
- ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberSharedCost
- ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberTollFree
- ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberVoip
- ApiV2010AccountBalance
- ApiV2010AccountCall
- ApiV2010AccountCallCallEvent
- ApiV2010AccountCallCallNotification
- ApiV2010AccountCallCallNotificationInstance
- ApiV2010AccountCallCallNotificationRequestMethod
- ApiV2010AccountCallCallRecording
- ApiV2010AccountCallPayments
- ApiV2010AccountCallRealtimeTranscription
- ApiV2010AccountCallSiprec
- ApiV2010AccountCallStream
- ApiV2010AccountCallUserDefinedMessage
- ApiV2010AccountCallUserDefinedMessageSubscription
- ApiV2010AccountConference
- ApiV2010AccountConferenceConferenceRecording
- ApiV2010AccountConferenceParticipant
- ApiV2010AccountConnectApp
- ApiV2010AccountConnectAppDeauthorizeCallbackMethod
- ApiV2010AccountIncomingPhoneNumber
- ApiV2010AccountIncomingPhoneNumberCapabilities
- ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberAssignedAddOn
- ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberAssignedAddOnIncomingPhoneNumberAssignedAddOnExtension
- ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberLocal
- ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberMobile
- ApiV2010AccountIncomingPhoneNumberIncomingPhoneNumberTollFree
- ApiV2010AccountKey
- ApiV2010AccountMessage
- ApiV2010AccountMessageMedia
- ApiV2010AccountMessageMessageFeedback
- ApiV2010AccountNewKey
- ApiV2010AccountNewSigningKey
- ApiV2010AccountNotification
- ApiV2010AccountNotificationInstance
- ApiV2010AccountOutgoingCallerId
- ApiV2010AccountQueue
- ApiV2010AccountQueueMember
- ApiV2010AccountRecording
- ApiV2010AccountRecordingRecordingAddOnResult
- ApiV2010AccountRecordingRecordingAddOnResultRecordingAddOnResultPayload
- ApiV2010AccountRecordingRecordingAddOnResultRecordingAddOnResultPayloadRecordingAddOnResultPayloadData
- ApiV2010AccountRecordingRecordingTranscription
- ApiV2010AccountShortCode
- ApiV2010AccountShortCodeSmsFallbackMethod
- ApiV2010AccountShortCodeSmsMethod
- ApiV2010AccountSigningKey
- ApiV2010AccountSipSipCredentialList
- ApiV2010AccountSipSipCredentialListSipCredential
- ApiV2010AccountSipSipDomain
- ApiV2010AccountSipSipDomainSipAuthSipAuthCallsSipAuthCallsCredentialListMapping
- ApiV2010AccountSipSipDomainSipAuthSipAuthCallsSipAuthCallsIpAccessControlListMapping
- ApiV2010AccountSipSipDomainSipAuthSipAuthRegistrationsSipAuthRegistrationsCredentialListMapping
- ApiV2010AccountSipSipDomainSipCredentialListMapping
- ApiV2010AccountSipSipDomainSipIpAccessControlListMapping
- ApiV2010AccountSipSipDomainVoiceStatusCallbackMethod
- ApiV2010AccountSipSipIpAccessControlList
- ApiV2010AccountSipSipIpAccessControlListSipIpAddress
- ApiV2010AccountToken
- ApiV2010AccountTokenIceServersInner
- ApiV2010AccountTranscription
- ApiV2010AccountUsageUsageRecord
- ApiV2010AccountUsageUsageRecordUsageRecordAllTime
- ApiV2010AccountUsageUsageRecordUsageRecordDaily
- ApiV2010AccountUsageUsageRecordUsageRecordLastMonth
- ApiV2010AccountUsageUsageRecordUsageRecordMonthly
- ApiV2010AccountUsageUsageRecordUsageRecordThisMonth
- ApiV2010AccountUsageUsageRecordUsageRecordToday
- ApiV2010AccountUsageUsageRecordUsageRecordYearly
- ApiV2010AccountUsageUsageRecordUsageRecordYesterday
- ApiV2010AccountUsageUsageTrigger
- ApiV2010AccountUsageUsageTriggerCallbackMethod
- ApiV2010AccountValidationRequest
- AuthorizedConnectAppEnumPermission
- BrandRegistrationsEnumBrandFeedback
- BrandRegistrationsEnumIdentityStatus
- BrandRegistrationsEnumStatus
- BrandVettingEnumVettingProvider
- CallEnumEvent
- CallEnumStatus
- CallEnumUpdateStatus
- CallRecordingEnumSource
- CallRecordingEnumStatus
- ConferenceEnumReasonConferenceEnded
- ConferenceEnumStatus
- ConferenceEnumUpdateStatus
- ConferenceRecordingEnumSource
- ConferenceRecordingEnumStatus
- ConnectAppEnumPermission
- CreateApplicationRequestSmsFallbackMethod
- CreateApplicationRequestSmsMethod
- CreateApplicationRequestStatusCallbackMethod
- CreateApplicationRequestVoiceFallbackMethod
- CreateApplicationRequestVoiceMethod
- CreateCallRecordingRequestRecordingStatusCallbackMethod
- CreateCallRequestAsyncAmdStatusCallbackMethod
- CreateCallRequestFallbackMethod
- CreateCallRequestMethod
- CreateCallRequestRecordingStatusCallbackMethod
- CreateCallRequestStatusCallbackMethod
- CreateParticipantRequestAmdStatusCallbackMethod
- CreateParticipantRequestConferenceRecordingStatusCallbackMethod
- CreateParticipantRequestConferenceStatusCallbackMethod
- CreateParticipantRequestRecordingStatusCallbackMethod
- CreateParticipantRequestStatusCallbackMethod
- CreatePaymentsRequestConfirmation
- CreateRealtimeTranscriptionRequestStatusCallbackMethod
- CreateServiceRequestFallbackMethod
- CreateServiceRequestInboundMethod
- CreateSipDomainRequestVoiceStatusCallbackMethod
- CreateStreamRequestStatusCallbackMethod
- CreateUserDefinedMessageSubscriptionRequestMethod
- CreateValidationRequestRequestStatusCallbackMethod
- DependentPhoneNumberEnumAddressRequirement
- DependentPhoneNumberEnumEmergencyStatus
- IncomingPhoneNumberEnumAddressRequirement
- IncomingPhoneNumberEnumEmergencyAddressStatus
- IncomingPhoneNumberEnumEmergencyStatus
- IncomingPhoneNumberEnumVoiceReceiveMode
- IncomingPhoneNumberLocalEnumAddressRequirement
- IncomingPhoneNumberLocalEnumEmergencyAddressStatus
- IncomingPhoneNumberLocalEnumEmergencyStatus
- IncomingPhoneNumberLocalEnumVoiceReceiveMode
- IncomingPhoneNumberMobileEnumAddressRequirement
- IncomingPhoneNumberMobileEnumEmergencyAddressStatus
- IncomingPhoneNumberMobileEnumEmergencyStatus
- IncomingPhoneNumberMobileEnumVoiceReceiveMode
- IncomingPhoneNumberTollFreeEnumAddressRequirement
- IncomingPhoneNumberTollFreeEnumEmergencyAddressStatus
- IncomingPhoneNumberTollFreeEnumEmergencyStatus
- IncomingPhoneNumberTollFreeEnumVoiceReceiveMode
- ListAccountResponse
- ListAddressResponse
- ListAlphaSenderResponse
- ListAlphaSenderResponseMeta
- ListApplicationResponse
- ListAuthorizedConnectAppResponse
- ListAvailablePhoneNumberCountryResponse
- ListAvailablePhoneNumberLocalResponse
- ListAvailablePhoneNumberMachineToMachineResponse
- ListAvailablePhoneNumberMobileResponse
- ListAvailablePhoneNumberNationalResponse
- ListAvailablePhoneNumberSharedCostResponse
- ListAvailablePhoneNumberTollFreeResponse
- ListAvailablePhoneNumberVoipResponse
- ListBrandRegistrationsResponse
- ListBrandVettingResponse
- ListCallEventResponse
- ListCallNotificationResponse
- ListCallRecordingResponse
- ListCallResponse
- ListChannelSenderResponse
- ListConferenceRecordingResponse
- ListConferenceResponse
- ListConnectAppResponse
- ListDependentPhoneNumberResponse
- ListDestinationAlphaSenderResponse
- ListIncomingPhoneNumberAssignedAddOnExtensionResponse
- ListIncomingPhoneNumberAssignedAddOnResponse
- ListIncomingPhoneNumberLocalResponse
- ListIncomingPhoneNumberMobileResponse
- ListIncomingPhoneNumberResponse
- ListIncomingPhoneNumberTollFreeResponse
- ListKeyResponse
- ListMediaResponse
- ListMemberResponse
- ListMessageResponse
- ListNotificationResponse
- ListOutgoingCallerIdResponse
- ListParticipantResponse
- ListPhoneNumberResponse
- ListQueueResponse
- ListRecordingAddOnResultPayloadResponse
- ListRecordingAddOnResultResponse
- ListRecordingResponse
- ListRecordingTranscriptionResponse
- ListServiceResponse
- ListShortCodeResponse
- ListShortCodeResponse1
- ListSigningKeyResponse
- ListSipAuthCallsCredentialListMappingResponse
- ListSipAuthCallsIpAccessControlListMappingResponse
- ListSipAuthRegistrationsCredentialListMappingResponse
- ListSipCredentialListMappingResponse
- ListSipCredentialListResponse
- ListSipCredentialResponse
- ListSipDomainResponse
- ListSipIpAccessControlListMappingResponse
- ListSipIpAccessControlListResponse
- ListSipIpAddressResponse
- ListTollfreeVerificationResponse
- ListTranscriptionResponse
- ListUsAppToPersonResponse
- ListUsageRecordAllTimeResponse
- ListUsageRecordDailyResponse
- ListUsageRecordLastMonthResponse
- ListUsageRecordMonthlyResponse
- ListUsageRecordResponse
- ListUsageRecordThisMonthResponse
- ListUsageRecordTodayResponse
- ListUsageRecordYearlyResponse
- ListUsageRecordYesterdayResponse
- ListUsageTriggerResponse
- MessageEnumAddressRetention
- MessageEnumContentRetention
- MessageEnumDirection
- MessageEnumRiskCheck
- MessageEnumScheduleType
- MessageEnumStatus
- MessageEnumTrafficType
- MessageEnumUpdateStatus
- MessageFeedbackEnumOutcome
- MessagingV1BrandRegistrations
- MessagingV1BrandRegistrationsBrandRegistrationOtp
- MessagingV1BrandRegistrationsBrandVetting
- MessagingV1Deactivation
- MessagingV1DomainCertV4
- MessagingV1DomainConfig
- MessagingV1DomainConfigMessagingService
- MessagingV1DomainDnsValidation
- MessagingV1ExternalCampaign
- MessagingV1LinkshorteningMessagingService
- MessagingV1LinkshorteningMessagingServiceDomainAssociation
- MessagingV1RequestManagedCert
- MessagingV1Service
- MessagingV1ServiceAddons
- MessagingV1ServiceAlphaSender
- MessagingV1ServiceChannelSender
- MessagingV1ServiceDestinationAlphaSender
- MessagingV1ServiceFallbackMethod
- MessagingV1ServiceGenericSender
- MessagingV1ServiceInboundMethod
- MessagingV1ServicePhoneNumber
- MessagingV1ServiceServiceForNumber
- MessagingV1ServiceShortCode
- MessagingV1ServiceUsAppToPerson
- MessagingV1ServiceUsAppToPersonResponse
- MessagingV1ServiceUsAppToPersonUsecase
- MessagingV1ServiceUsAppToPersonV2
- MessagingV1TollfreeVerification
- MessagingV1Usecase
- ParticipantEnumStatus
- PaymentsEnumBankAccountType
- PaymentsEnumCapture
- PaymentsEnumPaymentMethod
- PaymentsEnumStatus
- PaymentsEnumTokenType
- RealtimeTranscriptionEnumStatus
- RealtimeTranscriptionEnumTrack
- RealtimeTranscriptionEnumUpdateStatus
- RecordingAddOnResultEnumStatus
- RecordingEnumSource
- RecordingEnumStatus
- RecordingTranscriptionEnumStatus
- ServiceEnumScanMessageContent
- SiprecEnumStatus
- SiprecEnumTrack
- SiprecEnumUpdateStatus
- SmsFeedbackEnumOutcome
- SmsMessageEnumDirection
- SmsMessageEnumStatus
- SmsMessageEnumUpdateStatus
- StreamEnumStatus
- StreamEnumTrack
- StreamEnumUpdateStatus
- TollfreeVerificationEnumBusinessRegistrationAuthority
- TollfreeVerificationEnumBusinessType
- TollfreeVerificationEnumOptInType
- TollfreeVerificationEnumStatus
- TollfreeVerificationEnumUseCaseCategoriesInner
- TollfreeVerificationEnumVettingProvider
- TranscriptionEnumStatus
- UpdateCallRecording408Response
- UpdateCallRequestMethod
- UpdateCallRequestStatusCallbackMethod
- UpdateConferenceRequestAnnounceMethod
- UpdateConnectAppRequestDeauthorizeCallbackMethod
- UpdateIncomingPhoneNumberRequestSmsFallbackMethod
- UpdateIncomingPhoneNumberRequestSmsMethod
- UpdateIncomingPhoneNumberRequestStatusCallbackMethod
- UpdateIncomingPhoneNumberRequestVoiceFallbackMethod
- UpdateIncomingPhoneNumberRequestVoiceMethod
- UpdateMemberRequestMethod
- UpdateParticipantRequestAnnounceMethod
- UpdateParticipantRequestHoldMethod
- UpdateParticipantRequestWaitMethod
- UpdateShortCodeRequestSmsFallbackMethod
- UpdateShortCodeRequestSmsMethod
- UpdateSipDomainRequestVoiceMethod
- UpdateUsageTriggerRequestCallbackMethod
- UsageTriggerEnumRecurring
- UsageTriggerEnumTriggerField
- WhatsappSenderEnumStatus
- WhatsappTemplateEnumCategory
- Api20100401AccountApi
- Api20100401AddOnResultApi
- Api20100401AddressApi
- Api20100401AllTimeApi
- Api20100401ApplicationApi
- Api20100401AssignedAddOnApi
- Api20100401AssignedAddOnExtensionApi
- Api20100401AuthCallsCredentialListMappingApi
- Api20100401AuthCallsIpAccessControlListMappingApi
- Api20100401AuthRegistrationsCredentialListMappingApi
- Api20100401AuthorizedConnectAppApi
- Api20100401AvailablePhoneNumberCountryApi
- Api20100401BalanceApi
- Api20100401CallApi
- Api20100401CallNotificationApi
- Api20100401CallRecordingApi
- Api20100401CallTranscriptionApi
- Api20100401ConferenceApi
- Api20100401ConferenceRecordingApi
- Api20100401ConnectAppApi
- Api20100401CredentialApi
- Api20100401CredentialListApi
- Api20100401CredentialListMappingApi
- Api20100401DailyApi
- Api20100401DataApi
- Api20100401DependentPhoneNumberApi
- Api20100401DomainApi
- Api20100401EventApi
- Api20100401FeedbackApi
- Api20100401IncomingPhoneNumberApi
- Api20100401IncomingPhoneNumberLocalApi
- Api20100401IncomingPhoneNumberMobileApi
- Api20100401IncomingPhoneNumberTollFreeApi
- Api20100401IpAccessControlListApi
- Api20100401IpAccessControlListMappingApi
- Api20100401KeyApi
- Api20100401LastMonthApi
- Api20100401LocalApi
- Api20100401MachineToMachineApi
- Api20100401MediaApi
- Api20100401MediaInstanceApi
- Api20100401MemberApi
- Api20100401MessageApi
- Api20100401MobileApi
- Api20100401MonthlyApi
- Api20100401NationalApi
- Api20100401NewKeyApi
- Api20100401NewSigningKeyApi
- Api20100401NotificationApi
- Api20100401OutgoingCallerIdApi
- Api20100401ParticipantApi
- Api20100401PayloadApi
- Api20100401PaymentApi
- Api20100401QueueApi
- Api20100401RecordApi
- Api20100401RecordingApi
- Api20100401RecordingTranscriptionApi
- Api20100401SharedCostApi
- Api20100401ShortCodeApi
- Api20100401SigningKeyApi
- Api20100401SipIpAddressApi
- Api20100401SiprecApi
- Api20100401StreamApi
- Api20100401ThisMonthApi
- Api20100401TodayApi
- Api20100401TokenApi
- Api20100401TollFreeApi
- Api20100401TranscriptionApi
- Api20100401TriggerApi
- Api20100401UserDefinedMessageApi
- Api20100401UserDefinedMessageSubscriptionApi
- Api20100401ValidationRequestApi
- Api20100401VoipApi
- Api20100401YearlyApi
- Api20100401YesterdayApi
- MessagingV1AlphaSenderApi
- MessagingV1BrandRegistrationApi
- MessagingV1BrandRegistrationOtpApi
- MessagingV1BrandVettingApi
- MessagingV1ChannelSenderApi
- MessagingV1DeactivationsApi
- MessagingV1DestinationAlphaSenderApi
- MessagingV1DomainCertsApi
- MessagingV1DomainConfigApi
- MessagingV1DomainConfigMessagingServiceApi
- MessagingV1DomainValidateDnsApi
- MessagingV1ExternalCampaignApi
- MessagingV1LinkshorteningMessagingServiceApi
- MessagingV1LinkshorteningMessagingServiceDomainAssociationApi
- MessagingV1PhoneNumberApi
- MessagingV1RequestManagedCertApi
- MessagingV1ServiceApi
- MessagingV1ShortCodeApi
- MessagingV1TollfreeVerificationApi
- MessagingV1UsAppToPersonApi
- MessagingV1UsAppToPersonUsecaseApi
- MessagingV1UsecaseApi
This is a Motoko module that can be used in your Internet Computer project.
Import the generated API modules in your Motoko code:
import SomeApi "mo:twilio-client/Apis/SomeApi";
// or using destructuring for specific functions
import { someFunction } "mo:twilio-client/Apis/SomeApi";Configure and call the API:
import { defaultConfig } "mo:twilio-client/Config";
// Use the default config as-is, or customize specific fields:
let config = { defaultConfig with auth = ?#bearer "my-token" };
let result = await* SomeApi.someFunction(config, ...);The defaultConfig has baseUrl pre-set to the API's base URL, cycles = 30_000_000_000, and all optional fields set to null.
Alternatively, use the suite-based API to bind config once and call multiple functions without threading it through each call:
import { SomeApi } "mo:twilio-client/Apis/SomeApi";
let api = SomeApi(config);
let result = await api.someFunction(...);
let other = await api.anotherFunction(...);The generated API client makes HTTP outcalls using the Internet Computer's management canister. HTTP outcalls require cycles to execute.
Important: Before calling any API endpoints, ensure your canister has sufficient cycles:
For local development with icp-cli:
icp network start -d # local replica auto-seeds cycles — no fabrication needed
icp deploy # build + deployFor mainnet:
icp cycles balance -n ic # check balance
icp deploy -e ic # deploy to mainnetLegacy: using dfx (sunset)
For local development:
# Get your canister ID
CANISTER_ID=$(dfx canister id your_canister_name)
# Add cycles (100 trillion cycles for testing)
dfx ledger fabricate-cycles --canister "$CANISTER_ID" --amount 100000000000000For production deployment, you'll need to fund your canister with cycles through the NNS or cycles wallet.
Each HTTP outcall typically costs around 20-50 million cycles depending on the request/response size.