Menu

Expand
Rate this page:

Service Rate Limits

Service Rate Limits makes it easy to use Twilio's battle-tested rate-limiting services to protect your Verify deployment. With Service Rate Limits, you can define the keys to meter and limits to enforce when starting user verifications. Together with Verify's built-in platform protections Service Rate Limits gives you turnkey protection with flexibility.

Prerequisites:

  1. Create a Verification Service

If you are just getting started with Rate Limits in Verify we recommend checking out our guide on Using Verify Service Rate Limits to Protect Your Application before diving into the API.

Rate Limit Properties

Resource Properties in REST API format
sid
sid<RK> Not PII

A 34 character string that uniquely identifies this Rate Limit.

service_sid
sid<VA> Not PII

The SID of the Service the resource is associated with.

account_sid
sid<AC> Not PII

The SID of the Account that created the Rate Limit resource.

unique_name
string Not PII

Provides a unique and addressable name to be assigned to this Rate Limit, assigned by the developer, to be optionally used in addition to SID. This value should not contain PII.

description
string Not PII

Description of this Rate Limit

date_created
date_time<iso8601> Not PII

The date and time in GMT when the resource was created specified in RFC 2822 format.

date_updated
date_time<iso8601> Not PII

The date and time in GMT when the resource was last updated specified in RFC 2822 format.

url
url Not PII

The URL of this resource.

links
uri_map Not PII

The URLs of related resources.

Create a Rate Limit

post
https://verify.twilio.com/v2/Services/{ServiceSid}/RateLimits

The Rate Limit represents the key that your application will provide when starting a user verification request. For example, you may create a rate limit for an end-user IP address to prevent a malicious bot. See the section on Selecting Rate Limit Keys for information on this topic.

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

The SID of the Service the resource is associated with.

unique_name
Required
post string Not PII

Provides a unique and addressable name to be assigned to this Rate Limit, assigned by the developer, to be optionally used in addition to SID. This value should not contain PII.

description
Optional
post string Not PII

Description of this Rate Limit

Example 1
Loading Code Sample...
        
        

        Create a Rate Limit

        Fetch a Rate Limit

        get
        https://verify.twilio.com/v2/Services/{ServiceSid}/RateLimits/{Sid}
        Parameters
        Parameters in REST API format
        service_sid
        Path
        get sid<VA> Not PII

        The SID of the Service the resource is associated with.

        sid
        Path
        get sid<RK> Not PII

        The Twilio-provided string that uniquely identifies the Rate Limit resource to fetch.

        Example 1
        Loading Code Sample...
              
              

              Fetch a Rate Limit

              List all Rate Limits

              get
              https://verify.twilio.com/v2/Services/{ServiceSid}/RateLimits
              Parameters
              Parameters in REST API format
              service_sid
              Path
              get sid<VA> Not PII

              The SID of the Service the resource is associated with.

              Example 1
              Loading Code Sample...
                    
                    

                    List all Rate Limits

                    Update a Rate Limit

                    post
                    https://verify.twilio.com/v2/Services/{ServiceSid}/RateLimits/{Sid}
                    Parameters
                    Parameters in REST API format
                    service_sid
                    Path
                    post sid<VA> Not PII

                    The SID of the Service the resource is associated with.

                    sid
                    Path
                    post sid<RK> Not PII

                    The Twilio-provided string that uniquely identifies the Rate Limit resource to fetch.

                    description
                    Optional
                    post string Not PII

                    Description of this Rate Limit

                    Example 1
                    Loading Code Sample...
                          
                          

                          Update a Rate Limit

                          Delete a Rate Limit

                          delete
                          https://verify.twilio.com/v2/Services/{ServiceSid}/RateLimits/{Sid}
                          Parameters
                          Parameters in REST API format
                          service_sid
                          Path
                          delete sid<VA> Not PII

                          The SID of the Service the resource is associated with.

                          sid
                          Path
                          delete sid<RK> Not PII

                          The Twilio-provided string that uniquely identifies the Rate Limit resource to fetch.

                          Example 1
                          Loading Code Sample...
                                
                                

                                Delete a Rate Limit

                                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