Download OpenAPI specification:
Keep your email safe from hackers and trackers. This API is built with Django REST Framework and powers the Relay website UI, add-on, Firefox browser, and 3rd-party app integrations.
Feature flags.
name required | string <= 100 characters The human/computer readable name. |
everyone | boolean or null Flip this flag on (Yes) or off (No) for everyone, overriding all other settings. Leave as Unknown to use normally. |
note | string Note where this Flag is used. |
{- "name": "string",
- "everyone": true,
- "note": "string"
}
{- "id": 0,
- "name": "string",
- "everyone": true,
- "note": "string"
}
Feature flags.
id required | integer A unique integer value identifying this Flag. |
name | string <= 100 characters The human/computer readable name. |
everyone | boolean or null Flip this flag on (Yes) or off (No) for everyone, overriding all other settings. Leave as Unknown to use normally. |
note | string Note where this Flag is used. |
{- "name": "string",
- "everyone": true,
- "note": "string"
}
{- "id": 0,
- "name": "string",
- "everyone": true,
- "note": "string"
}
Relay user extended profile data.
[- {
- "id": 0,
- "server_storage": true,
- "store_phone_log": true,
- "subdomain": "string",
- "has_premium": true,
- "has_phone": true,
- "has_vpn": true,
- "has_megabundle": true,
- "onboarding_state": 9223372036854776000,
- "onboarding_free_state": 9223372036854776000,
- "date_phone_registered": "2019-08-24T14:15:22Z",
- "date_subscribed": "2019-08-24T14:15:22Z",
- "avatar": "string",
- "next_email_try": "2019-08-24T14:15:22Z",
- "bounce_status": {
- "paused": null,
- "type": null
}, - "api_token": "2551c122-8b7f-416d-85cb-7f37a24c74b1",
- "emails_blocked": 0,
- "emails_forwarded": 0,
- "emails_replied": 0,
- "level_one_trackers_blocked": 0,
- "remove_level_one_email_trackers": true,
- "total_masks": 0,
- "at_mask_limit": true,
- "metrics_enabled": true
}
]
Relay user extended profile data.
server_storage | boolean |
store_phone_log | boolean |
onboarding_state | integer <int64> [ 0 .. 9223372036854776000 ] |
onboarding_free_state | integer <int64> [ 0 .. 9223372036854776000 ] |
remove_level_one_email_trackers | boolean or null |
{- "server_storage": true,
- "store_phone_log": true,
- "onboarding_state": 9223372036854776000,
- "onboarding_free_state": 9223372036854776000,
- "remove_level_one_email_trackers": true
}
{- "id": 0,
- "server_storage": true,
- "store_phone_log": true,
- "subdomain": "string",
- "has_premium": true,
- "has_phone": true,
- "has_vpn": true,
- "has_megabundle": true,
- "onboarding_state": 9223372036854776000,
- "onboarding_free_state": 9223372036854776000,
- "date_phone_registered": "2019-08-24T14:15:22Z",
- "date_subscribed": "2019-08-24T14:15:22Z",
- "avatar": "string",
- "next_email_try": "2019-08-24T14:15:22Z",
- "bounce_status": {
- "paused": null,
- "type": null
}, - "api_token": "2551c122-8b7f-416d-85cb-7f37a24c74b1",
- "emails_blocked": 0,
- "emails_forwarded": 0,
- "emails_replied": 0,
- "level_one_trackers_blocked": 0,
- "remove_level_one_email_trackers": true,
- "total_masks": 0,
- "at_mask_limit": true,
- "metrics_enabled": true
}
Relay user extended profile data.
id required | integer A unique integer value identifying this profile. |
{- "id": 0,
- "server_storage": true,
- "store_phone_log": true,
- "subdomain": "string",
- "has_premium": true,
- "has_phone": true,
- "has_vpn": true,
- "has_megabundle": true,
- "onboarding_state": 9223372036854776000,
- "onboarding_free_state": 9223372036854776000,
- "date_phone_registered": "2019-08-24T14:15:22Z",
- "date_subscribed": "2019-08-24T14:15:22Z",
- "avatar": "string",
- "next_email_try": "2019-08-24T14:15:22Z",
- "bounce_status": {
- "paused": null,
- "type": null
}, - "api_token": "2551c122-8b7f-416d-85cb-7f37a24c74b1",
- "emails_blocked": 0,
- "emails_forwarded": 0,
- "emails_replied": 0,
- "level_one_trackers_blocked": 0,
- "remove_level_one_email_trackers": true,
- "total_masks": 0,
- "at_mask_limit": true,
- "metrics_enabled": true
}
Relay user extended profile data.
id required | integer A unique integer value identifying this profile. |
server_storage | boolean |
store_phone_log | boolean |
onboarding_state | integer <int64> [ 0 .. 9223372036854776000 ] |
onboarding_free_state | integer <int64> [ 0 .. 9223372036854776000 ] |
remove_level_one_email_trackers | boolean or null |
{- "server_storage": true,
- "store_phone_log": true,
- "onboarding_state": 9223372036854776000,
- "onboarding_free_state": 9223372036854776000,
- "remove_level_one_email_trackers": true
}
{- "id": 0,
- "server_storage": true,
- "store_phone_log": true,
- "subdomain": "string",
- "has_premium": true,
- "has_phone": true,
- "has_vpn": true,
- "has_megabundle": true,
- "onboarding_state": 9223372036854776000,
- "onboarding_free_state": 9223372036854776000,
- "date_phone_registered": "2019-08-24T14:15:22Z",
- "date_subscribed": "2019-08-24T14:15:22Z",
- "avatar": "string",
- "next_email_try": "2019-08-24T14:15:22Z",
- "bounce_status": {
- "paused": null,
- "type": null
}, - "api_token": "2551c122-8b7f-416d-85cb-7f37a24c74b1",
- "emails_blocked": 0,
- "emails_forwarded": 0,
- "emails_replied": 0,
- "level_one_trackers_blocked": 0,
- "remove_level_one_email_trackers": true,
- "total_masks": 0,
- "at_mask_limit": true,
- "metrics_enabled": true
}
Relay user extended profile data.
id required | integer A unique integer value identifying this profile. |
server_storage | boolean |
store_phone_log | boolean |
onboarding_state | integer <int64> [ 0 .. 9223372036854776000 ] |
onboarding_free_state | integer <int64> [ 0 .. 9223372036854776000 ] |
remove_level_one_email_trackers | boolean or null |
{- "server_storage": true,
- "store_phone_log": true,
- "onboarding_state": 9223372036854776000,
- "onboarding_free_state": 9223372036854776000,
- "remove_level_one_email_trackers": true
}
{- "id": 0,
- "server_storage": true,
- "store_phone_log": true,
- "subdomain": "string",
- "has_premium": true,
- "has_phone": true,
- "has_vpn": true,
- "has_megabundle": true,
- "onboarding_state": 9223372036854776000,
- "onboarding_free_state": 9223372036854776000,
- "date_phone_registered": "2019-08-24T14:15:22Z",
- "date_subscribed": "2019-08-24T14:15:22Z",
- "avatar": "string",
- "next_email_try": "2019-08-24T14:15:22Z",
- "bounce_status": {
- "paused": null,
- "type": null
}, - "api_token": "2551c122-8b7f-416d-85cb-7f37a24c74b1",
- "emails_blocked": 0,
- "emails_forwarded": 0,
- "emails_replied": 0,
- "level_one_trackers_blocked": 0,
- "remove_level_one_email_trackers": true,
- "total_masks": 0,
- "at_mask_limit": true,
- "metrics_enabled": true
}
Report a Relay issue from an extension or integration.
issue_on_domain required | string <uri> <= 200 characters |
user_agent | string Default: "" |
email_mask_not_accepted | boolean Default: false |
add_on_visual_issue | boolean Default: false |
email_not_received | boolean Default: false |
other_issue | string Default: "" |
{- "user_agent": "Firefox",
- "email_mask_not_accepted": true,
- "add_on_visual_issue": false,
- "email_not_received": false,
- "other_issue": ""
}
Get data needed to present the Relay dashboard to a visitor or user.
{- "PERIODICAL_PREMIUM_PRODUCT_ID": "prod_XXXXXXXXXXXXXX",
- "GOOGLE_ANALYTICS_ID": "UA-########-##",
- "GA4_MEASUREMENT_ID": "G-XXXXXXXXX",
- "BUNDLE_PRODUCT_ID": "prod_XXXXXXXXXXXXXX",
- "MEGABUNDLE_PRODUCT_ID": "prod_XXXXXXXXXXXXXX",
- "PHONE_PRODUCT_ID": "prod_XXXXXXXXXXXXXX",
- "PERIODICAL_PREMIUM_PLANS": {
- "country_code": "US",
- "countries": [
- "CA",
- "US"
], - "available_in_country": true,
- "plan_country_lang_mapping": {
- "CA": {
- "*": {
- "monthly": {
- "id": "price_PremiumMonthlyxxxx",
- "currency": "usd",
- "price": 1.99
}, - "yearly": {
- "id": "price_PremiumYearlyxxxx",
- "currency": "usd",
- "price": 0.99
}
}
}, - "US": {
- "*": {
- "monthly": {
- "id": "price_PremiumMonthlyxxxx",
- "currency": "usd",
- "price": 1.99
}, - "yearly": {
- "id": "price_PremiumYearlyxxxx",
- "currency": "usd",
- "price": 0.99
}
}
}
}
}, - "PHONE_PLANS": {
- "country_code": "US",
- "countries": [
- "CA",
- "US"
], - "available_in_country": true,
- "plan_country_lang_mapping": {
- "CA": {
- "*": {
- "monthly": {
- "id": "price_PhonesMonthlyxxxx",
- "currency": "usd",
- "price": 4.99
}, - "yearly": {
- "id": "price_PhonesYearlyxxxx",
- "currency": "usd",
- "price": 4.99
}
}
}, - "US": {
- "*": {
- "monthly": {
- "id": "price_PhonesMonthlyxxxx",
- "currency": "usd",
- "price": 4.99
}, - "yearly": {
- "id": "price_PhonesYearlyxxxx",
- "currency": "usd",
- "price": 4.99
}
}
}
}
}, - "BUNDLE_PLANS": {
- "country_code": "US",
- "countries": [
- "CA",
- "US"
], - "available_in_country": true,
- "plan_country_lang_mapping": {
- "CA": {
- "*": {
- "monthly": {
- "id": "price_BundleMonthlyxxxx",
- "currency": "usd",
- "price": 6.99
}, - "yearly": {
- "id": "price_BundleYearlyxxxx",
- "currency": "usd",
- "price": 6.99
}
}
}, - "US": {
- "*": {
- "monthly": {
- "id": "price_BundleMonthlyxxxx",
- "currency": "usd",
- "price": 6.99
}, - "yearly": {
- "id": "price_BundleYearlyxxxx",
- "currency": "usd",
- "price": 6.99
}
}
}
}
}, - "MEGABUNDLE_PLANS": {
- "country_code": "US",
- "countries": [
- "CA",
- "US"
], - "available_in_country": true,
- "plan_country_lang_mapping": {
- "CA": {
- "*": {
- "monthly": {
- "id": "price_MegabundleMonthlyxxxx",
- "currency": "usd",
- "price": 8.25
}, - "yearly": {
- "id": "price_MegabundleYearlyxxxx",
- "currency": "usd",
- "price": 99
}
}
}, - "US": {
- "*": {
- "monthly": {
- "id": "price_MegabundleMonthlyxxxx",
- "currency": "usd",
- "price": 8.25
}, - "yearly": {
- "id": "price_MegabundleYearlyxxxx",
- "currency": "usd",
- "price": 99
}
}
}
}
}, - "WAFFLE_FLAGS": [
- [
- "foxfood",
- false
], - [
- "phones",
- true
], - [
- "bundle",
- true
], - [
- "megabundle",
- true
]
], - "WAFFLE_SWITCHES": [ ],
- "WAFFLE_SAMPLES": [ ],
- "MAX_MINUTES_TO_VERIFY_REAL_PHONE": 5
}
Create a Relay user from an FXA token.
See API Auth doc for details.
Authorization required | string Examples:
FXA Bearer Token. Can not be set in browsable API. |
An email address with subdomain chosen by a Relay user.
address | string |
block_list_emails | boolean |
created_at | string <date-time> |
description | string |
domain | integer Enum: 1 2
|
enabled | boolean |
id | integer |
last_modified_at | string <date-time> |
last_used_at | string <date-time> |
num_blocked | integer |
num_forwarded | integer |
num_spam | integer |
used_on | string |
[- {
- "mask_type": "custom",
- "enabled": true,
- "description": "string",
- "block_list_emails": true,
- "used_on": "string",
- "id": 0,
- "address": "string",
- "domain": 1,
- "full_address": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "last_modified_at": "2019-08-24T14:15:22Z",
- "last_used_at": "2019-08-24T14:15:22Z",
- "num_forwarded": 0,
- "num_blocked": 0,
- "num_level_one_trackers_blocked": 0,
- "num_replied": 0,
- "num_spam": 0
}
]
An email address with subdomain chosen by a Relay user.
enabled | boolean |
description | string <= 64 characters |
block_list_emails | boolean |
used_on | string or null |
address required | string [ 1 .. 64 ] characters |
{- "enabled": true,
- "description": "string",
- "block_list_emails": true,
- "used_on": "string",
- "address": "string"
}
{- "mask_type": "custom",
- "enabled": true,
- "description": "string",
- "block_list_emails": true,
- "used_on": "string",
- "id": 0,
- "address": "string",
- "domain": 1,
- "full_address": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "last_modified_at": "2019-08-24T14:15:22Z",
- "last_used_at": "2019-08-24T14:15:22Z",
- "num_forwarded": 0,
- "num_blocked": 0,
- "num_level_one_trackers_blocked": 0,
- "num_replied": 0,
- "num_spam": 0
}
An email address with subdomain chosen by a Relay user.
id required | integer A unique integer value identifying this domain address. |
{- "mask_type": "custom",
- "enabled": true,
- "description": "string",
- "block_list_emails": true,
- "used_on": "string",
- "id": 0,
- "address": "string",
- "domain": 1,
- "full_address": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "last_modified_at": "2019-08-24T14:15:22Z",
- "last_used_at": "2019-08-24T14:15:22Z",
- "num_forwarded": 0,
- "num_blocked": 0,
- "num_level_one_trackers_blocked": 0,
- "num_replied": 0,
- "num_spam": 0
}
An email address with subdomain chosen by a Relay user.
id required | integer A unique integer value identifying this domain address. |
enabled | boolean |
description | string <= 64 characters |
block_list_emails | boolean |
used_on | string or null |
address required | string [ 1 .. 64 ] characters |
{- "enabled": true,
- "description": "string",
- "block_list_emails": true,
- "used_on": "string",
- "address": "string"
}
{- "mask_type": "custom",
- "enabled": true,
- "description": "string",
- "block_list_emails": true,
- "used_on": "string",
- "id": 0,
- "address": "string",
- "domain": 1,
- "full_address": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "last_modified_at": "2019-08-24T14:15:22Z",
- "last_used_at": "2019-08-24T14:15:22Z",
- "num_forwarded": 0,
- "num_blocked": 0,
- "num_level_one_trackers_blocked": 0,
- "num_replied": 0,
- "num_spam": 0
}
An email address with subdomain chosen by a Relay user.
id required | integer A unique integer value identifying this domain address. |
enabled | boolean |
description | string <= 64 characters |
block_list_emails | boolean |
used_on | string or null |
address | string [ 1 .. 64 ] characters |
{- "enabled": true,
- "description": "string",
- "block_list_emails": true,
- "used_on": "string",
- "address": "string"
}
{- "mask_type": "custom",
- "enabled": true,
- "description": "string",
- "block_list_emails": true,
- "used_on": "string",
- "id": 0,
- "address": "string",
- "domain": 1,
- "full_address": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "last_modified_at": "2019-08-24T14:15:22Z",
- "last_used_at": "2019-08-24T14:15:22Z",
- "num_forwarded": 0,
- "num_blocked": 0,
- "num_level_one_trackers_blocked": 0,
- "num_replied": 0,
- "num_spam": 0
}
Requires free_user_onboarding
flag to be active for the user.
Send the first_forwarded_email.html
email to the user via a mask.
See /emails/first_forwarded_email.
Note: mask
value must be a RelayAddress
that belongs to the authenticated user.
A DomainAddress
will not work.
mask required | string <email> |
{- "mask": "user@example.com"
}
An email address with a random name provided by Relay.
address | string |
block_list_emails | boolean |
created_at | string <date-time> |
description | string |
domain | integer Enum: 1 2
|
enabled | boolean |
generated_for | string |
id | integer |
last_modified_at | string <date-time> |
last_used_at | string <date-time> |
num_blocked | integer |
num_forwarded | integer |
num_spam | integer |
used_on | string |
[- {
- "mask_type": "random",
- "enabled": true,
- "description": "string",
- "generated_for": "string",
- "block_list_emails": true,
- "used_on": "string",
- "id": 0,
- "address": "string",
- "domain": 1,
- "full_address": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "last_modified_at": "2019-08-24T14:15:22Z",
- "last_used_at": "2019-08-24T14:15:22Z",
- "num_forwarded": 0,
- "num_blocked": 0,
- "num_level_one_trackers_blocked": 0,
- "num_replied": 0,
- "num_spam": 0
}
]
An email address with a random name provided by Relay.
enabled | boolean |
description | string <= 64 characters |
generated_for | string <= 255 characters |
block_list_emails | boolean |
used_on | string or null |
{- "enabled": true,
- "description": "string",
- "generated_for": "string",
- "block_list_emails": true,
- "used_on": "string"
}
{- "mask_type": "random",
- "enabled": true,
- "description": "string",
- "generated_for": "string",
- "block_list_emails": true,
- "used_on": "string",
- "id": 0,
- "address": "string",
- "domain": 1,
- "full_address": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "last_modified_at": "2019-08-24T14:15:22Z",
- "last_used_at": "2019-08-24T14:15:22Z",
- "num_forwarded": 0,
- "num_blocked": 0,
- "num_level_one_trackers_blocked": 0,
- "num_replied": 0,
- "num_spam": 0
}
An email address with a random name provided by Relay.
id required | integer A unique integer value identifying this relay address. |
{- "mask_type": "random",
- "enabled": true,
- "description": "string",
- "generated_for": "string",
- "block_list_emails": true,
- "used_on": "string",
- "id": 0,
- "address": "string",
- "domain": 1,
- "full_address": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "last_modified_at": "2019-08-24T14:15:22Z",
- "last_used_at": "2019-08-24T14:15:22Z",
- "num_forwarded": 0,
- "num_blocked": 0,
- "num_level_one_trackers_blocked": 0,
- "num_replied": 0,
- "num_spam": 0
}
An email address with a random name provided by Relay.
id required | integer A unique integer value identifying this relay address. |
enabled | boolean |
description | string <= 64 characters |
generated_for | string <= 255 characters |
block_list_emails | boolean |
used_on | string or null |
{- "enabled": true,
- "description": "string",
- "generated_for": "string",
- "block_list_emails": true,
- "used_on": "string"
}
{- "mask_type": "random",
- "enabled": true,
- "description": "string",
- "generated_for": "string",
- "block_list_emails": true,
- "used_on": "string",
- "id": 0,
- "address": "string",
- "domain": 1,
- "full_address": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "last_modified_at": "2019-08-24T14:15:22Z",
- "last_used_at": "2019-08-24T14:15:22Z",
- "num_forwarded": 0,
- "num_blocked": 0,
- "num_level_one_trackers_blocked": 0,
- "num_replied": 0,
- "num_spam": 0
}
An email address with a random name provided by Relay.
id required | integer A unique integer value identifying this relay address. |
enabled | boolean |
description | string <= 64 characters |
generated_for | string <= 255 characters |
block_list_emails | boolean |
used_on | string or null |
{- "enabled": true,
- "description": "string",
- "generated_for": "string",
- "block_list_emails": true,
- "used_on": "string"
}
{- "mask_type": "random",
- "enabled": true,
- "description": "string",
- "generated_for": "string",
- "block_list_emails": true,
- "used_on": "string",
- "id": 0,
- "address": "string",
- "domain": 1,
- "full_address": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "last_modified_at": "2019-08-24T14:15:22Z",
- "last_used_at": "2019-08-24T14:15:22Z",
- "num_forwarded": 0,
- "num_blocked": 0,
- "num_level_one_trackers_blocked": 0,
- "num_replied": 0,
- "num_spam": 0
}
[- {
- "id": 0,
- "relay_number": 0,
- "inbound_number": "string",
- "last_inbound_date": "2019-08-24T14:15:22Z",
- "last_inbound_type": "call",
- "num_calls": 0,
- "num_calls_blocked": 0,
- "last_call_date": "2019-08-24T14:15:22Z",
- "num_texts": 0,
- "num_texts_blocked": 0,
- "last_text_date": "2019-08-24T14:15:22Z",
- "blocked": true
}
]
id required | integer A unique integer value identifying this inbound contact. |
{- "id": 0,
- "relay_number": 0,
- "inbound_number": "string",
- "last_inbound_date": "2019-08-24T14:15:22Z",
- "last_inbound_type": "call",
- "num_calls": 0,
- "num_calls_blocked": 0,
- "last_call_date": "2019-08-24T14:15:22Z",
- "num_texts": 0,
- "num_texts_blocked": 0,
- "last_text_date": "2019-08-24T14:15:22Z",
- "blocked": true
}
id required | integer A unique integer value identifying this inbound contact. |
blocked | boolean |
{- "blocked": true
}
{- "id": 0,
- "relay_number": 0,
- "inbound_number": "string",
- "last_inbound_date": "2019-08-24T14:15:22Z",
- "last_inbound_type": "call",
- "num_calls": 0,
- "num_calls_blocked": 0,
- "last_call_date": "2019-08-24T14:15:22Z",
- "num_texts": 0,
- "num_texts_blocked": 0,
- "last_text_date": "2019-08-24T14:15:22Z",
- "blocked": true
}
Get real phone number records for the authenticated user.
The authenticated user must have a subscription that grants one of the
SUBSCRIPTIONS_WITH_PHONE
capabilities.
Client must be authenticated, and these endpoints only return data that is "owned" by the authenticated user.
All endpoints are rate-limited to settings.PHONE_RATE_LIMIT
[- {
- "id": 0,
- "number": "string",
- "verification_sent_date": "2019-08-24T14:15:22Z",
- "verified": false,
- "verified_date": "2019-08-24T14:15:22Z",
- "country_code": "string"
}
]
Add real phone number to the authenticated user.
The "flow" to verify a real phone number is:
The authenticated user must have a subscription that grants one of the
SUBSCRIPTIONS_WITH_PHONE
capabilities.
The number
field should be in E.164 format which includes a country
code. If the number is not in E.164 format, this endpoint will try to
create an E.164 number by prepending the country code of the client
making the request (i.e., from the X-Client-Region
HTTP header).
If the POST
does NOT include a verification_code
and the number is
a valid (currently, US-based) number, this endpoint will text a
verification code to the number.
If the POST
DOES include a verification_code
, and the code matches
a code already sent to the number, this endpoint will set verified
to
True
for this number.
number required | string <= 15 characters |
verification_code | string <= 8 characters |
{- "number": "string",
- "verification_code": "string"
}
{- "id": 0,
- "number": "string",
- "verification_sent_date": "2019-08-24T14:15:22Z",
- "verified": false,
- "verified_date": "2019-08-24T14:15:22Z",
- "country_code": "string"
}
Get real phone number records for the authenticated user.
The authenticated user must have a subscription that grants one of the
SUBSCRIPTIONS_WITH_PHONE
capabilities.
Client must be authenticated, and these endpoints only return data that is "owned" by the authenticated user.
All endpoints are rate-limited to settings.PHONE_RATE_LIMIT
id required | integer A unique integer value identifying this real phone. |
{- "id": 0,
- "number": "string",
- "verification_sent_date": "2019-08-24T14:15:22Z",
- "verified": false,
- "verified_date": "2019-08-24T14:15:22Z",
- "country_code": "string"
}
Update the authenticated user's real phone number.
The authenticated user must have a subscription that grants one of the
SUBSCRIPTIONS_WITH_PHONE
capabilities.
The {id}
should match a previously-POST
ed resource that belongs to the user.
The number
field should be in E.164 format which includes a country
code.
The verification_code
should be the code that was texted to the
number during the POST
. If it matches, this endpoint will set
verified
to True
for this number.
id required | integer A unique integer value identifying this real phone. |
number | string <= 15 characters |
verification_code | string <= 8 characters |
{- "number": "string",
- "verification_code": "string"
}
{- "id": 0,
- "number": "string",
- "verification_sent_date": "2019-08-24T14:15:22Z",
- "verified": false,
- "verified_date": "2019-08-24T14:15:22Z",
- "country_code": "string"
}
ModelViewSet mixin for creating object for the authenticated user.
[- {
- "id": 0,
- "number": "string",
- "location": "string",
- "country_code": "string",
- "enabled": true,
- "remaining_minutes": 0,
- "remaining_texts": 0,
- "calls_forwarded": 0,
- "calls_blocked": 0,
- "texts_forwarded": 0,
- "texts_blocked": 0,
- "calls_and_texts_forwarded": 0,
- "calls_and_texts_blocked": 0,
- "created_at": "2019-08-24T14:15:22Z"
}
]
Provision a phone number with Twilio and assign to the authenticated user.
⚠️ THIS WILL BUY A PHONE NUMBER ⚠️
If you have real account credentials in your TWILIO_*
env vars, this
will really provision a Twilio number to your account. You can use
Test Credentials to call this endpoint without making a
real phone number purchase. If you do, you need to pass one of the
test phone numbers.
The number
should be in E.164 format.
Every call or text to the relay number will be sent as a webhook to the
URL configured for your TWILIO_SMS_APPLICATION_SID
.
number required | string <= 15 characters |
enabled | boolean |
{- "number": "string",
- "enabled": true
}
{- "id": 0,
- "number": "string",
- "location": "string",
- "country_code": "string",
- "enabled": true,
- "remaining_minutes": 0,
- "remaining_texts": 0,
- "calls_forwarded": 0,
- "calls_blocked": 0,
- "texts_forwarded": 0,
- "texts_blocked": 0,
- "calls_and_texts_forwarded": 0,
- "calls_and_texts_blocked": 0,
- "created_at": "2019-08-24T14:15:22Z"
}
ModelViewSet mixin for creating object for the authenticated user.
id required | integer A unique integer value identifying this relay number. |
{- "id": 0,
- "number": "string",
- "location": "string",
- "country_code": "string",
- "enabled": true,
- "remaining_minutes": 0,
- "remaining_texts": 0,
- "calls_forwarded": 0,
- "calls_blocked": 0,
- "texts_forwarded": 0,
- "texts_blocked": 0,
- "calls_and_texts_forwarded": 0,
- "calls_and_texts_blocked": 0,
- "created_at": "2019-08-24T14:15:22Z"
}
Update the authenticated user's relay number.
The authenticated user must have a subscription that grants one of the
SUBSCRIPTIONS_WITH_PHONE
capabilities.
The {id}
should match a previously-POST
ed resource that belongs to
the authenticated user.
This is primarily used to toggle the enabled
field.
id required | integer A unique integer value identifying this relay number. |
number | string <= 15 characters |
enabled | boolean |
{- "number": "string",
- "enabled": true
}
{- "id": 0,
- "number": "string",
- "location": "string",
- "country_code": "string",
- "enabled": true,
- "remaining_minutes": 0,
- "remaining_texts": 0,
- "calls_forwarded": 0,
- "calls_blocked": 0,
- "texts_forwarded": 0,
- "texts_blocked": 0,
- "calls_and_texts_forwarded": 0,
- "calls_and_texts_blocked": 0,
- "created_at": "2019-08-24T14:15:22Z"
}
Search for available numbers.
This endpoints uses the underlying AvailablePhoneNumbers API.
Accepted query params:
AvailablePhoneNumbers
in_locality
paramAvailablePhoneNumbers
area_code
paramarea_code | string Examples:
|
location | string Examples:
|
[- {
- "friendly_name": "(918) 555-6789",
- "iso_country": "US",
- "locality": "Tulsa",
- "phone_number": "+19185556789",
- "postal_code": "74120",
- "region": "OK"
}
]
Returns suggested relay numbers for the authenticated user.
Based on the user's real number, returns available relay numbers:
same_prefix_options
: Numbers that match as much of the user's
real number as possible.other_areas_options
: Numbers that exactly match the user's real
number, in a different area code.same_area_options
: Other numbers in the same area code as the user.random_options
: Available numbers in the user's country{- "real_num": "4045556789",
- "same_prefix_options": [ ],
- "other_areas_options": [ ],
- "same_area_options": [ ],
- "random_options": [
- {
- "friendly_name": "(256) 555-3456",
- "iso_country": "US",
- "locality": "Gadsden",
- "phone_number": "+12565553456",
- "postal_code": "35903",
- "region": "AL"
}
]
}
Get a Relay vCard. lookup_key
should be passed in url path.
We use this to return a vCard for a number. When we create a RelayNumber, we create a secret lookup_key and text it to the user.
lookup_key required | string |
BEGIN:VCARD VERSION:3.0 FN:Firefox Relay TEL:+14045555555 END:VCARD
Handle an inbound call request sent by Twilio.
The return value is TwilML Response XML that reports the error or instructs Twilio to connect the callers.
X-Twilio-Signature required | string |
Caller required | string |
Called required | string |
{- "Caller": "+13035556789",
- "Called": "+14045556789"
}
{ "say": "Sorry, that number is not available." }
Handle an inbound SMS message sent by Twilio.
The return value is TwilML Response XML that reports the error or an empty success message.
X-Twilio-Signature required | string |
text required | string |
to required | string |
from required | string |
{- "to": "+13035556789",
- "from": "+14045556789",
- "text": "Hello!"
}
null
Twilio callback for SMS status.
When the message is delivered, this calls Twilio to delete the message from logs.
X-Twilio-Signature required | string |
SmsStatus required | string |
MessageSid required | string |
{- "SmsStatus": "delivered",
- "MessageSid": "SMxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}
Twilio callback for voice call status.
When the call is complete, the user's remaining monthly time is updated, and the call is deleted from Twilio logs.
X-Twilio-Signature required | string |
CallSid required | string |
Called required | string |
CallStatus required | string |
CallDuration | integer |
{- "CallSid": "CAxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
- "Called": "+14045556789",
- "CallStatus": "completed",
- "CallDuration": 127
}
Send a message from the user's relay number.
POST params: body: the body of the message destination: E.164-formatted phone number
body required | string |
destination required | string |
{- "body": "Hello!",
- "destination": "+13045554567"
}
Get the user's SMS messages sent to or from the phone mask
Pass ?with=<E.164> parameter to filter the messages to only the ones sent between the phone mask and the <E.164> number.
Pass ?direction=inbound|outbound to filter the messages to only the inbound or outbound messages. If omitted, return both.
direction | string Enum: "inbound" "outbound" filter to inbound or outbound messages |
with | string filter to messages with the given E.164 number |
[- {
- "to": "+13035556789",
- "date_sent": "2025-10-17T17:39:24.732025+00:00",
- "body": "Hello!",
- "from": "+14045556789"
}
]