Accounts
The /accounts
endpoint allows you to create an Account.
Create Account
Create a new account.
Endpoint: /accounts
Method: POST
Headers:
Header | Value |
---|---|
Content-Type | application/json |
Authorization | Bearer <YOUR_JWT_TOKEN> |
Example Request
{
"name": "My New Account"
}
Example Response
{
"id": "642773353b2573b7218a8ebc", // The ID of the created account.
"name": "My New Account", // The name of the created account.
"email_domains": [], // The list of email domains allowed to access the account.
"members": [ // The list of members of the account.
{
"role": "owner", // The role of the member.
"user": { // The user object.
"id": "642773353b2573b7218a8ebb", // The user's ID.
"name": "John Doe", // The user's name.
"email": "john.doe@example.com", // The user's email.
"picture": "https://example.com/john.doe.jpg" // The user's profile picture.
},
"disabled": false // Whether the member is disabled.
}
],
"onboarding": {
"completed": false, // Whether the onboarding process is completed.
"completed_at": null // The date when the onboarding process was completed.
},
"datacenter": "gcp", // The datacenter where the account is hosted.
"created_by": "user:642773353b2573b7218a8ebb", // The ID of the user who created the account.
"updated_by": "user:642773353b2573b7218a8ebb", // The ID of the user who last updated the account.
"created_at": "2023-04-01T12:00:00.000Z", // The date when the account was created.
"updated_at": "2023-04-01T12:00:00.000Z" // The date when the account was last updated.
}
Code Examples
Create Account
curl --location --request POST 'https://api.vertesia.io/api/v1/accounts' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <YOUR_JWT_TOKEN>' \
--data-raw '{
"name": "My New Account"
}'