| OS | Ruby | 
|---|---|
| Windows 2022 | 3.0, 3.1, 3.2, 3.3 | 
| Windows 2025 | 3.0, 3.1, 3.2, 3.3 | 
| Ubuntu 22.04 | 3.0, 3.1, 3.2, 3.3 | 
| Ubuntu 24.04 | 3.0, 3.1, 3.2, 3.3 | 
Bandwidth - the Ruby gem for the Bandwidth SDK
openapi-generator generate -g ruby -i bandwidth.yml -c openapi-config.yml -o ./
Bandwidth's Communication APIs
This SDK is automatically generated by the OpenAPI Generator project:
- API version: 1.0.0
- Package version: 1.0.0
- Build package: org.openapitools.codegen.languages.RubyClientCodegen For more information, please visit https://dev.bandwidth.com
gem install bandwidth-sdkTo build the Ruby code into a gem:
gem build bandwidth-sdk.gemspecThen either install the gem locally:
gem install ./bandwidth-sdk-1.0.0.gem(for development, run gem install --dev ./bandwidth-sdk-1.0.0.gem to install the development dependencies)
or publish the gem to a gem hosting service, e.g. RubyGems.
Finally add this to the Gemfile:
gem 'bandwidth-sdk', '~> 1.0.0'
If the Ruby gem is hosted at a git repository: https://github.com/GIT_USER_ID/GIT_REPO_ID, then add the following in the Gemfile:
gem 'bandwidth-sdk', :git => 'https://github.com/GIT_USER_ID/GIT_REPO_ID.git'
Include the Ruby code directly using -I as follows:
ruby -Ilib script.rbPlease follow the installation procedure and then run the following code:
# Load the gem
require 'bandwidth-sdk'
# Setup authorization
Bandwidth.configure do |config|
  # Configure HTTP basic authorization: Basic
  config.username = 'YOUR_USERNAME'
  config.password = 'YOUR_PASSWORD'
  # Configure faraday connection
  config.configure_faraday_connection { |connection| 'YOUR CONNECTION CONFIG PROC' }
end
api_instance = Bandwidth::CallsApi.new
account_id = '9900000' # String | Your Bandwidth Account ID.
create_call = Bandwidth::CreateCall.new({to: '+19195551234', from: '+15555551212', application_id: '1234-qwer-5679-tyui', answer_url: 'https://www.myCallbackServer.example/webhooks/answer'}) # CreateCall | JSON object containing information to create an outbound call
begin
  #Create Call
  result = api_instance.create_call(account_id, create_call)
  p result
rescue Bandwidth::ApiError => e
  puts "Exception when calling CallsApi->create_call: #{e}"
endAll URIs are relative to http://localhost
| Class | Method | HTTP request | Description | 
|---|---|---|---|
| Bandwidth::CallsApi | create_call | POST /accounts/{accountId}/calls | Create Call | 
| Bandwidth::CallsApi | get_call_state | GET /accounts/{accountId}/calls/{callId} | Get Call State Information | 
| Bandwidth::CallsApi | list_calls | GET /accounts/{accountId}/calls | Get Calls | 
| Bandwidth::CallsApi | update_call | POST /accounts/{accountId}/calls/{callId} | Update Call | 
| Bandwidth::CallsApi | update_call_bxml | PUT /accounts/{accountId}/calls/{callId}/bxml | Update Call BXML | 
| Bandwidth::ConferencesApi | download_conference_recording | GET /accounts/{accountId}/conferences/{conferenceId}/recordings/{recordingId}/media | Download Conference Recording | 
| Bandwidth::ConferencesApi | get_conference | GET /accounts/{accountId}/conferences/{conferenceId} | Get Conference Information | 
| Bandwidth::ConferencesApi | get_conference_member | GET /accounts/{accountId}/conferences/{conferenceId}/members/{memberId} | Get Conference Member | 
| Bandwidth::ConferencesApi | get_conference_recording | GET /accounts/{accountId}/conferences/{conferenceId}/recordings/{recordingId} | Get Conference Recording Information | 
| Bandwidth::ConferencesApi | list_conference_recordings | GET /accounts/{accountId}/conferences/{conferenceId}/recordings | Get Conference Recordings | 
| Bandwidth::ConferencesApi | list_conferences | GET /accounts/{accountId}/conferences | Get Conferences | 
| Bandwidth::ConferencesApi | update_conference | POST /accounts/{accountId}/conferences/{conferenceId} | Update Conference | 
| Bandwidth::ConferencesApi | update_conference_bxml | PUT /accounts/{accountId}/conferences/{conferenceId}/bxml | Update Conference BXML | 
| Bandwidth::ConferencesApi | update_conference_member | PUT /accounts/{accountId}/conferences/{conferenceId}/members/{memberId} | Update Conference Member | 
| Bandwidth::MFAApi | generate_messaging_code | POST /accounts/{accountId}/code/messaging | Messaging Authentication Code | 
| Bandwidth::MFAApi | generate_voice_code | POST /accounts/{accountId}/code/voice | Voice Authentication Code | 
| Bandwidth::MFAApi | verify_code | POST /accounts/{accountId}/code/verify | Verify Authentication Code | 
| Bandwidth::MediaApi | delete_media | DELETE /users/{accountId}/media/{mediaId} | Delete Media | 
| Bandwidth::MediaApi | get_media | GET /users/{accountId}/media/{mediaId} | Get Media | 
| Bandwidth::MediaApi | list_media | GET /users/{accountId}/media | List Media | 
| Bandwidth::MediaApi | upload_media | PUT /users/{accountId}/media/{mediaId} | Upload Media | 
| Bandwidth::MessagesApi | create_message | POST /users/{accountId}/messages | Create Message | 
| Bandwidth::MessagesApi | list_messages | GET /users/{accountId}/messages | List Messages | 
| Bandwidth::MultiChannelApi | create_multi_channel_message | POST /users/{accountId}/messages/multiChannel | Create Multi-Channel Message | 
| Bandwidth::PhoneNumberLookupApi | create_lookup | POST /accounts/{accountId}/tnlookup | Create Lookup | 
| Bandwidth::PhoneNumberLookupApi | get_lookup_status | GET /accounts/{accountId}/tnlookup/{requestId} | Get Lookup Request Status | 
| Bandwidth::RecordingsApi | delete_recording | DELETE /accounts/{accountId}/calls/{callId}/recordings/{recordingId} | Delete Recording | 
| Bandwidth::RecordingsApi | delete_recording_media | DELETE /accounts/{accountId}/calls/{callId}/recordings/{recordingId}/media | Delete Recording Media | 
| Bandwidth::RecordingsApi | delete_recording_transcription | DELETE /accounts/{accountId}/calls/{callId}/recordings/{recordingId}/transcription | Delete Transcription | 
| Bandwidth::RecordingsApi | download_call_recording | GET /accounts/{accountId}/calls/{callId}/recordings/{recordingId}/media | Download Recording | 
| Bandwidth::RecordingsApi | get_call_recording | GET /accounts/{accountId}/calls/{callId}/recordings/{recordingId} | Get Call Recording | 
| Bandwidth::RecordingsApi | get_recording_transcription | GET /accounts/{accountId}/calls/{callId}/recordings/{recordingId}/transcription | Get Transcription | 
| Bandwidth::RecordingsApi | list_account_call_recordings | GET /accounts/{accountId}/recordings | Get Call Recordings | 
| Bandwidth::RecordingsApi | list_call_recordings | GET /accounts/{accountId}/calls/{callId}/recordings | List Call Recordings | 
| Bandwidth::RecordingsApi | transcribe_call_recording | POST /accounts/{accountId}/calls/{callId}/recordings/{recordingId}/transcription | Create Transcription Request | 
| Bandwidth::RecordingsApi | update_call_recording_state | PUT /accounts/{accountId}/calls/{callId}/recording | Update Recording | 
| Bandwidth::StatisticsApi | get_statistics | GET /accounts/{accountId}/statistics | Get Account Statistics | 
| Bandwidth::TollFreeVerificationApi | create_webhook_subscription | POST /accounts/{accountId}/tollFreeVerification/webhooks/subscriptions | Create Webhook Subscription | 
| Bandwidth::TollFreeVerificationApi | delete_verification_request | DELETE /accounts/{accountId}/phoneNumbers/{phoneNumber}/tollFreeVerification | Delete a Toll-Free Verification Submission | 
| Bandwidth::TollFreeVerificationApi | delete_webhook_subscription | DELETE /accounts/{accountId}/tollFreeVerification/webhooks/subscriptions/{id} | Delete Webhook Subscription | 
| Bandwidth::TollFreeVerificationApi | get_toll_free_verification_status | GET /accounts/{accountId}/phoneNumbers/{phoneNumber}/tollFreeVerification | Get Toll-Free Verification Status | 
| Bandwidth::TollFreeVerificationApi | list_toll_free_use_cases | GET /tollFreeVerification/useCases | List Toll-Free Use Cases | 
| Bandwidth::TollFreeVerificationApi | list_webhook_subscriptions | GET /accounts/{accountId}/tollFreeVerification/webhooks/subscriptions | List Webhook Subscriptions | 
| Bandwidth::TollFreeVerificationApi | request_toll_free_verification | POST /accounts/{accountId}/tollFreeVerification | Request Toll-Free Verification | 
| Bandwidth::TollFreeVerificationApi | update_toll_free_verification_request | PUT /accounts/{accountId}/phoneNumbers/{phoneNumber}/tollFreeVerification | Update Toll-Free Verification Request | 
| Bandwidth::TollFreeVerificationApi | update_webhook_subscription | PUT /accounts/{accountId}/tollFreeVerification/webhooks/subscriptions/{id} | Update Webhook Subscription | 
| Bandwidth::TranscriptionsApi | delete_real_time_transcription | DELETE /accounts/{accountId}/calls/{callId}/transcriptions/{transcriptionId} | Delete Real-time Transcription | 
| Bandwidth::TranscriptionsApi | get_real_time_transcription | GET /accounts/{accountId}/calls/{callId}/transcriptions/{transcriptionId} | Get Real-time Transcription | 
| Bandwidth::TranscriptionsApi | list_real_time_transcriptions | GET /accounts/{accountId}/calls/{callId}/transcriptions | List Real-time Transcriptions | 
- Bandwidth::AccountStatistics
- Bandwidth::AdditionalDenialReason
- Bandwidth::Address
- Bandwidth::AnswerCallback
- Bandwidth::BlockedWebhook
- Bandwidth::BridgeCompleteCallback
- Bandwidth::BridgeTargetCompleteCallback
- Bandwidth::BusinessEntityTypeEnum
- Bandwidth::BusinessRegistrationTypeEnum
- Bandwidth::CallDirectionEnum
- Bandwidth::CallRecordingMetadata
- Bandwidth::CallState
- Bandwidth::CallStateEnum
- Bandwidth::CallTranscription
- Bandwidth::CallTranscriptionDetectedLanguageEnum
- Bandwidth::CallTranscriptionMetadata
- Bandwidth::CallTranscriptionResponse
- Bandwidth::CallTranscriptionTrackEnum
- Bandwidth::Callback
- Bandwidth::CallbackMethodEnum
- Bandwidth::CardWidthEnum
- Bandwidth::CodeRequest
- Bandwidth::Conference
- Bandwidth::ConferenceCompletedCallback
- Bandwidth::ConferenceCreatedCallback
- Bandwidth::ConferenceMember
- Bandwidth::ConferenceMemberExitCallback
- Bandwidth::ConferenceMemberJoinCallback
- Bandwidth::ConferenceRecordingAvailableCallback
- Bandwidth::ConferenceRecordingMetadata
- Bandwidth::ConferenceRedirectCallback
- Bandwidth::ConferenceStateEnum
- Bandwidth::Contact
- Bandwidth::CreateCall
- Bandwidth::CreateCallResponse
- Bandwidth::CreateLookupResponse
- Bandwidth::CreateMessageRequestError
- Bandwidth::CreateMultiChannelMessageResponse
- Bandwidth::DisconnectCallback
- Bandwidth::Diversion
- Bandwidth::DtmfCallback
- Bandwidth::Error
- Bandwidth::ErrorObject
- Bandwidth::ErrorSource
- Bandwidth::FailureWebhook
- Bandwidth::FieldError
- Bandwidth::FileFormatEnum
- Bandwidth::GatherCallback
- Bandwidth::InboundCallback
- Bandwidth::InboundCallbackMessage
- Bandwidth::InboundCallbackTypeEnum
- Bandwidth::InitiateCallback
- Bandwidth::Link
- Bandwidth::LinksObject
- Bandwidth::ListMessageDirectionEnum
- Bandwidth::ListMessageItem
- Bandwidth::LookupRequest
- Bandwidth::LookupResult
- Bandwidth::LookupStatus
- Bandwidth::LookupStatusEnum
- Bandwidth::MachineDetectionCompleteCallback
- Bandwidth::MachineDetectionConfiguration
- Bandwidth::MachineDetectionModeEnum
- Bandwidth::MachineDetectionResult
- Bandwidth::Media
- Bandwidth::Message
- Bandwidth::MessageDirectionEnum
- Bandwidth::MessageRequest
- Bandwidth::MessageStatusEnum
- Bandwidth::MessageTypeEnum
- Bandwidth::MessagesList
- Bandwidth::MessagingCodeResponse
- Bandwidth::MessagingRequestError
- Bandwidth::MfaForbiddenRequestError
- Bandwidth::MfaRequestError
- Bandwidth::MfaUnauthorizedRequestError
- Bandwidth::MmsMessageContent
- Bandwidth::MmsMessageContentFile
- Bandwidth::MultiChannelAction
- Bandwidth::MultiChannelActionCalendarEvent
- Bandwidth::MultiChannelChannelListObject
- Bandwidth::MultiChannelChannelListObjectContent
- Bandwidth::MultiChannelError
- Bandwidth::MultiChannelMessageChannelEnum
- Bandwidth::MultiChannelMessageContent
- Bandwidth::MultiChannelMessageRequest
- Bandwidth::MultiChannelMessageResponseData
- Bandwidth::MultiChannelMessageResponseDataChannelListInner
- Bandwidth::OptInWorkflow
- Bandwidth::PageInfo
- Bandwidth::PriorityEnum
- Bandwidth::ProductTypeEnum
- Bandwidth::RbmActionBase
- Bandwidth::RbmActionDial
- Bandwidth::RbmActionOpenUrl
- Bandwidth::RbmActionTypeEnum
- Bandwidth::RbmActionViewLocation
- Bandwidth::RbmCardContent
- Bandwidth::RbmCardContentMedia
- Bandwidth::RbmLocationResponse
- Bandwidth::RbmMediaHeightEnum
- Bandwidth::RbmMessageCarouselCard
- Bandwidth::RbmMessageContentFile
- Bandwidth::RbmMessageContentRichCard
- Bandwidth::RbmMessageContentText
- Bandwidth::RbmMessageMedia
- Bandwidth::RbmStandaloneCard
- Bandwidth::RbmSuggestionResponse
- Bandwidth::RecordingAvailableCallback
- Bandwidth::RecordingCompleteCallback
- Bandwidth::RecordingStateEnum
- Bandwidth::RecordingTranscriptionMetadata
- Bandwidth::RecordingTranscriptions
- Bandwidth::RedirectCallback
- Bandwidth::RedirectMethodEnum
- Bandwidth::SmsMessageContent
- Bandwidth::StandaloneCardOrientationEnum
- Bandwidth::StatusCallback
- Bandwidth::StatusCallbackMessage
- Bandwidth::StatusCallbackTypeEnum
- Bandwidth::StirShaken
- Bandwidth::TelephoneNumber
- Bandwidth::TfvBasicAuthentication
- Bandwidth::TfvCallbackStatusEnum
- Bandwidth::TfvError
- Bandwidth::TfvStatus
- Bandwidth::TfvStatusEnum
- Bandwidth::TfvSubmissionInfo
- Bandwidth::TfvSubmissionWrapper
- Bandwidth::ThumbnailAlignmentEnum
- Bandwidth::TnLookupRequestError
- Bandwidth::TranscribeRecording
- Bandwidth::Transcription
- Bandwidth::TranscriptionAvailableCallback
- Bandwidth::TransferAnswerCallback
- Bandwidth::TransferCompleteCallback
- Bandwidth::TransferDisconnectCallback
- Bandwidth::UpdateCall
- Bandwidth::UpdateCallRecording
- Bandwidth::UpdateConference
- Bandwidth::UpdateConferenceMember
- Bandwidth::VerificationDenialWebhook
- Bandwidth::VerificationRequest
- Bandwidth::VerificationUpdateRequest
- Bandwidth::VerificationWebhook
- Bandwidth::VerifyCodeRequest
- Bandwidth::VerifyCodeResponse
- Bandwidth::VoiceApiError
- Bandwidth::VoiceCodeResponse
- Bandwidth::WebhookSubscription
- Bandwidth::WebhookSubscriptionBasicAuthentication
- Bandwidth::WebhookSubscriptionRequestSchema
- Bandwidth::WebhookSubscriptionTypeEnum
- Bandwidth::WebhookSubscriptionsListBody
Authentication schemes defined for the API:
- Type: HTTP basic authentication