Surge
App · 20 actions
Send SMS and look up contacts, recordings, campaigns and phone numbers in your Surge accounts.
Actions
| Action | What it does |
|---|---|
| Check account status | Check an account's status and capabilities |
| Create a contact | Creates a new Contact object. |
| Create a message | Send a text message now or schedule it for later. |
| List accounts | List all accounts with cursor-based pagination. |
| List available phone numbers | Browse purchasable phone numbers from Surge inventory before buying. |
| List blocked contacts | Lists the account's blocked contacts, newest first, with cursor-based pagination. |
| List campaigns | List all campaigns for an account with cursor-based pagination. |
| List contacts | List all contacts for an account with cursor-based pagination. |
| List messages | List all messages for an account with cursor-based pagination. |
| List phone numbers | List all phone numbers for an account with cursor-based pagination. |
| List recordings | List all recordings for an account with cursor-based pagination. |
| List toll-free campaigns | List all toll-free campaigns for an account with cursor-based pagination. |
| List users | List all users for an account with cursor-based pagination. |
| Retrieve a campaign | Retrieves a Campaign object. |
| Retrieve a contact | Retrieves a Contact object. |
| Retrieve a message | Retrieves a Message object. |
| Retrieve a phone number | Retrieves a PhoneNumber object. |
| Retrieve a recording | Retrieves a Recording object. |
| Retrieve account usage | Returns priced usage for an account between start_time (inclusive) and end_time (exclusive). |
| Retrieve an account | Retrieves an Account object. |
Check account status
Check an account's status and capabilities
Inputs
- Account
account_idtextRequired - ID of the account to check
- Capabilities
capabilitieslist - capabilities about which to check the statusOne or more of:
local_messaging(Local messaging),toll_free_messaging(Toll free messaging).
Outputs
dataobject- Response containing account status information
Example output
{
"data": {
"capabilities": {}
}
}Create a contact
Creates a new Contact object.
Inputs
- Account
account_idtextRequired - The account for which the contact should be created.
- Email
emailtext - The contact's email address.
- First name
first_nametext - The contact's first name.
- Last name
last_nametext - The contact's last name.
- Metadata
metadataobject - Set of key-value pairs that will be stored with the object.
- Outbound disabled
outbound_disabledtrue/false - Whether outbound messaging should be manually disabled for the contact.
- Phone number
phone_numbertextRequired - The contact's phone number in E.164 format.
Outputs
dataobject- A contact who has consented to receive messages
Example output
{
"data": {
"email": "sample@example.com",
"first_name": "Example",
"id": "sample_id",
"last_name": "Example",
"metadata": {},
"outbound_disabled": false,
"phone_number": "Example"
}
}Create a message
Send a text message now or schedule it for later.
Inputs
- Account
account_idtextRequired - Choose an account.
- Recipient number
totextRequired - Recipient phone number in E.164 format.
- Sender number
from_numbertext - Surge sender phone number in E.164 format.
- Body
bodytextRequired - Text of the message.
- Send at
send_atdate and time - When to send the message.
Outputs
dataobject- A Message is a communication sent to a Contact.
Example output
{
"data": {
"attachments": [
{
"id": "sample_id",
"type": "file",
"url": "Example"
}
],
"blast_id": "sample_blast_id",
"body": "Example",
"conversation": {
"contact": {
"email": "sample@example.com",
"first_name": "Example",
"id": "sample_id",
"last_name": "Example",
"metadata": {},
"outbound_disabled": false,
"phone_number": "Example"
},
"id": "sample_id",
"phone_number": {
"id": "sample_id",
"metadata": {},
"name": "Example",
"number": "Example",
"type": "alphanumeric"
}
},
"created_at": "2026-11-30T12:00:00Z",
"failure_reason": "Example",
"id": "sample_id",
"metadata": {},
"status": "pending"
}
}List accounts
List all accounts with cursor-based pagination.
Inputs
- After
aftertext - Cursor for forward pagination. Use the next_cursor from a previous response.
- Before
beforetext - Cursor for backward pagination. Use the previous_cursor from a previous response.
Outputs
dataobject- A paginated list of accounts
Example output
{
"data": {
"data": [
{
"brand_name": "Example",
"id": "sample_id",
"name": "Example",
"organization": {
"address": {},
"contact": {},
"country": "Example",
"email": "sample@example.com",
"identifier": "sample_identifier",
"identifier_type": "ein",
"industry": "agriculture",
"mobile_number": "Example",
"regions_of_operation": [
"Example"
],
"registered_name": "Example",
"stock_exchange": "amex",
"stock_symbol": "Example",
"type": "co_op",
"website": "Example"
},
"time_zone": "Example"
}
],
"pagination": {
"next_cursor": "Example",
"previous_cursor": "Example"
}
}
}List available phone numbers
Browse purchasable phone numbers from Surge inventory before buying. Use country=AU to browse Australian mobile numbers with an approved Australia registration. Pagination cursors are always null for now.
Inputs
- Account
account_idtextRequired - The account ID to list available phone numbers for.
- Area code
area_codetext - Filter by 3-digit area code for US and Canadian numbers.
- Country
countrytext - ISO country code to search in.One of:
US(United States),CA(Canada),AU(Australia). - Type
typetext - Number type to search for. For US and Canada, specify local or toll_free, or supply an area code to infer the type. Defaults to mobile for AU.One of:
local,toll_free(Toll free),mobile. - After
aftertext - Cursor for forward pagination. Use the next_cursor from a previous response.
- Before
beforetext - Cursor for backward pagination. Use the previous_cursor from a previous response.
Outputs
dataobject- A list of phone numbers available for purchase
Example output
{
"data": {
"data": [
{
"country": "US",
"number": "Example",
"type": "local"
}
],
"pagination": {
"next_cursor": "Example",
"previous_cursor": "Example"
}
}
}List blocked contacts
Lists the account's blocked contacts, newest first, with cursor-based pagination.
Inputs
- Account
account_idtextRequired - Account id.
- After
aftertext - After.
- Before
beforetext - Before.
Outputs
dataobject- A paginated list of blocked contacts, newest first.
Example output
{
"data": {
"data": [
{
"created_at": "2026-11-30T12:00:00Z",
"id": "sample_id",
"phone_number": "Example",
"reason": "Example"
}
],
"pagination": {
"next_cursor": "Example",
"previous_cursor": "Example"
}
}
}List campaigns
List all campaigns for an account with cursor-based pagination.
Inputs
- Account
account_idtextRequired - The account ID to list campaigns for.
- After
aftertext - Cursor for forward pagination. Use the next_cursor from a previous response.
- Before
beforetext - Cursor for backward pagination. Use the previous_cursor from a previous response.
Outputs
dataobject- A paginated list of campaigns
Example output
{
"data": {
"data": [
{
"account_id": "sample_account_id",
"consent_flow": "Example",
"description": "Example",
"id": "sample_id",
"includes": [
"links"
],
"link_sample": "https://example.com",
"message_samples": [
"Example"
],
"privacy_policy_url": "https://example.com",
"status": "active",
"terms_and_conditions_url": "https://example.com",
"use_cases": [
"account_notification"
],
"volume": "high"
}
],
"pagination": {
"next_cursor": "Example",
"previous_cursor": "Example"
}
}
}List contacts
List all contacts for an account with cursor-based pagination.
Inputs
- Account
account_idtextRequired - The account ID to list contacts for.
- After
aftertext - Cursor for forward pagination. Use the next_cursor from a previous response.
- Before
beforetext - Cursor for backward pagination. Use the previous_cursor from a previous response.
Outputs
dataobject- A paginated list of contacts
Example output
{
"data": {
"data": [
{
"email": "sample@example.com",
"first_name": "Example",
"id": "sample_id",
"last_name": "Example",
"metadata": {},
"outbound_disabled": false,
"phone_number": "Example"
}
],
"pagination": {
"next_cursor": "Example",
"previous_cursor": "Example"
}
}
}List messages
List all messages for an account with cursor-based pagination.
Inputs
- Account
account_idtextRequired - The account ID to list messages for.
- After
aftertext - Cursor for forward pagination. Use the next_cursor from a previous response.
- Before
beforetext - Cursor for backward pagination. Use the previous_cursor from a previous response.
Outputs
dataobject- A paginated list of messages
Example output
{
"data": {
"data": [
{
"attachments": [
{}
],
"blast_id": "sample_blast_id",
"body": "Example",
"conversation": {
"contact": {},
"id": "sample_id",
"phone_number": {}
},
"created_at": "2026-11-30T12:00:00Z",
"failure_reason": "Example",
"id": "sample_id",
"metadata": {},
"status": "pending"
}
],
"pagination": {
"next_cursor": "Example",
"previous_cursor": "Example"
}
}
}List phone numbers
List all phone numbers for an account with cursor-based pagination.
Inputs
- Account
account_idtextRequired - The account ID to list phone numbers for.
- After
aftertext - Cursor for forward pagination. Use the next_cursor from a previous response.
- Before
beforetext - Cursor for backward pagination. Use the previous_cursor from a previous response.
Outputs
dataobject- A paginated list of phone numbers
Example output
{
"data": {
"data": [
{
"caller_id_name_id": "sample_caller_id_name_id",
"campaign": {
"attachment_status": "attached",
"id": "sample_id"
},
"campaign_id": "sample_campaign_id",
"id": "sample_id",
"metadata": {},
"name": "Example",
"number": "Example",
"type": "alphanumeric"
}
],
"pagination": {
"next_cursor": "Example",
"previous_cursor": "Example"
}
}
}List recordings
List all recordings for an account with cursor-based pagination.
Inputs
- Account
account_idtextRequired - The account ID to list recordings for.
- After
aftertext - Cursor for forward pagination. Use the next_cursor from a previous response.
- Before
beforetext - Cursor for backward pagination. Use the previous_cursor from a previous response.
Outputs
dataobject- A paginated list of recordings
Example output
{
"data": {
"data": [
{
"call": {
"contact": {},
"duration": 1,
"id": "sample_id",
"initiated_at": "2026-11-30T12:00:00Z",
"status": "blocked"
},
"duration": 1,
"id": "sample_id"
}
],
"pagination": {
"next_cursor": "Example",
"previous_cursor": "Example"
}
}
}List toll-free campaigns
List all toll-free campaigns for an account with cursor-based pagination.
Inputs
- Account
account_idtextRequired - The account ID to list toll-free campaigns for.
- After
aftertext - Cursor for forward pagination. Use the next_cursor from a previous response.
- Before
beforetext - Cursor for backward pagination. Use the previous_cursor from a previous response.
Outputs
dataobject- A paginated list of toll-free campaigns
Example output
{
"data": {
"data": [
{
"consent_flows": [
{}
],
"description": "Example",
"id": "sample_id",
"includes": [
"age_gated"
],
"message_samples": [
"Example"
],
"phone_number_id": "sample_phone_number_id",
"privacy_policy_url": "https://example.com",
"status": "active",
"terms_and_conditions_url": "https://example.com",
"use_cases": [
"two_factor_authentication"
]
}
],
"pagination": {
"next_cursor": "Example",
"previous_cursor": "Example"
}
}
}List users
List all users for an account with cursor-based pagination.
Inputs
- Account
account_idtextRequired - The account ID to list users for.
- After
aftertext - Cursor for forward pagination. Use the next_cursor from a previous response.
- Before
beforetext - Cursor for backward pagination. Use the previous_cursor from a previous response.
Outputs
dataobject- A paginated list of users
Example output
{
"data": {
"data": [
{
"first_name": "Example",
"id": "sample_id",
"last_name": "Example",
"metadata": {},
"photo_url": "https://example.com"
}
],
"pagination": {
"next_cursor": "Example",
"previous_cursor": "Example"
}
}
}Retrieve a campaign
Retrieves a Campaign object.
Inputs
- ID
idtextRequired - The ID of the campaign to retrieve.
Outputs
dataobject- A campaign represents the context in which one or more of your phone numbers communicates with your contacts. Consent and opt-outs are tied to the campaign.
Example output
{
"data": {
"account_id": "sample_account_id",
"consent_flow": "Example",
"description": "Example",
"id": "sample_id",
"includes": [
"links"
],
"link_sample": "https://example.com",
"message_samples": [
"Example"
],
"privacy_policy_url": "https://example.com",
"status": "active",
"terms_and_conditions_url": "https://example.com",
"use_cases": [
"account_notification"
],
"volume": "high"
}
}Retrieve a contact
Retrieves a Contact object.
Inputs
- ID
idtextRequired - The ID of the contact to retrieve.
Outputs
dataobject- A contact who has consented to receive messages
Example output
{
"data": {
"email": "sample@example.com",
"first_name": "Example",
"id": "sample_id",
"last_name": "Example",
"metadata": {},
"outbound_disabled": false,
"phone_number": "Example"
}
}Retrieve a message
Retrieves a Message object.
Inputs
- ID
idtextRequired - The ID of the message to retrieve.
Outputs
dataobject- A Message is a communication sent to a Contact.
Example output
{
"data": {
"attachments": [
{
"id": "sample_id",
"type": "file",
"url": "Example"
}
],
"blast_id": "sample_blast_id",
"body": "Example",
"conversation": {
"contact": {
"email": "sample@example.com",
"first_name": "Example",
"id": "sample_id",
"last_name": "Example",
"metadata": {},
"outbound_disabled": false,
"phone_number": "Example"
},
"id": "sample_id",
"phone_number": {
"id": "sample_id",
"metadata": {},
"name": "Example",
"number": "Example",
"type": "alphanumeric"
}
},
"created_at": "2026-11-30T12:00:00Z",
"failure_reason": "Example",
"id": "sample_id",
"metadata": {},
"status": "pending"
}
}Retrieve a phone number
Retrieves a PhoneNumber object.
Inputs
- ID
idtextRequired - The ID of the phone number to retrieve.
Outputs
dataobject- A phone number that can be used to send and receive messages and calls
Example output
{
"data": {
"caller_id_name_id": "sample_caller_id_name_id",
"campaign": {
"attachment_status": "attached",
"id": "sample_id"
},
"campaign_id": "sample_campaign_id",
"id": "sample_id",
"metadata": {},
"name": "Example",
"number": "Example",
"type": "alphanumeric"
}
}Retrieve a recording
Retrieves a Recording object.
Inputs
- ID
idtextRequired - The ID of the recording to retrieve.
Outputs
dataobject- A call recording
Example output
{
"data": {
"call": {
"contact": {
"email": "sample@example.com",
"first_name": "Example",
"id": "sample_id",
"last_name": "Example",
"metadata": {},
"outbound_disabled": false,
"phone_number": "Example"
},
"duration": 1,
"id": "sample_id",
"initiated_at": "2026-11-30T12:00:00Z",
"status": "blocked"
},
"duration": 1,
"id": "sample_id"
}
}Retrieve account usage
Returns priced usage for an account between start_time (inclusive) and end_time (exclusive). Both times must be whole UTC minutes and must fall within the last year. The window may span at most 90 days. Prices use the project's current plan rates. Phone number, campaign, and recording storage charges are included when their billing time falls in the window.
Inputs
- Account
account_idtextRequired - ID of the account.
- Start time
start_timedate and timeRequired - Inclusive start of the window. Must be a whole UTC minute.
- End time
end_timedate and timeRequired - Exclusive end of the window. Must be a whole UTC minute.
Outputs
dataobject- Priced usage for an account over a requested window.
Example output
{
"data": {
"end_time": "2026-11-30T12:00:00Z",
"line_items": [
{
"category": "sms",
"count": 1,
"item": "Example",
"total_price": "Example",
"unit": "segment",
"unit_price": "Example"
}
],
"start_time": "2026-11-30T12:00:00Z",
"total": "Example"
}
}Retrieve an account
Retrieves an Account object.
Inputs
- ID
idtextRequired - The ID of the account to retrieve.
Outputs
dataobject- Response containing account information.
Example output
{
"data": {
"brand_name": "Example",
"id": "sample_id",
"name": "Example",
"organization": {
"address": {
"country": "Example",
"line1": "Example",
"line2": "Example",
"locality": "Example",
"name": "Example",
"postal_code": "Example",
"region": "Example"
},
"contact": {
"email": "sample@example.com",
"first_name": "Example",
"last_name": "Example",
"phone_number": "Example",
"title": "ceo",
"title_other": "Example"
},
"country": "Example",
"email": "sample@example.com",
"identifier": "sample_identifier",
"identifier_type": "ein",
"industry": "agriculture",
"mobile_number": "Example",
"regions_of_operation": [
"africa"
],
"registered_name": "Example",
"stock_exchange": "amex",
"stock_symbol": "Example",
"type": "co_op",
"website": "Example"
},
"time_zone": "Example"
}
}