twilio.rest.messaging.v1 package

Submodules

twilio.rest.messaging.v1.deactivation module

This code was generated by / _ _ _| _ _

(_)/(_)(_|/| |(/_ v1.0.0 / /
class twilio.rest.messaging.v1.deactivation.DeactivationsContext(version)[source]

Bases: twilio.base.instance_context.InstanceContext

fetch(date=<object object>)[source]

Fetch the DeactivationsInstance

Parameters:date (date) – The date to retrieve deactivated numbers for.
Returns:The fetched DeactivationsInstance
Return type:twilio.rest.messaging.v1.deactivation.DeactivationsInstance
class twilio.rest.messaging.v1.deactivation.DeactivationsInstance(version, payload)[source]

Bases: twilio.base.instance_resource.InstanceResource

fetch(date=<object object>)[source]

Fetch the DeactivationsInstance

Parameters:date (date) – The date to retrieve deactivated numbers for.
Returns:The fetched DeactivationsInstance
Return type:twilio.rest.messaging.v1.deactivation.DeactivationsInstance
redirect_to
Returns:Redirect url to the list of deactivated numbers.
Return type:unicode
class twilio.rest.messaging.v1.deactivation.DeactivationsList(version)[source]

Bases: twilio.base.list_resource.ListResource

get()[source]

Constructs a DeactivationsContext

Returns:twilio.rest.messaging.v1.deactivation.DeactivationsContext
Return type:twilio.rest.messaging.v1.deactivation.DeactivationsContext
class twilio.rest.messaging.v1.deactivation.DeactivationsPage(version, response, solution)[source]

Bases: twilio.base.page.Page

get_instance(payload)[source]

Build an instance of DeactivationsInstance

Parameters:payload (dict) – Payload response from the API
Returns:twilio.rest.messaging.v1.deactivation.DeactivationsInstance
Return type:twilio.rest.messaging.v1.deactivation.DeactivationsInstance

twilio.rest.messaging.v1.external_campaign module

This code was generated by / _ _ _| _ _

(_)/(_)(_|/| |(/_ v1.0.0 / /
class twilio.rest.messaging.v1.external_campaign.ExternalCampaignInstance(version, payload)[source]

Bases: twilio.base.instance_resource.InstanceResource

PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.

account_sid
Returns:The SID of the Account that created the resource
Return type:unicode
campaign_id
Returns:ID of the preregistered campaign.
Return type:unicode
date_created
Returns:The ISO 8601 date and time in GMT when the resource was created
Return type:datetime
messaging_service_sid
Returns:The SID of the Messaging Service the resource is associated with
Return type:unicode
sid
Returns:The unique string that identifies a US A2P Compliance resource
Return type:unicode
class twilio.rest.messaging.v1.external_campaign.ExternalCampaignList(version)[source]

Bases: twilio.base.list_resource.ListResource

PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.

create(campaign_id, messaging_service_sid)[source]

Create the ExternalCampaignInstance

Parameters:
  • campaign_id (unicode) – ID of the preregistered campaign.
  • messaging_service_sid (unicode) – The SID of the Messaging Service the resource is associated with
Returns:

The created ExternalCampaignInstance

Return type:

twilio.rest.messaging.v1.external_campaign.ExternalCampaignInstance

class twilio.rest.messaging.v1.external_campaign.ExternalCampaignPage(version, response, solution)[source]

Bases: twilio.base.page.Page

PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.

get_instance(payload)[source]

Build an instance of ExternalCampaignInstance

Parameters:payload (dict) – Payload response from the API
Returns:twilio.rest.messaging.v1.external_campaign.ExternalCampaignInstance
Return type:twilio.rest.messaging.v1.external_campaign.ExternalCampaignInstance

twilio.rest.messaging.v1.tollfree_verification module

This code was generated by / _ _ _| _ _

(_)/(_)(_|/| |(/_ v1.0.0 / /
class twilio.rest.messaging.v1.tollfree_verification.TollfreeVerificationContext(version, sid)[source]

Bases: twilio.base.instance_context.InstanceContext

PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.

fetch()[source]

Fetch the TollfreeVerificationInstance

Returns:The fetched TollfreeVerificationInstance
Return type:twilio.rest.messaging.v1.tollfree_verification.TollfreeVerificationInstance
class twilio.rest.messaging.v1.tollfree_verification.TollfreeVerificationInstance(version, payload, sid=None)[source]

Bases: twilio.base.instance_resource.InstanceResource

PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.

class OptInType[source]

Bases: object

MOBILE_QR_CODE = 'MOBILE_QR_CODE'
PAPER_FORM = 'PAPER_FORM'
VERBAL = 'VERBAL'
VIA_TEXT = 'VIA_TEXT'
WEB_FORM = 'WEB_FORM'
class Status[source]

Bases: object

IN_REVIEW = 'IN_REVIEW'
PENDING_REVIEW = 'PENDING_REVIEW'
TWILIO_APPROVED = 'TWILIO_APPROVED'
TWILIO_REJECTED = 'TWILIO_REJECTED'
account_sid
Returns:The SID of the Account that created the resource
Return type:unicode
additional_information
Returns:Additional information to be provided for verification
Return type:unicode
business_city
Returns:The city of the business or organization using the Tollfree number
Return type:unicode
business_contact_email
Returns:The email address of the contact for the business or organization using the Tollfree number
Return type:unicode
business_contact_first_name
Returns:The first name of the contact for the business or organization using the Tollfree number
Return type:unicode
business_contact_last_name
Returns:The last name of the contact for the business or organization using the Tollfree number
Return type:unicode
business_contact_phone
Returns:The phone number of the contact for the business or organization using the Tollfree number
Return type:unicode
business_country
Returns:The country of the business or organization using the Tollfree number
Return type:unicode
business_name
Returns:The name of the business or organization using the Tollfree number
Return type:unicode
business_postal_code
Returns:The postal code of the business or organization using the Tollfree number
Return type:unicode
business_state_province_region
Returns:The state/province/region of the business or organization using the Tollfree number
Return type:unicode
business_street_address
Returns:The address of the business or organization using the Tollfree number
Return type:unicode
business_street_address2
Returns:The address of the business or organization using the Tollfree number
Return type:unicode
business_website
Returns:The website of the business or organization using the Tollfree number
Return type:unicode
customer_profile_sid
Returns:Customer’s Profile Bundle BundleSid
Return type:unicode
date_created
Returns:The ISO 8601 date and time in GMT when the resource was created
Return type:datetime
date_updated
Returns:The ISO 8601 date and time in GMT when the resource was last updated
Return type:datetime
fetch()[source]

Fetch the TollfreeVerificationInstance

Returns:The fetched TollfreeVerificationInstance
Return type:twilio.rest.messaging.v1.tollfree_verification.TollfreeVerificationInstance
message_volume
Returns:Estimate monthly volume of messages from the Tollfree Number
Return type:unicode
notification_email
Returns:The email address to receive the notification about the verification result.
Return type:unicode
opt_in_image_urls
Returns:Link to an image that shows the opt-in workflow. Multiple images allowed and must be a publicly hosted URL
Return type:list[unicode]
opt_in_type
Returns:Describe how a user opts-in to text messages
Return type:TollfreeVerificationInstance.OptInType
production_message_sample
Returns:An example of message content, i.e. a sample message
Return type:unicode
regulated_item_sid
Returns:The SID of the Regulated Item
Return type:unicode
Returns:The URLs of the documents associated with the Tollfree Verification resource
Return type:dict
sid
Returns:Tollfree Verification Sid
Return type:unicode
status
Returns:The compliance status of the Tollfree Verification record.
Return type:TollfreeVerificationInstance.Status
tollfree_phone_number_sid
Returns:The SID of the Phone Number associated with the Tollfree Verification
Return type:unicode
trust_product_sid
Returns:Tollfree TrustProduct Bundle BundleSid
Return type:unicode
url
Returns:The absolute URL of the Tollfree Verification
Return type:unicode
use_case_categories
Returns:The category of the use case for the Tollfree Number. List as many are applicable.
Return type:list[unicode]
use_case_summary
Returns:Further explaination on how messaging is used by the business or organization
Return type:unicode
class twilio.rest.messaging.v1.tollfree_verification.TollfreeVerificationList(version)[source]

Bases: twilio.base.list_resource.ListResource

PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.

create(business_name, business_website, notification_email, use_case_categories, use_case_summary, production_message_sample, opt_in_image_urls, opt_in_type, message_volume, tollfree_phone_number_sid, customer_profile_sid=<object object>, business_street_address=<object object>, business_street_address2=<object object>, business_city=<object object>, business_state_province_region=<object object>, business_postal_code=<object object>, business_country=<object object>, additional_information=<object object>, business_contact_first_name=<object object>, business_contact_last_name=<object object>, business_contact_email=<object object>, business_contact_phone=<object object>)[source]

Create the TollfreeVerificationInstance

Parameters:
  • business_name (unicode) – The name of the business or organization using the Tollfree number
  • business_website (unicode) – The website of the business or organization using the Tollfree number
  • notification_email (unicode) – The email address to receive the notification about the verification result.
  • use_case_categories (list[unicode]) – The category of the use case for the Tollfree Number. List as many are applicable.
  • use_case_summary (unicode) – Further explaination on how messaging is used by the business or organization
  • production_message_sample (unicode) – An example of message content, i.e. a sample message
  • opt_in_image_urls (list[unicode]) – Link to an image that shows the opt-in workflow. Multiple images allowed and must be a publicly hosted URL
  • opt_in_type (TollfreeVerificationInstance.OptInType) – Describe how a user opts-in to text messages
  • message_volume (unicode) – Estimate monthly volume of messages from the Tollfree Number
  • tollfree_phone_number_sid (unicode) – The SID of the Phone Number associated with the Tollfree Verification
  • customer_profile_sid (unicode) – Customer’s Profile Bundle BundleSid
  • business_street_address (unicode) – The address of the business or organization using the Tollfree number
  • business_street_address2 (unicode) – The address of the business or organization using the Tollfree number
  • business_city (unicode) – The city of the business or organization using the Tollfree number
  • business_state_province_region (unicode) – The state/province/region of the business or organization using the Tollfree number
  • business_postal_code (unicode) – The postal code of the business or organization using the Tollfree number
  • business_country (unicode) – The country of the business or organization using the Tollfree number
  • additional_information (unicode) – Additional information to be provided for verification
  • business_contact_first_name (unicode) – The first name of the contact for the business or organization using the Tollfree number
  • business_contact_last_name (unicode) – The last name of the contact for the business or organization using the Tollfree number
  • business_contact_email (unicode) – The email address of the contact for the business or organization using the Tollfree number
  • business_contact_phone (unicode) – The phone number of the contact for the business or organization using the Tollfree number
Returns:

The created TollfreeVerificationInstance

Return type:

twilio.rest.messaging.v1.tollfree_verification.TollfreeVerificationInstance

get(sid)[source]

Constructs a TollfreeVerificationContext

Parameters:sid – Tollfree Verification Sid
Returns:twilio.rest.messaging.v1.tollfree_verification.TollfreeVerificationContext
Return type:twilio.rest.messaging.v1.tollfree_verification.TollfreeVerificationContext
get_page(target_url)[source]

Retrieve a specific page of TollfreeVerificationInstance records from the API. Request is executed immediately

Parameters:target_url (str) – API-generated URL for the requested results page
Returns:Page of TollfreeVerificationInstance
Return type:twilio.rest.messaging.v1.tollfree_verification.TollfreeVerificationPage
list(tollfree_phone_number_sid=<object object>, status=<object object>, limit=None, page_size=None)[source]

Lists TollfreeVerificationInstance records from the API as a list. Unlike stream(), this operation is eager and will load limit records into memory before returning.

Parameters:
  • tollfree_phone_number_sid (unicode) – The SID of the Phone Number associated with the Tollfree Verification
  • status (TollfreeVerificationInstance.Status) – The compliance status of the Tollfree Verification record.
  • limit (int) – Upper limit for the number of records to return. list() guarantees never to return more than limit. Default is no limit
  • page_size (int) – Number of records to fetch per request, when not set will use the default value of 50 records. If no page_size is defined but a limit is defined, list() will attempt to read the limit with the most efficient page size, i.e. min(limit, 1000)
Returns:

Generator that will yield up to limit results

Return type:

list[twilio.rest.messaging.v1.tollfree_verification.TollfreeVerificationInstance]

page(tollfree_phone_number_sid=<object object>, status=<object object>, page_token=<object object>, page_number=<object object>, page_size=<object object>)[source]

Retrieve a single page of TollfreeVerificationInstance records from the API. Request is executed immediately

Parameters:
  • tollfree_phone_number_sid (unicode) – The SID of the Phone Number associated with the Tollfree Verification
  • status (TollfreeVerificationInstance.Status) – The compliance status of the Tollfree Verification record.
  • page_token (str) – PageToken provided by the API
  • page_number (int) – Page Number, this value is simply for client state
  • page_size (int) – Number of records to return, defaults to 50
Returns:

Page of TollfreeVerificationInstance

Return type:

twilio.rest.messaging.v1.tollfree_verification.TollfreeVerificationPage

stream(tollfree_phone_number_sid=<object object>, status=<object object>, limit=None, page_size=None)[source]

Streams TollfreeVerificationInstance records from the API as a generator stream. This operation lazily loads records as efficiently as possible until the limit is reached. The results are returned as a generator, so this operation is memory efficient.

Parameters:
  • tollfree_phone_number_sid (unicode) – The SID of the Phone Number associated with the Tollfree Verification
  • status (TollfreeVerificationInstance.Status) – The compliance status of the Tollfree Verification record.
  • limit (int) – Upper limit for the number of records to return. stream() guarantees to never return more than limit. Default is no limit
  • page_size (int) – Number of records to fetch per request, when not set will use the default value of 50 records. If no page_size is defined but a limit is defined, stream() will attempt to read the limit with the most efficient page size, i.e. min(limit, 1000)
Returns:

Generator that will yield up to limit results

Return type:

list[twilio.rest.messaging.v1.tollfree_verification.TollfreeVerificationInstance]

class twilio.rest.messaging.v1.tollfree_verification.TollfreeVerificationPage(version, response, solution)[source]

Bases: twilio.base.page.Page

PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.

get_instance(payload)[source]

Build an instance of TollfreeVerificationInstance

Parameters:payload (dict) – Payload response from the API
Returns:twilio.rest.messaging.v1.tollfree_verification.TollfreeVerificationInstance
Return type:twilio.rest.messaging.v1.tollfree_verification.TollfreeVerificationInstance

twilio.rest.messaging.v1.usecase module

This code was generated by / _ _ _| _ _

(_)/(_)(_|/| |(/_ v1.0.0 / /
class twilio.rest.messaging.v1.usecase.UsecaseInstance(version, payload)[source]

Bases: twilio.base.instance_resource.InstanceResource

PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.

usecases
Returns:Human readable Messaging Service Use Case details
Return type:list[dict]
class twilio.rest.messaging.v1.usecase.UsecaseList(version)[source]

Bases: twilio.base.list_resource.ListResource

PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.

fetch()[source]

Fetch the UsecaseInstance

Returns:The fetched UsecaseInstance
Return type:twilio.rest.messaging.v1.usecase.UsecaseInstance
class twilio.rest.messaging.v1.usecase.UsecasePage(version, response, solution)[source]

Bases: twilio.base.page.Page

PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.

get_instance(payload)[source]

Build an instance of UsecaseInstance

Parameters:payload (dict) – Payload response from the API
Returns:twilio.rest.messaging.v1.usecase.UsecaseInstance
Return type:twilio.rest.messaging.v1.usecase.UsecaseInstance

Module contents

This code was generated by / _ _ _| _ _

(_)/(_)(_|/| |(/_ v1.0.0 / /
class twilio.rest.messaging.v1.V1(domain)[source]

Bases: twilio.base.version.Version

brand_registrations
Return type:twilio.rest.messaging.v1.brand_registration.BrandRegistrationList
deactivations
Return type:twilio.rest.messaging.v1.deactivation.DeactivationsList
external_campaign
Return type:twilio.rest.messaging.v1.external_campaign.ExternalCampaignList
services
Return type:twilio.rest.messaging.v1.service.ServiceList
tollfree_verifications
Return type:twilio.rest.messaging.v1.tollfree_verification.TollfreeVerificationList
usecases
Return type:twilio.rest.messaging.v1.usecase.UsecaseList