Skip to main content

Accounts API

The Accounts API allows you to manage accounts in Quave ONE. You can create, retrieve, list, and delete accounts.

Make sure to read the Get Started document to understand how the API works.

Note: All endpoints in this API accept only the user token.

Create Account

To create a new account, send a POST request to the /api/public/v1/account endpoint. Below are the fields you can provide:

FieldTypeDescriptionRequired
nameStringThe name of the account to be created.Yes

For agent automation tests, account names that begin with agent-test create internal test accounts with a 100 zCloud limit, default access to the us-5 region in production, and access to all st-* regions in staging.

Example:

curl -X POST \
-H 'Authorization: YOUR_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"name": "My New Account"
}' \
https://api.quave.cloud/api/public/v1/account

Example Response:

{
"accountId": "5f7b1b7b7b7b7b7b7b7b7b7b"
}

The response contains the accountId of the newly created account.

To add container registry credentials to your account, see the Credentials API.

Get Account

To retrieve an account, send a GET request to the /api/public/v1/account endpoint. You need to provide the accountId as a query parameter.

Example:

curl -X GET \
-H 'Authorization: YOUR_TOKEN' \
https://api.quave.cloud/api/public/v1/account?accountId=5f7b1b7b7b7b7b7b7b7b7b7b

Example Response:

{
"accountId": "5f7b1b7b7b7b7b7b7b7b7b7b",
"name": "My Account",
"slug": "my-account",
"isVerified": true,
"allowAutoScaling": true,
"isCurrent": true
}

The response contains the following fields:

FieldTypeDescription
accountIdStringThe account ID.
nameStringThe account name.
slugStringThe account slug.
isVerifiedBooleanWhether the account is verified.
allowAutoScalingBooleanWhether autoscaling is allowed for this account.
isCurrentBooleanWhether this account is currently selected by the user.

List Accounts

To list all accounts that the authenticated user has access to, send a GET request to the /api/public/v1/accounts endpoint.

This endpoint returns all accounts where the user is a member, based on their account memberships.

Example:

curl -X GET \
-H 'Authorization: YOUR_TOKEN' \
https://api.quave.cloud/api/public/v1/accounts

Example Response:

{
"accounts": [
{
"accountId": "5f7b1b7b7b7b7b7b7b7b7b7b",
"name": "My Account",
"slug": "my-account",
"isVerified": true,
"allowAutoScaling": true,
"isCurrent": true
},
{
"accountId": "5f7b1b7b7b7b7b7b7b7b7b7c",
"name": "Another Account",
"slug": "another-account",
"isVerified": false,
"allowAutoScaling": false,
"isCurrent": false
}
]
}

The response contains an array of accounts, where each account has the following fields:

FieldTypeDescription
accountIdStringThe account ID.
nameStringThe account name.
slugStringThe account slug.
isVerifiedBooleanWhether the account is verified.
allowAutoScalingBooleanWhether autoscaling is allowed for this account.
isCurrentBooleanWhether this account is currently selected by the user.

Delete Account

To delete an account, send a DELETE request to the /api/public/v1/account endpoint. You need to provide the accountId as a query parameter.

Example:

curl -X DELETE \
-H 'Authorization: YOUR_TOKEN' \
https://api.quave.cloud/api/public/v1/account?accountId=5f7b1b7b7b7b7b7b7b7b7b7b

Example Response:

{
"message": "Account deleted successfully"
}

Note: Deleting an account requires admin permissions.

Get Current Account

To retrieve the current active account for the authenticated user, send a GET request to the /api/public/v1/current-account endpoint.

This endpoint returns the account that is currently set as the user's active account (stored in the lastAccountId field).

Example:

curl -X GET \
-H 'Authorization: YOUR_TOKEN' \
https://api.quave.cloud/api/public/v1/current-account

Example Response:

{
"accountId": "5f7b1b7b7b7b7b7b7b7b7b7b",
"name": "My Current Account",
"slug": "my-current-account",
"isVerified": true,
"allowAutoScaling": true,
"isCurrent": true
}

The response contains the following fields:

FieldTypeDescription
accountIdStringThe current account ID.
nameStringThe current account name.
slugStringThe current account slug.
isVerifiedBooleanWhether the current account is verified.
allowAutoScalingBooleanWhether autoscaling is allowed for this account.
isCurrentBooleanAlways true for this endpoint since it returns the current account.

Error Responses:

  • 401 - User not authenticated
  • 403 - Access denied to current account
  • 404 - No current account set or account not found

Set Current Account

To change the user's current active account, send a PUT request to the /api/public/v1/current-account endpoint.

The user must have access to the account they want to set as current. This updates the lastAccountId field for the user.

Example:

curl -X PUT \
-H 'Authorization: YOUR_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"accountId": "5f7b1b7b7b7b7b7b7b7b7b7b"
}' \
https://api.quave.cloud/api/public/v1/current-account

Request Body:

FieldTypeDescriptionRequired
accountIdStringThe ID of the account to set as current.Yes

Example Response:

{
"accountId": "5f7b1b7b7b7b7b7b7b7b7b7b",
"name": "My New Current Account",
"slug": "my-new-current-account",
"isVerified": true,
"allowAutoScaling": true,
"isCurrent": true,
"message": "Current account updated successfully"
}

The response contains the following fields:

FieldTypeDescription
accountIdStringThe new current account ID.
nameStringThe new current account name.
slugStringThe new current account slug.
isVerifiedBooleanWhether the new current account is verified.
allowAutoScalingBooleanWhether autoscaling is allowed for this account.
isCurrentBooleanAlways true for this endpoint since it returns the newly set current account.
messageStringSuccess confirmation message.

Error Responses:

  • 400 - Invalid request body (validation error)
  • 401 - User not authenticated
  • 403 - Account not found or access denied
  • 404 - Account not found

Set Account MFA Requirement

To enable or disable the account-wide two-factor authentication (MFA) requirement, send a PATCH request to the /api/public/v1/account/require-mfa endpoint. Requires admin permission on the account.

When enabled, every member must have TOTP enabled or an active SSO session before accessing the account. Members without coverage keep their login but are prompted to set up MFA before reaching account content — nobody is logged out. To enable the requirement, the authenticated user must already have MFA coverage themselves.

Example:

curl -X PATCH \
-H 'Authorization: YOUR_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"accountId": "5f7b1b7b7b7b7b7b7b7b7b7b",
"requireMfa": true
}' \
https://api.quave.cloud/api/public/v1/account/require-mfa

Request Body:

FieldTypeDescriptionRequired
accountIdStringThe ID of the account to update.Yes
requireMfaBooleantrue to require two-factor authentication for all members, false to stop requiring it.Yes

Example Response:

{
"success": true,
"accountId": "5f7b1b7b7b7b7b7b7b7b7b7b",
"requireMfa": true,
"members": 8,
"coveredMembers": 3,
"message": "Two-factor authentication is now required for this account."
}

The response contains the following fields:

FieldTypeDescription
successBooleanAlways true on success.
accountIdStringThe account ID that was updated.
requireMfaBooleanThe resulting requirement state.
membersNumberTotal members in the account at the time of the change.
coveredMembersNumberMembers already covered (TOTP or SSO) at the time of the change.
messageStringSuccess confirmation message.

Error Responses:

  • 400 - Missing accountId or requireMfa, or (when enabling) the authenticated user does not have MFA enabled themselves
  • 401 - User not authenticated
  • 403 - Admin permission required
  • 404 - Account not found