curl --request POST \
--url https://charts.basedash.com/api/public/organizations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"customAiContext": "<string>",
"insightsAiContext": "<string>",
"skipOnboarding": true,
"fullEmbedEnabled": true,
"embedAllowedOrigins": [
"<string>"
],
"slug": "<string>",
"billingAccountId": "<string>",
"isBillable": true,
"insightsEnabled": true,
"modelsEnabled": true,
"automationNotificationsVisible": true,
"allowDashboardEmbedding": true,
"insightsPreferredDayOfWeek": 3,
"insightsPreferredDayOfMonth": 16,
"allowOnDemandAiUsage": true,
"aiUsageOverageLimitCents": 123,
"aiUsageUserSpendLimitCents": 123,
"billingEmail": "jsmith@example.com",
"sendInvoicesToBillingEmail": true
}
'import requests
url = "https://charts.basedash.com/api/public/organizations"
payload = {
"name": "<string>",
"customAiContext": "<string>",
"insightsAiContext": "<string>",
"skipOnboarding": True,
"fullEmbedEnabled": True,
"embedAllowedOrigins": ["<string>"],
"slug": "<string>",
"billingAccountId": "<string>",
"isBillable": True,
"insightsEnabled": True,
"modelsEnabled": True,
"automationNotificationsVisible": True,
"allowDashboardEmbedding": True,
"insightsPreferredDayOfWeek": 3,
"insightsPreferredDayOfMonth": 16,
"allowOnDemandAiUsage": True,
"aiUsageOverageLimitCents": 123,
"aiUsageUserSpendLimitCents": 123,
"billingEmail": "jsmith@example.com",
"sendInvoicesToBillingEmail": True
}
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>',
customAiContext: '<string>',
insightsAiContext: '<string>',
skipOnboarding: true,
fullEmbedEnabled: true,
embedAllowedOrigins: ['<string>'],
slug: '<string>',
billingAccountId: '<string>',
isBillable: true,
insightsEnabled: true,
modelsEnabled: true,
automationNotificationsVisible: true,
allowDashboardEmbedding: true,
insightsPreferredDayOfWeek: 3,
insightsPreferredDayOfMonth: 16,
allowOnDemandAiUsage: true,
aiUsageOverageLimitCents: 123,
aiUsageUserSpendLimitCents: 123,
billingEmail: 'jsmith@example.com',
sendInvoicesToBillingEmail: true
})
};
fetch('https://charts.basedash.com/api/public/organizations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://charts.basedash.com/api/public/organizations",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'customAiContext' => '<string>',
'insightsAiContext' => '<string>',
'skipOnboarding' => true,
'fullEmbedEnabled' => true,
'embedAllowedOrigins' => [
'<string>'
],
'slug' => '<string>',
'billingAccountId' => '<string>',
'isBillable' => true,
'insightsEnabled' => true,
'modelsEnabled' => true,
'automationNotificationsVisible' => true,
'allowDashboardEmbedding' => true,
'insightsPreferredDayOfWeek' => 3,
'insightsPreferredDayOfMonth' => 16,
'allowOnDemandAiUsage' => true,
'aiUsageOverageLimitCents' => 123,
'aiUsageUserSpendLimitCents' => 123,
'billingEmail' => 'jsmith@example.com',
'sendInvoicesToBillingEmail' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://charts.basedash.com/api/public/organizations"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"customAiContext\": \"<string>\",\n \"insightsAiContext\": \"<string>\",\n \"skipOnboarding\": true,\n \"fullEmbedEnabled\": true,\n \"embedAllowedOrigins\": [\n \"<string>\"\n ],\n \"slug\": \"<string>\",\n \"billingAccountId\": \"<string>\",\n \"isBillable\": true,\n \"insightsEnabled\": true,\n \"modelsEnabled\": true,\n \"automationNotificationsVisible\": true,\n \"allowDashboardEmbedding\": true,\n \"insightsPreferredDayOfWeek\": 3,\n \"insightsPreferredDayOfMonth\": 16,\n \"allowOnDemandAiUsage\": true,\n \"aiUsageOverageLimitCents\": 123,\n \"aiUsageUserSpendLimitCents\": 123,\n \"billingEmail\": \"jsmith@example.com\",\n \"sendInvoicesToBillingEmail\": true\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))
}HttpResponse<String> response = Unirest.post("https://charts.basedash.com/api/public/organizations")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"customAiContext\": \"<string>\",\n \"insightsAiContext\": \"<string>\",\n \"skipOnboarding\": true,\n \"fullEmbedEnabled\": true,\n \"embedAllowedOrigins\": [\n \"<string>\"\n ],\n \"slug\": \"<string>\",\n \"billingAccountId\": \"<string>\",\n \"isBillable\": true,\n \"insightsEnabled\": true,\n \"modelsEnabled\": true,\n \"automationNotificationsVisible\": true,\n \"allowDashboardEmbedding\": true,\n \"insightsPreferredDayOfWeek\": 3,\n \"insightsPreferredDayOfMonth\": 16,\n \"allowOnDemandAiUsage\": true,\n \"aiUsageOverageLimitCents\": 123,\n \"aiUsageUserSpendLimitCents\": 123,\n \"billingEmail\": \"jsmith@example.com\",\n \"sendInvoicesToBillingEmail\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://charts.basedash.com/api/public/organizations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"customAiContext\": \"<string>\",\n \"insightsAiContext\": \"<string>\",\n \"skipOnboarding\": true,\n \"fullEmbedEnabled\": true,\n \"embedAllowedOrigins\": [\n \"<string>\"\n ],\n \"slug\": \"<string>\",\n \"billingAccountId\": \"<string>\",\n \"isBillable\": true,\n \"insightsEnabled\": true,\n \"modelsEnabled\": true,\n \"automationNotificationsVisible\": true,\n \"allowDashboardEmbedding\": true,\n \"insightsPreferredDayOfWeek\": 3,\n \"insightsPreferredDayOfMonth\": 16,\n \"allowOnDemandAiUsage\": true,\n \"aiUsageOverageLimitCents\": 123,\n \"aiUsageUserSpendLimitCents\": 123,\n \"billingEmail\": \"jsmith@example.com\",\n \"sendInvoicesToBillingEmail\": true\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "<string>",
"name": "<string>",
"slug": "<string>",
"customAiContext": "<string>",
"insightsAiContext": "<string>",
"onboardingStatus": "STARTED",
"fullEmbedEnabled": true,
"embedAllowedOrigins": [
"<string>"
],
"billingAccountId": "<string>",
"isBillable": true,
"insightsEnabled": true,
"modelsEnabled": true,
"automationNotificationsVisible": true,
"allowDashboardEmbedding": true,
"insightsFrequency": "DAILY",
"insightsPreferredDayOfWeek": 123,
"insightsPreferredDayOfMonth": 123,
"allowOnDemandAiUsage": true,
"aiUsageOverageLimitCents": 123,
"aiUsageUserSpendLimitCents": 123,
"billingEmail": "<string>",
"sendInvoicesToBillingEmail": true,
"defaultDashboardAccessAudience": "EVERYONE",
"defaultDashboardAccessLevel": "MANAGE",
"defaultChatAccessAudience": "EVERYONE",
"defaultChatAccessLevel": "MANAGE",
"defaultAutomationAccessAudience": "EVERYONE",
"defaultAutomationAccessLevel": "MANAGE",
"trialEndsAt": "<string>",
"jwtSecret": "<string>"
}
}{
"error": {
"title": "<string>",
"detail": "<string>",
"code": "<string>",
"ip": "<string>"
}
}{
"error": {
"title": "<string>",
"detail": "<string>",
"code": "<string>",
"ip": "<string>"
}
}{
"error": {
"title": "<string>",
"detail": "<string>",
"code": "<string>",
"ip": "<string>"
}
}{
"error": {
"title": "<string>",
"detail": "<string>",
"code": "<string>",
"ip": "<string>"
}
}{
"error": {
"title": "<string>",
"detail": "<string>",
"code": "<string>",
"ip": "<string>"
}
}{
"error": {
"title": "RateLimitExceeded",
"detail": "<string>",
"retryAfterMs": 123,
"code": "<string>",
"ip": "<string>"
}
}{
"error": {
"title": "<string>",
"detail": "<string>",
"code": "<string>",
"ip": "<string>"
}
}Create an organization
Creates a new organization. The authenticated user becomes an admin.
curl --request POST \
--url https://charts.basedash.com/api/public/organizations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"customAiContext": "<string>",
"insightsAiContext": "<string>",
"skipOnboarding": true,
"fullEmbedEnabled": true,
"embedAllowedOrigins": [
"<string>"
],
"slug": "<string>",
"billingAccountId": "<string>",
"isBillable": true,
"insightsEnabled": true,
"modelsEnabled": true,
"automationNotificationsVisible": true,
"allowDashboardEmbedding": true,
"insightsPreferredDayOfWeek": 3,
"insightsPreferredDayOfMonth": 16,
"allowOnDemandAiUsage": true,
"aiUsageOverageLimitCents": 123,
"aiUsageUserSpendLimitCents": 123,
"billingEmail": "jsmith@example.com",
"sendInvoicesToBillingEmail": true
}
'import requests
url = "https://charts.basedash.com/api/public/organizations"
payload = {
"name": "<string>",
"customAiContext": "<string>",
"insightsAiContext": "<string>",
"skipOnboarding": True,
"fullEmbedEnabled": True,
"embedAllowedOrigins": ["<string>"],
"slug": "<string>",
"billingAccountId": "<string>",
"isBillable": True,
"insightsEnabled": True,
"modelsEnabled": True,
"automationNotificationsVisible": True,
"allowDashboardEmbedding": True,
"insightsPreferredDayOfWeek": 3,
"insightsPreferredDayOfMonth": 16,
"allowOnDemandAiUsage": True,
"aiUsageOverageLimitCents": 123,
"aiUsageUserSpendLimitCents": 123,
"billingEmail": "jsmith@example.com",
"sendInvoicesToBillingEmail": True
}
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>',
customAiContext: '<string>',
insightsAiContext: '<string>',
skipOnboarding: true,
fullEmbedEnabled: true,
embedAllowedOrigins: ['<string>'],
slug: '<string>',
billingAccountId: '<string>',
isBillable: true,
insightsEnabled: true,
modelsEnabled: true,
automationNotificationsVisible: true,
allowDashboardEmbedding: true,
insightsPreferredDayOfWeek: 3,
insightsPreferredDayOfMonth: 16,
allowOnDemandAiUsage: true,
aiUsageOverageLimitCents: 123,
aiUsageUserSpendLimitCents: 123,
billingEmail: 'jsmith@example.com',
sendInvoicesToBillingEmail: true
})
};
fetch('https://charts.basedash.com/api/public/organizations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://charts.basedash.com/api/public/organizations",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'customAiContext' => '<string>',
'insightsAiContext' => '<string>',
'skipOnboarding' => true,
'fullEmbedEnabled' => true,
'embedAllowedOrigins' => [
'<string>'
],
'slug' => '<string>',
'billingAccountId' => '<string>',
'isBillable' => true,
'insightsEnabled' => true,
'modelsEnabled' => true,
'automationNotificationsVisible' => true,
'allowDashboardEmbedding' => true,
'insightsPreferredDayOfWeek' => 3,
'insightsPreferredDayOfMonth' => 16,
'allowOnDemandAiUsage' => true,
'aiUsageOverageLimitCents' => 123,
'aiUsageUserSpendLimitCents' => 123,
'billingEmail' => 'jsmith@example.com',
'sendInvoicesToBillingEmail' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://charts.basedash.com/api/public/organizations"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"customAiContext\": \"<string>\",\n \"insightsAiContext\": \"<string>\",\n \"skipOnboarding\": true,\n \"fullEmbedEnabled\": true,\n \"embedAllowedOrigins\": [\n \"<string>\"\n ],\n \"slug\": \"<string>\",\n \"billingAccountId\": \"<string>\",\n \"isBillable\": true,\n \"insightsEnabled\": true,\n \"modelsEnabled\": true,\n \"automationNotificationsVisible\": true,\n \"allowDashboardEmbedding\": true,\n \"insightsPreferredDayOfWeek\": 3,\n \"insightsPreferredDayOfMonth\": 16,\n \"allowOnDemandAiUsage\": true,\n \"aiUsageOverageLimitCents\": 123,\n \"aiUsageUserSpendLimitCents\": 123,\n \"billingEmail\": \"jsmith@example.com\",\n \"sendInvoicesToBillingEmail\": true\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))
}HttpResponse<String> response = Unirest.post("https://charts.basedash.com/api/public/organizations")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"customAiContext\": \"<string>\",\n \"insightsAiContext\": \"<string>\",\n \"skipOnboarding\": true,\n \"fullEmbedEnabled\": true,\n \"embedAllowedOrigins\": [\n \"<string>\"\n ],\n \"slug\": \"<string>\",\n \"billingAccountId\": \"<string>\",\n \"isBillable\": true,\n \"insightsEnabled\": true,\n \"modelsEnabled\": true,\n \"automationNotificationsVisible\": true,\n \"allowDashboardEmbedding\": true,\n \"insightsPreferredDayOfWeek\": 3,\n \"insightsPreferredDayOfMonth\": 16,\n \"allowOnDemandAiUsage\": true,\n \"aiUsageOverageLimitCents\": 123,\n \"aiUsageUserSpendLimitCents\": 123,\n \"billingEmail\": \"jsmith@example.com\",\n \"sendInvoicesToBillingEmail\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://charts.basedash.com/api/public/organizations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"customAiContext\": \"<string>\",\n \"insightsAiContext\": \"<string>\",\n \"skipOnboarding\": true,\n \"fullEmbedEnabled\": true,\n \"embedAllowedOrigins\": [\n \"<string>\"\n ],\n \"slug\": \"<string>\",\n \"billingAccountId\": \"<string>\",\n \"isBillable\": true,\n \"insightsEnabled\": true,\n \"modelsEnabled\": true,\n \"automationNotificationsVisible\": true,\n \"allowDashboardEmbedding\": true,\n \"insightsPreferredDayOfWeek\": 3,\n \"insightsPreferredDayOfMonth\": 16,\n \"allowOnDemandAiUsage\": true,\n \"aiUsageOverageLimitCents\": 123,\n \"aiUsageUserSpendLimitCents\": 123,\n \"billingEmail\": \"jsmith@example.com\",\n \"sendInvoicesToBillingEmail\": true\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "<string>",
"name": "<string>",
"slug": "<string>",
"customAiContext": "<string>",
"insightsAiContext": "<string>",
"onboardingStatus": "STARTED",
"fullEmbedEnabled": true,
"embedAllowedOrigins": [
"<string>"
],
"billingAccountId": "<string>",
"isBillable": true,
"insightsEnabled": true,
"modelsEnabled": true,
"automationNotificationsVisible": true,
"allowDashboardEmbedding": true,
"insightsFrequency": "DAILY",
"insightsPreferredDayOfWeek": 123,
"insightsPreferredDayOfMonth": 123,
"allowOnDemandAiUsage": true,
"aiUsageOverageLimitCents": 123,
"aiUsageUserSpendLimitCents": 123,
"billingEmail": "<string>",
"sendInvoicesToBillingEmail": true,
"defaultDashboardAccessAudience": "EVERYONE",
"defaultDashboardAccessLevel": "MANAGE",
"defaultChatAccessAudience": "EVERYONE",
"defaultChatAccessLevel": "MANAGE",
"defaultAutomationAccessAudience": "EVERYONE",
"defaultAutomationAccessLevel": "MANAGE",
"trialEndsAt": "<string>",
"jwtSecret": "<string>"
}
}{
"error": {
"title": "<string>",
"detail": "<string>",
"code": "<string>",
"ip": "<string>"
}
}{
"error": {
"title": "<string>",
"detail": "<string>",
"code": "<string>",
"ip": "<string>"
}
}{
"error": {
"title": "<string>",
"detail": "<string>",
"code": "<string>",
"ip": "<string>"
}
}{
"error": {
"title": "<string>",
"detail": "<string>",
"code": "<string>",
"ip": "<string>"
}
}{
"error": {
"title": "<string>",
"detail": "<string>",
"code": "<string>",
"ip": "<string>"
}
}{
"error": {
"title": "RateLimitExceeded",
"detail": "<string>",
"retryAfterMs": 123,
"code": "<string>",
"ip": "<string>"
}
}{
"error": {
"title": "<string>",
"detail": "<string>",
"code": "<string>",
"ip": "<string>"
}
}Authorizations
Query Parameters
Body
Allowed origins for embedding. Supports exact URLs (https://example.com) and wildcard patterns (https://*.example.com)
[Self-hosted] Controls whether the organization is billable. Defaults to true. Relevant for self-hosted deployments where billing gates certain features. When false, the organization will not be counted towards billable usage and will have a limited set of features. When true, the organization will be counted towards billable usage (after a 14-day trial) and will have access to all features.
Allow dashboards to be shared by public link or embedded in other websites, including JWT-signed embeds. When false, the option is hidden and every existing public link stops working; dashboards keep their links, so setting this back to true restores them. Does not affect full embed (fullEmbedEnabled). Defaults to true.
Allow users in the organization to continue using AI beyond included monthly AI credits. For an organization attached to a billing account, this controls access beyond the account's pooled included credits for this tenant; the billing account setting still applies to the whole account. Defaults to true.
Maximum AI usage overage for the organization in cents. For an organization attached to a billing account, this is an absolute cap on that organization’s usage during the account billing period, not a share of the pooled credits. The billing account cap also applies. Null means no tenant limit. Only applies when on-demand AI usage is enabled.
x <= 2147483647Maximum billable AI usage per member in cents, each billing period. A member who reaches it can't start new AI requests until the next period; the request that crosses it finishes and counts in full. Applies alongside the organization limits. Null means no per-member limit. Defaults to null.
x <= 2147483647Response
Organization created successfully. The jwtSecret field is only included when explicitly requested via ?include=jwtSecret, and may still be omitted when Basedash withholds the secret for this organization; the organization is created either way. Request it later with GET /api/public/organizations/{id}?include=jwtSecret.