Skip to main content
PATCH
/
accounts
/
{id}
JavaScript
import Surge from '@surgeapi/node';

const client = new Surge({
  apiKey: 'My API Key',
});

const account = await client.accounts.update('acct_01jpqjvfg9enpt7pyxd60pcmxj');

console.log(account.id);
{
  "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"
}

Authorizations

Authorization
string
header
required

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

Path Parameters

id
string
required

The ID for the account to update.

Example:

"acct_01jpqjvfg9enpt7pyxd60pcmxj"

Body

application/json

Parameters for updating an existing account.

brand_name
string

The name by which the people this account communicates with know it. If not provided, this will match the name field.

name
string

The name of the account that will be visible for your internal organizational purposes. This will also be the default public-facing brand name unless you also set a brand_name, but otherwise the account name will never be displayed anywhere outside of Surge HQ, and may include your ID for the account or anything else that may help you.

organization
object

Parameters describing the legal entity on whose behalf the account will be operated.

time_zone
string | null

The time zone for the account

Example:

"America/Los_Angeles"

Response

Updated account

Response containing account information.

brand_name
string | null
required

The name by which the people this account communicates with know it. If not provided, this will match the name field.

id
string
required

The account ID

name
string
required

The name of the account that will be visible for your internal organizational purposes. This will also be the default public-facing brand name unless you also set a brand_name, but otherwise the account name will never be displayed anywhere outside of Surge HQ, and may include your ID for the account or anything else that may help you.

organization
object
required

The legal entity on whose behalf the account will be operated.

time_zone
string | null
required

This is the time zone in which the account is headquartered. This time zone may be used for compliance with TCPA restrictions on when messages may be sent.

Example:

"America/Los_Angeles"

I