Create workspace
Creates a new workspace. By default the authenticated user becomes the owner and first member.
Requires a platform API key (sk_user_...). Workspace keys are rejected with 403.
Subscription gate — creating an additional workspace (when the caller already has any workspace membership) requires an active or trialing subscription, or a plan in the allowlist. First-time workspace creation is always allowed.
curl -X POST "https://api.sendkit.ai/v1/workspaces" \
-H "Content-Type: application/json" \
-H "X-Api-Key: YOUR_API_KEY" \
-d '{
"name": "My Sales Team",
"billingEmail": "billing@example.com",
"createUnderOwnerId": "664f0a1b2c3d4e5f6a7b8c9d"
}'
import requests
import json
url = "https://api.sendkit.ai/v1/workspaces"
headers = {
"Content-Type": "application/json",
"X-Api-Key": "YOUR_API_KEY"
}
data = {
"name": "My Sales Team",
"billingEmail": "billing@example.com",
"createUnderOwnerId": "664f0a1b2c3d4e5f6a7b8c9d"
}
response = requests.post(url, headers=headers, json=data)
print(response.json())
const response = await fetch("https://api.sendkit.ai/v1/workspaces", {
method: "POST",
headers: {
"Content-Type": "application/json",
"X-Api-Key": "YOUR_API_KEY"
},
body: JSON.stringify({
"name": "My Sales Team",
"billingEmail": "billing@example.com",
"createUnderOwnerId": "664f0a1b2c3d4e5f6a7b8c9d"
})
});
const data = await response.json();
console.log(data);
package main
import (
"fmt"
"net/http"
"bytes"
"encoding/json"
)
func main() {
data := []byte(`{
"name": "My Sales Team",
"billingEmail": "billing@example.com",
"createUnderOwnerId": "664f0a1b2c3d4e5f6a7b8c9d"
}`)
req, err := http.NewRequest("POST", "https://api.sendkit.ai/v1/workspaces", bytes.NewBuffer(data))
if err != nil {
panic(err)
}
req.Header.Set("Content-Type", "application/json")
req.Header.Set("X-Api-Key", "YOUR_API_KEY")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
fmt.Println("Response Status:", resp.Status)
}
require 'net/http'
require 'json'
uri = URI('https://api.sendkit.ai/v1/workspaces')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Post.new(uri)
request['Content-Type'] = 'application/json'
request['X-Api-Key'] = 'YOUR_API_KEY'
request.body = '{
"name": "My Sales Team",
"billingEmail": "billing@example.com",
"createUnderOwnerId": "664f0a1b2c3d4e5f6a7b8c9d"
}'
response = http.request(request)
puts response.body
{
"success": true,
"data": {
"id": "665a1b2c3d4e5f6a7b8c9d0e",
"name": "My Sales Team",
"ownerId": "664f0a1b2c3d4e5f6a7b8c9d",
"role": "owner",
"status": "active",
"memberCount": 1,
"limits": {
"maxMembers": 5,
"maxCampaigns": 10,
"maxLeads": 1000,
"maxMailboxes": 3
},
"usage": {
"totalCampaigns": 0,
"totalLeads": 0,
"totalMailboxes": 0,
"totalEmailsSent": 0
},
"createdAt": "2025-06-01T10:30:00.000Z"
}
}
{
"error": "Bad Request",
"message": "The request contains invalid parameters or malformed data",
"code": 400,
"details": [
{
"field": "email",
"message": "Invalid email format"
}
]
}
{
"error": "Forbidden",
"message": "You don't have permission to access this resource",
"code": 403
}
{
"error": "Not Found",
"message": "The requested resource was not found",
"code": 404
}
/v1/workspaces
Target server for requests. Edit to use your own host.
Platform API key (sk_user_...) or Workspace API key (sk_...)
The media type of the request body
Workspace name
Billing email for the workspace. Defaults to the (target) owner's account email when omitted.
Optional user ID to create the workspace under. Caller must be an admin in a workspace owned by this user. Must be a 24-character hex ObjectId.
Request Preview
Response
Response will appear here after sending the request
Authentication
API Key for authentication. Platform API key (sk_user_...) or Workspace API key (sk_...)
Body
Billing email for the workspace. Defaults to the (target) owner's account email when omitted.
billing@example.comOptional user ID to create the workspace under. Caller must be an admin in a workspace owned by this user. Must be a 24-character hex ObjectId.
664f0a1b2c3d4e5f6a7b8c9d