Surge

App · 20 actions

Send SMS and look up contacts, recordings, campaigns and phone numbers in your Surge accounts.

Actions

ActionWhat it does
Check account statusCheck an account's status and capabilities
Create a contactCreates a new Contact object.
Create a messageSend a text message now or schedule it for later.
List accountsList all accounts with cursor-based pagination.
List available phone numbersBrowse purchasable phone numbers from Surge inventory before buying.
List blocked contactsLists the account's blocked contacts, newest first, with cursor-based pagination.
List campaignsList all campaigns for an account with cursor-based pagination.
List contactsList all contacts for an account with cursor-based pagination.
List messagesList all messages for an account with cursor-based pagination.
List phone numbersList all phone numbers for an account with cursor-based pagination.
List recordingsList all recordings for an account with cursor-based pagination.
List toll-free campaignsList all toll-free campaigns for an account with cursor-based pagination.
List usersList all users for an account with cursor-based pagination.
Retrieve a campaignRetrieves a Campaign object.
Retrieve a contactRetrieves a Contact object.
Retrieve a messageRetrieves a Message object.
Retrieve a phone numberRetrieves a PhoneNumber object.
Retrieve a recordingRetrieves a Recording object.
Retrieve account usageReturns priced usage for an account between start_time (inclusive) and end_time (exclusive).
Retrieve an accountRetrieves an Account object.

Check account status

Check an account's status and capabilities

Inputs

Accountaccount_idtextRequired
ID of the account to check
Capabilitiescapabilitieslist
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

Accountaccount_idtextRequired
The account for which the contact should be created.
Emailemailtext
The contact's email address.
First namefirst_nametext
The contact's first name.
Last namelast_nametext
The contact's last name.
Metadatametadataobject
Set of key-value pairs that will be stored with the object.
Outbound disabledoutbound_disabledtrue/false
Whether outbound messaging should be manually disabled for the contact.
Phone numberphone_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

Accountaccount_idtextRequired
Choose an account.
Recipient numbertotextRequired
Recipient phone number in E.164 format.
Sender numberfrom_numbertext
Surge sender phone number in E.164 format.
BodybodytextRequired
Text of the message.
Send atsend_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

Afteraftertext
Cursor for forward pagination. Use the next_cursor from a previous response.
Beforebeforetext
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

Accountaccount_idtextRequired
The account ID to list available phone numbers for.
Area codearea_codetext
Filter by 3-digit area code for US and Canadian numbers.
Countrycountrytext
ISO country code to search in.One of: US (United States), CA (Canada), AU (Australia).
Typetypetext
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.
Afteraftertext
Cursor for forward pagination. Use the next_cursor from a previous response.
Beforebeforetext
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

Accountaccount_idtextRequired
Account id.
Afteraftertext
After.
Beforebeforetext
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

Accountaccount_idtextRequired
The account ID to list campaigns for.
Afteraftertext
Cursor for forward pagination. Use the next_cursor from a previous response.
Beforebeforetext
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

Accountaccount_idtextRequired
The account ID to list contacts for.
Afteraftertext
Cursor for forward pagination. Use the next_cursor from a previous response.
Beforebeforetext
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

Accountaccount_idtextRequired
The account ID to list messages for.
Afteraftertext
Cursor for forward pagination. Use the next_cursor from a previous response.
Beforebeforetext
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

Accountaccount_idtextRequired
The account ID to list phone numbers for.
Afteraftertext
Cursor for forward pagination. Use the next_cursor from a previous response.
Beforebeforetext
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

Accountaccount_idtextRequired
The account ID to list recordings for.
Afteraftertext
Cursor for forward pagination. Use the next_cursor from a previous response.
Beforebeforetext
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

Accountaccount_idtextRequired
The account ID to list toll-free campaigns for.
Afteraftertext
Cursor for forward pagination. Use the next_cursor from a previous response.
Beforebeforetext
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

Accountaccount_idtextRequired
The account ID to list users for.
Afteraftertext
Cursor for forward pagination. Use the next_cursor from a previous response.
Beforebeforetext
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

IDidtextRequired
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

IDidtextRequired
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

IDidtextRequired
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

IDidtextRequired
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

IDidtextRequired
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

Accountaccount_idtextRequired
ID of the account.
Start timestart_timedate and timeRequired
Inclusive start of the window. Must be a whole UTC minute.
End timeend_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

IDidtextRequired
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"
  }
}

On this page