Workspaces
Create workspace
Create a new workspace. Requires an active subscription.
POST
/
workspaces
Create workspace
curl --request POST \
--url https://app.mavera.io/api/v1/workspaces \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"type": "user",
"image": "<string>",
"budget_alert": 123,
"usage_limit": 123,
"billing_email": "jsmith@example.com"
}
'import requests
url = "https://app.mavera.io/api/v1/workspaces"
payload = {
"name": "<string>",
"type": "user",
"image": "<string>",
"budget_alert": 123,
"usage_limit": 123,
"billing_email": "jsmith@example.com"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
type: 'user',
image: '<string>',
budget_alert: 123,
usage_limit: 123,
billing_email: 'jsmith@example.com'
})
};
fetch('https://app.mavera.io/api/v1/workspaces', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.mavera.io/api/v1/workspaces"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"type\": \"user\",\n \"image\": \"<string>\",\n \"budget_alert\": 123,\n \"usage_limit\": 123,\n \"billing_email\": \"jsmith@example.com\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"id": "<string>",
"object": "workspace",
"name": "<string>",
"image": "<string>",
"type": "enterprise",
"role": "owner",
"is_owner": true,
"member_count": 123,
"project_count": 123,
"thread_count": 123,
"budget_alert": 123,
"usage_limit": 123,
"billing_email": "<string>",
"members": [
{
"object": "workspace.member",
"user_id": "<string>",
"email": "jsmith@example.com",
"role": "owner",
"status": "active",
"joined_at": "2023-11-07T05:31:56Z"
}
],
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"error": {
"message": "Invalid API key.",
"type": "authentication_error",
"code": "invalid_api_key",
"param": null
}
}{
"error": {
"message": "Invalid API key.",
"type": "authentication_error",
"code": "invalid_api_key",
"param": null
}
}{
"error": {
"message": "Invalid API key.",
"type": "authentication_error",
"code": "invalid_api_key",
"param": null
}
}Authorizations
API key prefixed with mvra_live_. Create keys at Settings > Developer > API Keys.
Body
application/json
Workspace name
Required string length:
1 - 100Workspace type
Available options:
enterprise, marketing_agency, user, starter Workspace image URL
Credit usage alert threshold
Credit usage limit
Email for billing notifications
Response
Workspace created successfully
Unique workspace identifier
Available options:
workspace Workspace name
Workspace image URL
Type of workspace
Available options:
enterprise, marketing_agency, user, starter Your role in this workspace
Available options:
owner, manager, analyst, viewer, editor, creative_specialist, client_viewer, department_admin Whether you are the owner
Total members including owner
Number of projects
Number of threads/conversations
Credit usage alert threshold
Credit usage limit
Email for billing notifications
List of members (when include_members=true)
Show child attributes
Show child attributes
⌘I
Create workspace
curl --request POST \
--url https://app.mavera.io/api/v1/workspaces \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"type": "user",
"image": "<string>",
"budget_alert": 123,
"usage_limit": 123,
"billing_email": "jsmith@example.com"
}
'import requests
url = "https://app.mavera.io/api/v1/workspaces"
payload = {
"name": "<string>",
"type": "user",
"image": "<string>",
"budget_alert": 123,
"usage_limit": 123,
"billing_email": "jsmith@example.com"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
type: 'user',
image: '<string>',
budget_alert: 123,
usage_limit: 123,
billing_email: 'jsmith@example.com'
})
};
fetch('https://app.mavera.io/api/v1/workspaces', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.mavera.io/api/v1/workspaces"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"type\": \"user\",\n \"image\": \"<string>\",\n \"budget_alert\": 123,\n \"usage_limit\": 123,\n \"billing_email\": \"jsmith@example.com\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"id": "<string>",
"object": "workspace",
"name": "<string>",
"image": "<string>",
"type": "enterprise",
"role": "owner",
"is_owner": true,
"member_count": 123,
"project_count": 123,
"thread_count": 123,
"budget_alert": 123,
"usage_limit": 123,
"billing_email": "<string>",
"members": [
{
"object": "workspace.member",
"user_id": "<string>",
"email": "jsmith@example.com",
"role": "owner",
"status": "active",
"joined_at": "2023-11-07T05:31:56Z"
}
],
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"error": {
"message": "Invalid API key.",
"type": "authentication_error",
"code": "invalid_api_key",
"param": null
}
}{
"error": {
"message": "Invalid API key.",
"type": "authentication_error",
"code": "invalid_api_key",
"param": null
}
}{
"error": {
"message": "Invalid API key.",
"type": "authentication_error",
"code": "invalid_api_key",
"param": null
}
}