Class: Telnyx::Resources::MessagingTollfree::Verification::Requests

Inherits:
Object
  • Object
show all
Defined in:
lib/telnyx/resources/messaging_tollfree/verification/requests.rb

Overview

Manage your tollfree verification requests

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ Requests

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of Requests.

Parameters:



314
315
316
# File 'lib/telnyx/resources/messaging_tollfree/verification/requests.rb', line 314

def initialize(client:)
  @client = client
end

Instance Method Details

#create(additional_information:, business_addr1:, business_city:, business_contact_email:, business_contact_first_name:, business_contact_last_name:, business_contact_phone:, business_name:, business_state:, business_zip:, corporate_website:, message_volume:, opt_in_workflow:, opt_in_workflow_image_urls:, phone_numbers:, production_message_content:, use_case:, use_case_summary:, age_gated_content: nil, business_addr2: nil, business_registration_country: nil, business_registration_number: nil, business_registration_type: nil, campaign_verify_authorization_token: nil, doing_business_as: nil, entity_type: nil, help_message_response: nil, isv_reseller: nil, opt_in_confirmation_response: nil, opt_in_keywords: nil, privacy_policy_url: nil, terms_and_condition_url: nil, webhook_url: nil, request_options: {}) ⇒ Telnyx::Models::MessagingTollfree::Verification::VerificationRequestEgress

Some parameter documentations has been truncated, see Models::MessagingTollfree::Verification::RequestCreateParams for more details.

Submit a new tollfree verification request

Parameters:

  • additional_information (String)

    Any additional information

  • business_addr1 (String)

    Line 1 of the business address

  • business_city (String)

    The city of the business address; the first letter should be capitalized

  • business_contact_email (String)

    The email address of the business contact

  • business_contact_first_name (String)

    First name of the business contact; there are no specific requirements on format

  • business_contact_last_name (String)

    Last name of the business contact; there are no specific requirements on formatt

  • business_contact_phone (String)

    The phone number of the business contact in E.164 format

  • business_name (String)

    Name of the business; there are no specific formatting requirements

  • business_state (String)

    The full name of the state (not the 2 letter code) of the business address; the

  • business_zip (String)

    The ZIP code of the business address

  • corporate_website (String)

    A URL, including the scheme, pointing to the corporate website

  • message_volume (Symbol, Telnyx::Models::MessagingTollfree::Verification::Volume)

    Message Volume Enums

  • opt_in_workflow (String)

    Human-readable description of how end users will opt into receiving messages fro

  • opt_in_workflow_image_urls (Array<Telnyx::Models::MessagingTollfree::Verification::URL>)

    Images showing the opt-in workflow

  • phone_numbers (Array<Telnyx::Models::MessagingTollfree::Verification::TfPhoneNumber>)

    The phone numbers to request the verification of

  • production_message_content (String)

    An example of a message that will be sent from the given phone numbers

  • use_case (Symbol, Telnyx::Models::MessagingTollfree::Verification::UseCaseCategories)

    Tollfree usecase categories

  • use_case_summary (String)

    Human-readable summary of the desired use-case

  • age_gated_content (Boolean)

    Indicates if messaging content requires age gating (e.g., 18+). Defaults to fals

  • business_addr2 (String)

    Line 2 of the business address

  • business_registration_country (String, nil)

    ISO 3166-1 alpha-2 country code of the issuing business authority. Must be exact

  • business_registration_number (String, nil)

    Official business registration number (e.g., Employer Identification Number (EIN

  • business_registration_type (String, nil)

    Type of business registration being provided. Required from January 2026.

  • campaign_verify_authorization_token (String, nil)

    Campaign Verify Authorization Token required for Political use case submissions

  • doing_business_as (String, nil)

    Doing Business As (DBA) name if different from legal name

  • entity_type (Symbol, Telnyx::Models::MessagingTollfree::Verification::TollFreeVerificationEntityType, nil)

    Business entity classification

  • help_message_response (String, nil)

    The message returned when users text ‘HELP’

  • isv_reseller (String, nil)

    ISV name

  • opt_in_confirmation_response (String, nil)

    Message sent to users confirming their opt-in to receive messages

  • opt_in_keywords (String, nil)

    Keywords used to collect and process consumer opt-ins

  • privacy_policy_url (String, nil)

    URL pointing to the business’s privacy policy. Plain string, no URL format valid

  • terms_and_condition_url (String, nil)

    URL pointing to the business’s terms and conditions. Plain string, no URL format

  • webhook_url (String)

    URL that should receive webhooks relating to this verification request

  • request_options (Telnyx::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

See Also:



88
89
90
91
92
93
94
95
96
97
# File 'lib/telnyx/resources/messaging_tollfree/verification/requests.rb', line 88

def create(params)
  parsed, options = Telnyx::MessagingTollfree::Verification::RequestCreateParams.dump_request(params)
  @client.request(
    method: :post,
    path: "messaging_tollfree/verification/requests",
    body: parsed,
    model: Telnyx::MessagingTollfree::Verification::VerificationRequestEgress,
    options: options
  )
end

#delete(id, request_options: {}) ⇒ nil

Delete a verification request

A request may only be deleted when when the request is in the “rejected” state.

  • ‘HTTP 200`: request successfully deleted

  • ‘HTTP 400`: request exists but can’t be deleted (i.e. not rejected)

  • ‘HTTP 404`: request unknown or already deleted

Parameters:

Returns:

  • (nil)

See Also:



267
268
269
270
271
272
273
274
# File 'lib/telnyx/resources/messaging_tollfree/verification/requests.rb', line 267

def delete(id, params = {})
  @client.request(
    method: :delete,
    path: ["messaging_tollfree/verification/requests/%1$s", id],
    model: NilClass,
    options: params[:request_options]
  )
end

#list(page:, page_size:, business_name: nil, date_end: nil, date_start: nil, phone_number: nil, status: nil, request_options: {}) ⇒ Telnyx::Internal::DefaultPaginationForMessagingTollfree<Telnyx::Models::MessagingTollfree::Verification::VerificationRequestStatus>

Some parameter documentations has been truncated, see Models::MessagingTollfree::Verification::RequestListParams for more details.

Get a list of previously-submitted tollfree verification requests

Parameters:

Returns:

See Also:



238
239
240
241
242
243
244
245
246
247
248
249
# File 'lib/telnyx/resources/messaging_tollfree/verification/requests.rb', line 238

def list(params)
  parsed, options = Telnyx::MessagingTollfree::Verification::RequestListParams.dump_request(params)
  query = Telnyx::Internal::Util.encode_query_params(parsed)
  @client.request(
    method: :get,
    path: "messaging_tollfree/verification/requests",
    query: query,
    page: Telnyx::Internal::DefaultPaginationForMessagingTollfree,
    model: Telnyx::MessagingTollfree::Verification::VerificationRequestStatus,
    options: options
  )
end

#retrieve(id, request_options: {}) ⇒ Telnyx::Models::MessagingTollfree::Verification::VerificationRequestStatus

Get a single verification request by its ID.



109
110
111
112
113
114
115
116
# File 'lib/telnyx/resources/messaging_tollfree/verification/requests.rb', line 109

def retrieve(id, params = {})
  @client.request(
    method: :get,
    path: ["messaging_tollfree/verification/requests/%1$s", id],
    model: Telnyx::MessagingTollfree::Verification::VerificationRequestStatus,
    options: params[:request_options]
  )
end

#retrieve_status_history(id, page_number:, page_size:, request_options: {}) ⇒ Telnyx::Models::MessagingTollfree::Verification::RequestRetrieveStatusHistoryResponse

Some parameter documentations has been truncated, see Models::MessagingTollfree::Verification::RequestRetrieveStatusHistoryParams for more details.

Get the history of status changes for a verification request.

Returns a paginated list of historical status changes including the reason for each change and when it occurred.

Parameters:

  • id (String)
  • page_number (Integer)
  • page_size (Integer)

    Request this many records per page. This value is automatically clamped if the p

  • request_options (Telnyx::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

See Also:



298
299
300
301
302
303
304
305
306
307
308
309
# File 'lib/telnyx/resources/messaging_tollfree/verification/requests.rb', line 298

def retrieve_status_history(id, params)
  parsed, options =
    Telnyx::MessagingTollfree::Verification::RequestRetrieveStatusHistoryParams.dump_request(params)
  query = Telnyx::Internal::Util.encode_query_params(parsed)
  @client.request(
    method: :get,
    path: ["messaging_tollfree/verification/requests/%1$s/status_history", id],
    query: query.transform_keys(page_number: "page[number]", page_size: "page[size]"),
    model: Telnyx::Models::MessagingTollfree::Verification::RequestRetrieveStatusHistoryResponse,
    options: options
  )
end

#update(id, additional_information:, business_addr1:, business_city:, business_contact_email:, business_contact_first_name:, business_contact_last_name:, business_contact_phone:, business_name:, business_state:, business_zip:, corporate_website:, message_volume:, opt_in_workflow:, opt_in_workflow_image_urls:, phone_numbers:, production_message_content:, use_case:, use_case_summary:, age_gated_content: nil, business_addr2: nil, business_registration_country: nil, business_registration_number: nil, business_registration_type: nil, campaign_verify_authorization_token: nil, doing_business_as: nil, entity_type: nil, help_message_response: nil, isv_reseller: nil, opt_in_confirmation_response: nil, opt_in_keywords: nil, privacy_policy_url: nil, terms_and_condition_url: nil, webhook_url: nil, request_options: {}) ⇒ Telnyx::Models::MessagingTollfree::Verification::VerificationRequestEgress

Some parameter documentations has been truncated, see Models::MessagingTollfree::Verification::RequestUpdateParams for more details.

Update an existing tollfree verification request. This is particularly useful when there are pending customer actions to be taken.

Parameters:

  • id (String)
  • additional_information (String)

    Any additional information

  • business_addr1 (String)

    Line 1 of the business address

  • business_city (String)

    The city of the business address; the first letter should be capitalized

  • business_contact_email (String)

    The email address of the business contact

  • business_contact_first_name (String)

    First name of the business contact; there are no specific requirements on format

  • business_contact_last_name (String)

    Last name of the business contact; there are no specific requirements on formatt

  • business_contact_phone (String)

    The phone number of the business contact in E.164 format

  • business_name (String)

    Name of the business; there are no specific formatting requirements

  • business_state (String)

    The full name of the state (not the 2 letter code) of the business address; the

  • business_zip (String)

    The ZIP code of the business address

  • corporate_website (String)

    A URL, including the scheme, pointing to the corporate website

  • message_volume (Symbol, Telnyx::Models::MessagingTollfree::Verification::Volume)

    Message Volume Enums

  • opt_in_workflow (String)

    Human-readable description of how end users will opt into receiving messages fro

  • opt_in_workflow_image_urls (Array<Telnyx::Models::MessagingTollfree::Verification::URL>)

    Images showing the opt-in workflow

  • phone_numbers (Array<Telnyx::Models::MessagingTollfree::Verification::TfPhoneNumber>)

    The phone numbers to request the verification of

  • production_message_content (String)

    An example of a message that will be sent from the given phone numbers

  • use_case (Symbol, Telnyx::Models::MessagingTollfree::Verification::UseCaseCategories)

    Tollfree usecase categories

  • use_case_summary (String)

    Human-readable summary of the desired use-case

  • age_gated_content (Boolean)

    Indicates if messaging content requires age gating (e.g., 18+). Defaults to fals

  • business_addr2 (String)

    Line 2 of the business address

  • business_registration_country (String, nil)

    ISO 3166-1 alpha-2 country code of the issuing business authority. Must be exact

  • business_registration_number (String, nil)

    Official business registration number (e.g., Employer Identification Number (EIN

  • business_registration_type (String, nil)

    Type of business registration being provided. Required from January 2026.

  • campaign_verify_authorization_token (String, nil)

    Campaign Verify Authorization Token required for Political use case submissions

  • doing_business_as (String, nil)

    Doing Business As (DBA) name if different from legal name

  • entity_type (Symbol, Telnyx::Models::MessagingTollfree::Verification::TollFreeVerificationEntityType, nil)

    Business entity classification

  • help_message_response (String, nil)

    The message returned when users text ‘HELP’

  • isv_reseller (String, nil)

    ISV name

  • opt_in_confirmation_response (String, nil)

    Message sent to users confirming their opt-in to receive messages

  • opt_in_keywords (String, nil)

    Keywords used to collect and process consumer opt-ins

  • privacy_policy_url (String, nil)

    URL pointing to the business’s privacy policy. Plain string, no URL format valid

  • terms_and_condition_url (String, nil)

    URL pointing to the business’s terms and conditions. Plain string, no URL format

  • webhook_url (String)

    URL that should receive webhooks relating to this verification request

  • request_options (Telnyx::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

See Also:



200
201
202
203
204
205
206
207
208
209
# File 'lib/telnyx/resources/messaging_tollfree/verification/requests.rb', line 200

def update(id, params)
  parsed, options = Telnyx::MessagingTollfree::Verification::RequestUpdateParams.dump_request(params)
  @client.request(
    method: :patch,
    path: ["messaging_tollfree/verification/requests/%1$s", id],
    body: parsed,
    model: Telnyx::MessagingTollfree::Verification::VerificationRequestEgress,
    options: options
  )
end