Skip to main content
PUT
/
account
/
subaccount
/
{subaccount_id}
Update an Existing Sub-Account
curl --request PUT \
  --url https://api.sendpost.io/api/v1/account/subaccount/{subaccount_id} \
  --header 'Content-Type: application/json' \
  --header 'X-Account-ApiKey: <api-key>' \
  --data '{
  "name": "FoxHole V1"
}'
{
  "id": 11,
  "name": "Hooli",
  "created": 1567512491586102000,
  "apiKey": "AHZ3125333JHEP",
  "labels": [
    "label1",
    "label2"
  ],
  "isPlus": true,
  "type": 1,
  "createdBy": {
    "id": 117,
    "isVerified": true,
    "isForbidden": false,
    "email": "raj@piedpiper.com",
    "name": "Raj",
    "logoURL": "https://www.sendpost.io/logo.png",
    "companyName": "SendPost",
    "onboardQAnswered": true,
    "phoneNumber": "+919876543210",
    "created": 1567512491588004000,
    "updated": 1567512491588004000
  },
  "updatedBy": {
    "id": 117,
    "isVerified": true,
    "isForbidden": false,
    "email": "raj@piedpiper.com",
    "name": "Raj",
    "logoURL": "https://www.sendpost.io/logo.png",
    "companyName": "SendPost",
    "onboardQAnswered": true,
    "phoneNumber": "+919876543210",
    "created": 1567512491588004000,
    "updated": 1567512491588004000
  },
  "smtpAuths": [
    {
      "id": 117,
      "username": "default@117.sendpost.io",
      "password": "default@117.sendpost.io",
      "created": 1567512491588004000,
      "updated": 1567512491588004000
    }
  ]
}

Authorizations

X-Account-ApiKey
string
header
required

This api key can be used for all account level operations

Path Parameters

subaccount_id
integer
required

The ID of the sub-account to update.

Example:

12

Body

application/json
name
string

New name for the sub-account.

Example:

"FoxHole V1"

Response

Sub-account successfully updated.

id
integer

Unique ID for the sub-account.

Example:

11

name
string

Name of the sub-account.

Example:

"Hooli"

created
integer

UNIX epoch nano timestamp when the sub-account was created.

Example:

1567512491586102000

apiKey
string

API key for the sub-account.

Example:

"AHZ3125333JHEP"

labels
string[]

Labels associated with the sub-account

Example:
["label1", "label2"]
isPlus
boolean

Indicates whether the sub-account is a Plus sub-account

Example:

true

type
enum<integer>

Type of the sub-account

Available options:
0,
1
Example:

1

createdBy
object

Member who created the sub-account

updatedBy
object

Member who updated the sub-account

smtpAuths
object[]

SMTP Auths associated with the sub-account

I