import Surge from '@surgeapi/node';
const client = new Surge({
apiKey: 'My API Key',
});
const account = await client.accounts.create({ name: 'Account #2840 - DT Precision Auto' });
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": "[email protected]",
"first_name": "Dominic",
"last_name": "Toretto",
"phone_number": "+13235556439",
"title": "other",
"title_other": "Owner"
},
"country": "US",
"email": "[email protected]",
"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"
}Creates a new Account within the calling Platform.
import Surge from '@surgeapi/node';
const client = new Surge({
apiKey: 'My API Key',
});
const account = await client.accounts.create({ name: 'Account #2840 - DT Precision Auto' });
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": "[email protected]",
"first_name": "Dominic",
"last_name": "Toretto",
"phone_number": "+13235556439",
"title": "other",
"title_other": "Owner"
},
"country": "US",
"email": "[email protected]",
"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"
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Parameters for creating a new account.
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.
The name by which the people this account communicates with know it. If not provided, this will match the name field.
Parameters describing the legal entity on whose behalf the account will be operated.
Show child attributes
The address of the organization's headquarters.
Show child attributes
The two character ISO 3166 country code. If none is provided, the organization's country code will be used.
The first line of the address, typically the number and street name
The second line of the address if needed, typically an apartment or suite number
The city or locality
The name to which any mail should be addressed. If none is provided, this will default to the organization's registered_name
The postal code
The state or region
An object representing an individual who can be contacted if Surge or our carrier partners have any questions about the business. If you are registering on behalf of your customer, this must be a contact from your customer's company rather than your own. The individual will likely never be contacted unless there are issues with spam.
Show child attributes
An email address at which the individual can be reached. Typically an email using the same domain name as the website URL will be preferred (e.g. with a website domain of https://dtprecisionauto.com, an email like [email protected] will be preferred over one like [email protected] or [email protected]. [email protected] would also be acceptable, but not preferred)
The first name (or given name) of the individual
The last name (or family name) of the individual
A phone number at which the individual can be reached (E.164 format)
The job title of the individual.
ceo, cfo, director, gm, vp, general_counsel, other If other is provided for the title field, this field should be used to provide the title of the individual
The two character ISO 3166 country code for the country in which the organization is headquartered.
For publicly traded companies, an email for a representative of the company to whom a verification email will be sent. This must be an email on the same domain as the company's website (e.g. with a website domain of https://dtprecisionauto.com, the email must use the same @dtprecisionauto.com)
The value of the identifier whose type is specified in the identifier_type field. Typically this will be an EIN, and can be formatted with or without the hyphen.
The type of identifier being provided for the organization. Support for more values will be added in the future.
ein The industry in which the organization operates.
agriculture, automotive, banking, construction, consumer, education, electronics, energy, engineering, fast_moving_consumer_goods, financial, fintech, food_and_beverage, government, healthcare, hospitality, insurance, jewelry, legal, manufacturing, media, not_for_profit, oil_and_gas, online, professional_services, raw_materials, real_estate, religion, retail, technology, telecommunications, transportation, travel For sole proprietors, this must be a valid US mobile phone number to which a verification text message will be sent. (E.164 format)
An array of regions in which the organization operates.
africa, asia, australia, europe, latin_america, usa_and_canada The legal name of the organization as registered with the IRS or other relevant authorities. For some applications, this will be matched against government records and should include all punctuation and everything else as well.
For publicly traded companies, this is the exchange on which the company's stock is traded.
amex, amx, asx, b3, bme, bse, fra, icex, jpx, jse, krx, lon, nasdaq, none, nyse, nse, omx, other, sehk, sgx, sse, sto, swx, szse, tsx, twse, vse For publicly traded companies, the ticker symbol for the company's stock
The type of organization
co_op, government, llc, non_profit, partnership, private_corporation, public_corporation, sole_proprietor The URL of the website for this organization. The website should be publicly available, clearly reflect the organization's purpose, and the URL should start with https://
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.
"America/Los_Angeles"
Created account
Response containing account information.
The name by which the people this account communicates with know it. If not provided, this will match the name field.
The account ID
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.
The legal entity on whose behalf the account will be operated.
Show child attributes
The address of the organization's headquarters.
Show child attributes
The two character ISO 3166 country code. If none is provided, the organization's country code will be used.
The first line of the address, typically the number and street name
The second line of the address if needed, typically an apartment or suite number
The city or locality
The name to which any mail should be addressed. If none is provided, this will default to the organization's registered_name
The postal code
The state or region
An object representing an individual who can be contacted if the carriers have any questions about the business.
Show child attributes
An email address at which the individual can be reached. Typically an email using the same domain name as the website URL will be preferred (e.g. with a website domain of https://dtprecisionauto.com, an email like [email protected] will be preferred over one like [email protected] or [email protected])
The first name (or given name) of the individual
The last name (or family name) of the individual
A phone number at which the individual can be reached (E.164 format)
The job title of the individual.
ceo, cfo, director, gm, vp, general_counsel, other If other is provided for the title field, this field should be used to provide the title of the individual
The two character ISO 3166 country code for the country in which the organization is headquartered.
For publicly traded companies, an email for a representative of the company to whom a verification email will be sent. This must be an email on the same domain as the company's website (e.g. with a website domain of https://dtprecisionauto.com, the email must use the same @dtprecisionauto.com)
The value of the identifier whose type is specified in the identifier_type field. Typically this will be an EIN, and can be formatted with or without the hyphen.
The type of identifier being provided for the organization. Support for more values will be added in the future.
ein The industry in which the organization operates.
agriculture, automotive, banking, construction, consumer, education, electronics, energy, engineering, fast_moving_consumer_goods, financial, fintech, food_and_beverage, government, healthcare, hospitality, insurance, jewelry, legal, manufacturing, media, not_for_profit, oil_and_gas, online, professional_services, raw_materials, real_estate, religion, retail, technology, telecommunications, transportation, travel For sole proprietors, this must be a valid US mobile phone number to which a verification text message will be sent. (E.164 format)
An array of regions in which the organization operates.
africa, asia, australia, europe, latin_america, usa_and_canada The legal name of the organization as registered with the IRS or other relevant authorities. For some applications, this will be matched against government records and should include all punctuation and everything else as well.
For publicly traded companies, this is the exchange on which the company's stock is traded.
amex, amx, asx, b3, bme, bse, fra, icex, jpx, jse, krx, lon, nasdaq, none, nyse, nse, omx, other, sehk, sgx, sse, sto, swx, szse, tsx, twse, vse For publicly traded companies, the ticker symbol for the company's stock
The type of organization
co_op, government, llc, non_profit, partnership, private_corporation, public_corporation, sole_proprietor The URL of the website for this organization. The website should be publicly available, clearly reflect the organization's purpose, and the URL should start with https://
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.
"America/Los_Angeles"