Menu

Expand
Rate this page:

REST API: Accounts

When you first sign up with Twilio, you have just one account, your main account. But you can also create more accounts... subaccounts are useful for things like segmenting phone numbers and usage data for your customers and controlling access to data. For more information on subaccounts see Using Subaccounts.

Account properties

Resource Properties in REST API format
auth_token

The authorization token for this account. This token should be kept a secret, so no sharing.

date_created
date_time<rfc2822> Not PII

The date that this account was created, in GMT in RFC 2822 format

date_updated
date_time<rfc2822> Not PII

The date that this account was last updated, in GMT in RFC 2822 format.

friendly_name

A human readable description of this account, up to 64 characters long. By default the FriendlyName is your email address.

owner_account_sid
sid<AC> Not PII

The unique 34 character id that represents the parent of this account. The OwnerAccountSid of a parent account is it's own sid.

sid
sid<AC> Not PII

A 34 character string that uniquely identifies this resource.

status
enum:status Not PII

The status of this account. Usually active, but can be suspended or closed.

subresource_uris
uri_map Not PII

A Map of various subresources available for the given Account Instance

type
enum:type Not PII

The type of this account. Either Trial or Full if it's been upgraded

uri
uri Not PII

The URI for this resource, relative to https://api.twilio.com

Create an Account resource

post
https://api.twilio.com/2010-04-01/Accounts.json

Create a new Account instance resource as a subaccount of the one used to make the request. See Creating Subaccounts for more information.

Parameters
Parameters in REST API format
friendly_name
Optional
post string PII MTL: 30 DAYS

A human readable description of the account to create, defaults to SubAccount Created at {YYYY-MM-DD HH:MM meridian}

Example 1
Loading Code Sample...
        
        

        Create Account

        Fetch an Account resource

        get
        https://api.twilio.com/2010-04-01/Accounts/{Sid}.json

        Returns a representation of an account, including the properties above.

        Parameters
        Parameters in REST API format
        sid
        Path
        get sid<AC> Not PII

        The Account Sid that uniquely identifies the account to fetch

        Example 1
        Loading Code Sample...
              
              

              Fetch Account

              Read multiple Account resources

              get
              https://api.twilio.com/2010-04-01/Accounts.json

              Read the set of Accounts belonging to the Account used to make the API request. This list includes that account, along with any subaccounts belonging to it.

              When fetching multiple pages of API results, use the provided nextpageuri parameter to retrieve the next page of results. All of the Twilio Helper Libraries use the nextpageuri to page through resources. For more info on paging refer to the Twilio's response documentation

              Parameters
              Parameters in REST API format
              friendly_name
              Optional
              get string PII MTL: 30 DAYS

              Only return the Account resources with friendly names that exactly match this name.

              status
              Optional
              get ienum:status Not PII

              Only return Account resources with the given status. Can be closed, suspended or active.

              Example 1
              Loading Code Sample...
                    
                    

                    List All Accounts

                    Example 2
                    Loading Code Sample...
                          
                          

                          List All Active Accounts

                          Update an Account resource

                          post
                          https://api.twilio.com/2010-04-01/Accounts/{Sid}.json

                          Allows you to modify the properties of an account.

                          See the Subaccounts reference for more information on suspending, unsuspending or closing subaccounts using the 'Status' parameter.

                          Parameters
                          Parameters in REST API format
                          sid
                          Path
                          post sid<AC> Not PII

                          The Account Sid that uniquely identifies the account to update

                          friendly_name
                          Optional
                          post string PII MTL: 30 DAYS

                          Update the human-readable description of this Account

                          status
                          Optional
                          post ienum:status Not PII

                          Alter the status of this account: use closed to irreversibly close this account, suspended to temporarily suspend it, or active to reactivate it.

                          Example 1
                          Loading Code Sample...
                                
                                

                                Suspend a Subaccount

                                Example 2
                                Loading Code Sample...
                                      
                                      

                                      Re-activate a Suspended Subaccount

                                      Example 3
                                      Loading Code Sample...
                                            
                                            

                                            Permanently Close a Subaccount

                                            Rate this page:

                                            Need some help?

                                            We all do sometimes; code is hard. Get help now from our support team, or lean on the wisdom of the crowd by visiting Twilio's Stack Overflow Collective or browsing the Twilio tag on Stack Overflow.

                                            Loading Code Sample...
                                                  
                                                  
                                                  

                                                  Thank you for your feedback!

                                                  Please select the reason(s) for your feedback. The additional information you provide helps us improve our documentation:

                                                  Sending your feedback...
                                                  🎉 Thank you for your feedback!
                                                  Something went wrong. Please try again.

                                                  Thanks for your feedback!

                                                  thanks-feedback-gif