Skip to main content
GET
/
accounts
JavaScript
import Surge from '@surgeapi/node';

const client = new Surge({
  apiKey: process.env['SURGE_API_KEY'], // This is the default and can be omitted
});

// Automatically fetches more pages as needed.
for await (const account of client.accounts.list()) {
  console.log(account.id);
}
{
  "data": [
    {
      "brand_name": "DT Precision Auto",
      "id": "acct_01jpqjvfg9enpt7pyxd60pcmxj",
      "name": "Account #2840 - DT Precision Auto",
      "organization": {
        "address": {
          "country": "US",
          "line1": "2640 Huron St",
          "line2": null,
          "locality": "Los Angeles",
          "name": "DT Precision Auto",
          "postal_code": "90065",
          "region": "CA"
        },
        "contact": {
          "email": "dom@dtprecisionauto.com",
          "first_name": "Dominic",
          "last_name": "Toretto",
          "phone_number": "+13235556439",
          "title": "other",
          "title_other": "Owner"
        },
        "country": "US",
        "email": "dom@dtprecisionauto.com",
        "identifier": "123456789",
        "identifier_type": "ein",
        "industry": "automotive",
        "mobile_number": "+13235556439",
        "regions_of_operation": [
          "usa_and_canada"
        ],
        "registered_name": "DT Precision Auto LLC",
        "stock_exchange": null,
        "stock_symbol": null,
        "type": "llc",
        "website": "https://dtprecisionauto.com"
      },
      "time_zone": "America/Los_Angeles"
    }
  ],
  "pagination": {
    "next_cursor": "g3QAAAABZAACaWRtAAAAGnBuXzAxamtzY2s5eDdkeW0wZnBxZjdjYmRyeQ==",
    "previous_cursor": null
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.surge.app/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Query Parameters

after
string

Cursor for forward pagination. Use the next_cursor from a previous response.

before
string

Cursor for backward pagination. Use the previous_cursor from a previous response.

Response

List of accounts

A paginated list of accounts

data
Account · object[]
required

The list of accounts

pagination
Pagination · object
required

Cursor-based pagination information

Example:
{
  "next_cursor": "g3QAAAABZAACaWRtAAAAGnBuXzAxamtzY2s5eDdkeW0wZnBxZjdjYmRyeQ==",
  "previous_cursor": null
}