Accounts
Add Aliases to account
Add aliases to an account using customer_id and account_id.
POST
/
accounts
/
{account_id}
/
add_aliases
curl --request POST \
--url https://api.togai.com/accounts/{account_id}/add_aliases \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '{
"aliases": [
"account2@acme.com",
"+1234567890"
]
}'
{
"id": "G234DZZKBKACATFFGVGEMERFI",
"name": "ACME Enterprise - Account2",
"invoiceCurrency": "USD",
"address": {
"phoneNumber": "+919876543210",
"line1": "2281 Broadway Street",
"line2": "G-31",
"postalCode": "29501",
"city": "Florence",
"state": "South Carolina",
"country": "US"
},
"primaryEmail": "admin@example.com",
"aliases": [
{
"alias": "account2@acme.com",
"status": "ACTIVE"
},
{
"alias": "+1234567890",
"status": "ACTIVE"
}
],
"status": "ACTIVE"
}
Authorizations
Authorization
string
headerrequiredBearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Path Parameters
account_id
string
requiredaccount_id corresponding to an account
Body
application/json
aliases
string[]
List of aliases to add
Response
200 - application/json
id
string
requiredIdentifier of the account
name
string
requiredName of the Account
customerId
string
requiredIdentifier of the customer
invoiceCurrency
string
requiredISO_4217 code of the currency in which the account must be invoiced Defaults to Base currency.
aliases
object[]
list of aliases of the account
address
object
billing address of the customer
primaryEmail
string
Primary email of the customer
status
enum<string>
requiredStatus of the account
Available options:
ACTIVE
, ARCHIVED
settings
object[]
invoiceGroupDetails
object
Invoice group details
metadata
object
Additional information associated with the account. Example: GSTN, VATN
curl --request POST \
--url https://api.togai.com/accounts/{account_id}/add_aliases \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '{
"aliases": [
"account2@acme.com",
"+1234567890"
]
}'
{
"id": "G234DZZKBKACATFFGVGEMERFI",
"name": "ACME Enterprise - Account2",
"invoiceCurrency": "USD",
"address": {
"phoneNumber": "+919876543210",
"line1": "2281 Broadway Street",
"line2": "G-31",
"postalCode": "29501",
"city": "Florence",
"state": "South Carolina",
"country": "US"
},
"primaryEmail": "admin@example.com",
"aliases": [
{
"alias": "account2@acme.com",
"status": "ACTIVE"
},
{
"alias": "+1234567890",
"status": "ACTIVE"
}
],
"status": "ACTIVE"
}