Help Center/ Organizations/ API Reference/ APIs/ Managing Accounts/ Creating an Account (Recommended)
Updated on 2025-08-14 GMT+08:00

Creating an Account (Recommended)

Function

This API is used to create an account without specifying the mobile number and email address. The created account automatically becomes a member of the organization holding the account that calls this API. It can be called only from the organization's management account. The Organizations service creates the required service-linked agency and account access agency in the new account.

Debugging

You can debug this API through automatic authentication in API Explorer or use the SDK sample code generated by API Explorer.

URI

POST https://{endpoint}/v2/organizations/accounts

Request Parameters

Table 1 Request header parameters

Parameter

Mandatory

Type

Description

X-Security-Token

No

String

Security token (session token) of your temporary security credentials. If a temporary security credential is used, this header is required.

Table 2 Request body parameters

Parameter

Mandatory

Type

Description

name

Yes

String

Account name.

agency_name

No

String

Agency name.

description

No

String

Description.

tags

No

Array of TagDto objects

List of tags you want to attach to the new account.

Table 3 TagDto

Parameter

Mandatory

Type

Description

key

Yes

String

Identifier or name of the tag key.

value

Yes

String

String value associated with the tag key. You can set the tag value to an empty string, but cannot set it to NULL.

Response Parameters

Status code: 202

Table 4 Response body parameters

Parameter

Type

Description

create_account_status

CreateAccountStatusDto object

States of CreateAccount requests for an organization.

Table 5 CreateAccountStatusDto

Parameter

Type

Description

account_id

String

Unique ID of the newly created account if any.

account_name

String

Account name.

completed_at

String

Date and time when the account was created and the request was completed.

created_at

String

Date and time when the CreateAccount request was made.

id

String

Unique ID of a request. You can get this value from the response to the initial CreateAccount request.

state

String

Status of the asynchronous request for creating an account.

failure_reason

String

Reason for a request failure.

failure_detail_msg

failure_detail_msg object

Detailed reason why the request fails.

Table 6 failure_detail_msg

Parameter

Type

Description

error_msg

String

Transparently Transmitting Error Codes

encoded_authorization_message

String

Transparently Transmitting Authentication Failure Information

Example Requests

Creating an account

POST https://{hostname}/v1/organizations/accounts

{
  "name" : "C9Qzukfn6FIyxAmC3dQclrwZW34UDu_rPSRrCQ4aGFm0-r1zC2RDHt5oHA-aY21B",
  "tags" : [ {
    "key" : "keystring",
    "value" : "valuestring"
  } ]
}

Example Responses

Status code: 202

Successful

{
  "create_account_status" : {
    "account_id" : "0a6d25d23900d45c0faac010e0fb4de0",
    "account_name" : "paas_iam_573331",
    "completed_at" : "2022-08-24T06:41:15Z",
    "created_at" : "2022-08-24T06:41:15Z",
    "id" : "h-awjp43m7bz3b8jgy5v61jrfwakt3og8w",
    "state" : "in_progress",
    "failure_reason" : "string"
  }
}

Status Codes

Status Code

Description

202

Successful

Error Codes

See Error Codes.