Account
The /account
endpoint allows you to manage the current Account.
Get Current Account
Retrieve all account information for the current account.
Endpoint: /account
Method: GET
Headers
Header | Value |
---|---|
Authorization | Bearer <YOUR_JWT_TOKEN> |
Example Request
There is no JSON body with this request.
Example Response
{
"id": "<ACCOUNT_ID>",
"name": "My Account",
"email_domains": [],
"members": [
{
"role": "owner",
"user": {
"id": "<USER_ID>",
"name": "John Doe",
"email": "john.doe@example.com",
"picture": "https://lh3.googleusercontent.com/a/default-user=s96-c"
},
"disabled": false
}
],
"onboarding": {
"completed": false,
"completed_at": null
},
"datacenter": "aws",
"created_by": "user:<USER_ID>",
"updated_by": "user:<USER_ID>",
"created_at": "2023-01-01T00:00:00.000Z",
"updated_at": "2023-01-01T00:00:00.000Z"
}
Code Examples
Get Current Account
curl --location --request GET 'https://studio-server-production.api.becomposable.com/api/v1/account' \
--header 'Authorization: Bearer <YOUR_JWT_TOKEN>'
Update Current Account
Update account information for the current account.
Endpoint: /account
Method: PUT
Headers
Header | Value |
---|---|
Authorization | Bearer <YOUR_JWT_TOKEN> |
Input Parameters
Parameter | Data Type | Description |
---|---|---|
name | string | The new name of the account. |
email_domains | string[] | The new list of allowed email domains. |
Example Request
{
"name": "My Updated Account",
"email_domains": ["example.com"]
}
Example Response
{
"id": "<ACCOUNT_ID>",
"name": "My Updated Account",
"email_domains": [
"example.com"
],
"members": [
{
"role": "owner",
"user": {
"id": "<USER_ID>",
"name": "John Doe",
"email": "john.doe@example.com",
"picture": "https://lh3.googleusercontent.com/a/default-user=s96-c"
},
"disabled": false
}
],
"onboarding": {
"completed": false,
"completed_at": null
},
"datacenter": "aws",
"created_by": "user:<USER_ID>",
"updated_by": "user:<USER_ID>",
"created_at": "2023-01-01T00:00:00.000Z",
"updated_at": "2023-01-01T00:00:00.000Z"
}
Code Examples
Update Current Account
curl --location --request PUT 'https://studio-server-production.api.becomposable.com/api/v1/account' \
--header 'Authorization: Bearer <YOUR_JWT_TOKEN>' \
--header 'Content-Type: application/json' \
--data-raw '{
"name": "My Updated Account",
"email_domains": ["example.com"]
}'
Get Projects
Get all projects in the account.
Endpoint: /account/projects
Method: GET
Headers
Header | Value |
---|---|
Authorization | Bearer <YOUR_JWT_TOKEN> |
Example Request
There is no JSON body with this request.
Example Response
{
"data": [
{
"id": "<PROJECT_ID>",
"name": "My Project",
"account": "<ACCOUNT_ID>"
}
]
}
Code Examples
Get Projects
curl --location --request GET 'https://studio-server-production.api.becomposable.com/api/v1/account/projects' \
--header 'Authorization: Bearer <YOUR_JWT_TOKEN>'
Check Invites
Check for pending invites for the current account.
Endpoint: /account/invites
Method: GET
Headers
Header | Value |
---|---|
Authorization | Bearer <YOUR_JWT_TOKEN> |
Example Request
There is no JSON body with this request.
Example Response
[
{
"id": "<INVITE_ID>",
"type": "user-invite",
"data": {
"email": "jane.doe@example.com",
"role": "developer",
"account": {
"id": "<ACCOUNT_ID>",
"name": "My Account"
},
"projects": [],
"invitedBy": {
"name": "John Doe",
"email": "john.doe@example.com"
}
},
"expires": "2024-01-01T00:00:00.000Z",
"account": "<ACCOUNT_ID>",
"created_at": "2023-01-01T00:00:00.000Z",
"updated_at": "2023-01-01T00:00:00.000Z"
}
]
Code Examples
Check Invites
curl --location --request GET 'https://studio-server-production.api.becomposable.com/api/v1/account/invites' \
--header 'Authorization: Bearer <YOUR_JWT_TOKEN>'
Invite User
Invite a user to the current account.
Endpoint: /account/invites
Method: POST
Headers
Header | Value |
---|---|
Authorization | Bearer <YOUR_JWT_TOKEN> |
Input Parameters
Parameter | Data Type | Description |
---|---|---|
string | The email address of the user to invite. | |
role | ProjectRoles | The role to assign to the user. |
projects | string[] | The IDs of the projects to invite the user to. |
Example Request
{
"email": "jane.doe@example.com",
"role": "developer",
"projects": ["<PROJECT_ID>"]
}
Example Response
{
"action": "invited"
}
Code Examples
Invite User
curl --location --request POST 'https://studio-server-production.api.becomposable.com/api/v1/account/invites' \
--header 'Authorization: Bearer <YOUR_JWT_TOKEN>' \
--header 'Content-Type: application/json' \
--data-raw '{
"email": "jane.doe@example.com",
"role": "developer",
"projects": ["<PROJECT_ID>"]
}'
Accept Invite
Accept an invite to the current account.
Endpoint: /account/invites/<TOKEN_ID>
Method: PUT
Headers
Header | Value |
---|---|
Authorization | Bearer <YOUR_JWT_TOKEN> |
Path Parameters
Parameter | Description |
---|---|
TOKEN_ID | The ID of the invite token. |
Example Request
There is no JSON body with this request.
Example Response
{
"status": "added"
}
Code Examples
Accept Invite
curl --location --request PUT 'https://studio-server-production.api.becomposable.com/api/v1/account/invites/<TOKEN_ID>' \
--header 'Authorization: Bearer <YOUR_JWT_TOKEN>'
Decline Invite
Decline an invite to the current account.
Endpoint: /account/invites/<TOKEN_ID>
Method: DELETE
Headers
Header | Value |
---|---|
Authorization | Bearer <YOUR_JWT_TOKEN> |
Path Parameters
Parameter | Description |
---|---|
TOKEN_ID | The ID of the invite token. |
Example Request
There is no JSON body with this request.
Example Response
{
"status": "deleted"
}
Code Examples
Decline Invite
curl --location --request DELETE 'https://studio-server-production.api.becomposable.com/api/v1/account/invites/<TOKEN_ID>' \
--header 'Authorization: Bearer <YOUR_JWT_TOKEN>'
Get Onboarding Progress
Get onboarding progress for the current account.
Endpoint: /account/onboarding
Method: GET
Headers
Header | Value |
---|---|
Authorization | Bearer <YOUR_JWT_TOKEN> |
Example Request
There is no JSON body with this request.
Example Response
{
"projects": true,
"interactions": true,
"prompts": true,
"environments": true,
"runs": true,
"default_environment_defined": true
}
Code Examples
Get Onboarding Progress
curl --location --request GET 'https://studio-server-production.api.becomposable.com/api/v1/account/onboarding' \
--header 'Authorization: Bearer <YOUR_JWT_TOKEN>'
Get Account Members
Get users for the current account.
Endpoint: /account/members
Method: GET
Headers
Header | Value |
---|---|
Authorization | Bearer <YOUR_JWT_TOKEN> |
Example Request
There is no JSON body with this request.
Example Response
[
{
"id": "<USER_ID>",
"externalId": "<EXTERNAL_ID>",
"email": "john.doe@example.com",
"name": "John Doe",
"username": "johndoe",
"picture": "https://lh3.googleusercontent.com/a/default-user=s96-c",
"language": "en",
"phone": "+15555551212",
"sign_in_provider": "google.com",
"last_selected_account": "<ACCOUNT_ID>"
}
]
Code Examples
Get Account Members
curl --location --request GET 'https://studio-server-production.api.becomposable.com/api/v1/account/members' \
--header 'Authorization: Bearer <YOUR_JWT_TOKEN>'