Skip to contentSkip to navigationSkip to topbar
On this page

Global Safe List


(information)

Global Safe List API is now in GA

This feature is currently in the GA maturity stage.

Customers using the below products will now have access to the Global Safe List API.

  1. Verify customers who have enabled Fraud Guard
  2. Verify customers who have enabled Geo Permissions
  3. Programmable Messaging customers who have enabled SMS Pumping Protection and are seeing 30450 error codes
  4. Programmable Messaging customers who are seeing 30453 error codes

Note : Global Safe List API currently only supports the SMS channel.

Global Safe List API allows you to maintain a list of phone numbers that will never be blocked by Verify Fraud Guard, Verify Geo Permissions, Programmable Messaging SMS Pumping Protection or any other internal fraud & risk check solution.

While we are always adapting our fraud detection systems to keep false positives extremely low, Global Safe List API adds another layer of protection by letting you mark legitimate phone numbers as safe to ensure they are never erroneously blocked.

This API contains three endpoints:

  1. Add a Phone Number
  2. Check a Phone Number
  3. Remove a Phone Number

Alternatively, you can add a previously blocked phone number to the Global Safe List via Twilio Console on the Verify Logs Blocked Verifications tab(link takes you to an external page). See Viewing Logs With Twilio Console for more information.


Rate limits

rate-limits page anchor

Global Safe List API provides a built-in rate limit of 500 requests per minute. If you reach this limit, you will start receiving HTTP 429 "Too Many Requests" responses.


Global Safe List API has a timeout value of 15 seconds. However, its 99th percentile is within 1 second.


Global Safe List Response Properties

global-safe-list-response-properties page anchor

These properties are returned in the JSON response output.

Property nameTypeRequiredDescriptionChild properties
sidSID<GN>

Optional

Not PII

The unique string that we created to identify the SafeList resource.

Pattern: ^GN[0-9a-fA-F]{32}$Min length: 34Max length: 34

phone_numberstring

Optional

PII MTL: 0 days

The phone number in SafeList.


POST https://accounts.twilio.com/v1/SafeList/Numbers

Adds a single phone number to the Safe List based on the given phone_number parameter. Phone numbers must be in E.164 format.

If attempting to add a number that already exists in the Safe List, HTTP 400 with Error Code 60411 will be returned. Phone numbers will remain in the Safe List indefinitely until they are explicitly removed.

Request body parameters

request-body-parameters page anchor
Encoding type:application/x-www-form-urlencoded
SchemaExample
Property nameTypeRequiredDescriptionChild properties
PhoneNumberstringrequired

The phone number to be added in SafeList. Phone numbers must be in E.164 format.

Add a Phone Number to the Safe ListLink to code sample: Add a Phone Number to the Safe List
1
curl -X POST "https://accounts.twilio.com/v1/SafeList/Numbers" \
2
--data-urlencode "PhoneNumber=+18001234567" \
3
-u $TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN

Output

1
{
2
"sid": "GNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
3
"phone_number": "+18001234567"
4
}

GET https://accounts.twilio.com/v1/SafeList/Numbers

Checks if a single phone number is in the Safe List based on the given phone_number parameter. Phone numbers must be in E.164 format.

If the given phone number is not in the Safe List, HTTP 404 will be returned.

Property nameTypeRequiredPIIDescription
PhoneNumberstring

Optional

The phone number to be fetched from SafeList. Phone numbers must be in E.164 format.

Check if a Phone Number is in the Safe ListLink to code sample: Check if a Phone Number is in the Safe List
1
curl -X GET "https://accounts.twilio.com/v1/SafeList/Numbers?PhoneNumber=+18001234567" \
2
-u $TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN

Output

1
{
2
"sid": "GNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
3
"phone_number": "+18001234567"
4
}

DELETE https://accounts.twilio.com/v1/SafeList/Numbers

Removes a phone number from the Safe List. Phone number must be in E.164 format.

If the given phone number is not in the Safe List, HTTP 404 will be returned.

Property nameTypeRequiredPIIDescription
PhoneNumberstring

Optional

The phone number to be removed from SafeList. Phone numbers must be in E.164 format.

1
curl -X DELETE "https://accounts.twilio.com/v1/SafeList/Numbers?PhoneNumber=+18001234567" \
2
-u $TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN

Need some help?

Terms of service

Copyright © 2024 Twilio Inc.