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.domain_cert module

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

(_)/(_)(_|/| |(/_ v1.0.0 / /
class twilio.rest.messaging.v1.domain_cert.DomainCertsContext(version, domain_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.

delete()[source]

Deletes the DomainCertsInstance

Returns:True if delete succeeds, False otherwise
Return type:bool
fetch()[source]

Fetch the DomainCertsInstance

Returns:The fetched DomainCertsInstance
Return type:twilio.rest.messaging.v1.domain_cert.DomainCertsInstance
update(tls_cert)[source]

Update the DomainCertsInstance

Parameters:tls_cert (unicode) – Certificate and private key information for this domain.
Returns:The updated DomainCertsInstance
Return type:twilio.rest.messaging.v1.domain_cert.DomainCertsInstance
class twilio.rest.messaging.v1.domain_cert.DomainCertsInstance(version, payload, domain_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.

certificate_sid
Returns:The unique string that we created to identify this Certificate resource.
Return type:unicode
date_created
Returns:Date this Domain SID was created.
Return type:datetime
date_expires
Returns:Expiration date for your private certificate.
Return type:datetime
date_updated
Returns:Date that this Domain was last updated.
Return type:datetime
delete()[source]

Deletes the DomainCertsInstance

Returns:True if delete succeeds, False otherwise
Return type:bool
domain_name
Returns:Full url path for this domain.
Return type:unicode
domain_sid
Returns:The unique string that we created to identify the Domain resource.
Return type:unicode
fetch()[source]

Fetch the DomainCertsInstance

Returns:The fetched DomainCertsInstance
Return type:twilio.rest.messaging.v1.domain_cert.DomainCertsInstance
update(tls_cert)[source]

Update the DomainCertsInstance

Parameters:tls_cert (unicode) – Certificate and private key information for this domain.
Returns:The updated DomainCertsInstance
Return type:twilio.rest.messaging.v1.domain_cert.DomainCertsInstance
url
Returns:The url
Return type:unicode
validated
Returns:Certificate validation field
Return type:bool
class twilio.rest.messaging.v1.domain_cert.DomainCertsList(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.

get(domain_sid)[source]

Constructs a DomainCertsContext

Parameters:domain_sid – Unique string used to identify the domain that this certificate should be associated with.
Returns:twilio.rest.messaging.v1.domain_cert.DomainCertsContext
Return type:twilio.rest.messaging.v1.domain_cert.DomainCertsContext
class twilio.rest.messaging.v1.domain_cert.DomainCertsPage(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 DomainCertsInstance

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

twilio.rest.messaging.v1.domain_config module

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

(_)/(_)(_|/| |(/_ v1.0.0 / /
class twilio.rest.messaging.v1.domain_config.DomainConfigContext(version, domain_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 DomainConfigInstance

Returns:The fetched DomainConfigInstance
Return type:twilio.rest.messaging.v1.domain_config.DomainConfigInstance
update(messaging_service_sids, fallback_url=<object object>, callback_url=<object object>, messaging_service_sids_action=<object object>)[source]

Update the DomainConfigInstance

Parameters:
  • messaging_service_sids (list[unicode]) – A list of messagingServiceSids (with prefix MG)
  • fallback_url (unicode) – We will redirect requests to urls we are unable to identify to this url.
  • callback_url (unicode) – URL to receive click events to your webhook whenever the recipients click on the shortened links
  • messaging_service_sids_action (unicode) – An action type for messaging_service_sids operation (ADD, DELETE, REPLACE)
Returns:

The updated DomainConfigInstance

Return type:

twilio.rest.messaging.v1.domain_config.DomainConfigInstance

class twilio.rest.messaging.v1.domain_config.DomainConfigInstance(version, payload, domain_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.

callback_url
Returns:URL to receive click events to your webhook whenever the recipients click on the shortened links.
Return type:unicode
config_sid
Returns:The unique string that we created to identify the Domain config (prefix ZK).
Return type:unicode
date_created
Returns:Date this Domain Config was created.
Return type:datetime
date_updated
Returns:Date that this Domain Config was last updated.
Return type:datetime
domain_sid
Returns:The unique string that we created to identify the Domain resource.
Return type:unicode
fallback_url
Returns:We will redirect requests to urls we are unable to identify to this url.
Return type:unicode
fetch()[source]

Fetch the DomainConfigInstance

Returns:The fetched DomainConfigInstance
Return type:twilio.rest.messaging.v1.domain_config.DomainConfigInstance
messaging_service_sids
Returns:A list of messagingServiceSids (with prefix MG).
Return type:list[unicode]
update(messaging_service_sids, fallback_url=<object object>, callback_url=<object object>, messaging_service_sids_action=<object object>)[source]

Update the DomainConfigInstance

Parameters:
  • messaging_service_sids (list[unicode]) – A list of messagingServiceSids (with prefix MG)
  • fallback_url (unicode) – We will redirect requests to urls we are unable to identify to this url.
  • callback_url (unicode) – URL to receive click events to your webhook whenever the recipients click on the shortened links
  • messaging_service_sids_action (unicode) – An action type for messaging_service_sids operation (ADD, DELETE, REPLACE)
Returns:

The updated DomainConfigInstance

Return type:

twilio.rest.messaging.v1.domain_config.DomainConfigInstance

url
Returns:The url
Return type:unicode
class twilio.rest.messaging.v1.domain_config.DomainConfigList(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.

get(domain_sid)[source]

Constructs a DomainConfigContext

Parameters:domain_sid – Unique string used to identify the domain that this config should be associated with.
Returns:twilio.rest.messaging.v1.domain_config.DomainConfigContext
Return type:twilio.rest.messaging.v1.domain_config.DomainConfigContext
class twilio.rest.messaging.v1.domain_config.DomainConfigPage(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 DomainConfigInstance

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

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
domain_certs
Return type:twilio.rest.messaging.v1.domain_cert.DomainCertsList
domain_config
Return type:twilio.rest.messaging.v1.domain_config.DomainConfigList
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