Create a workspace
POST
/v1/admin/workspaces
using System.Net.Http.Headers;var client = new HttpClient();var request = new HttpRequestMessage{ Method = HttpMethod.Post, RequestUri = new Uri("https://api.sealcord.com/v1/admin/workspaces"), Headers = { { "Authorization", "Bearer <token>" }, }, Content = new StringContent("{ \"name\": \"example\", \"slug\": \"example\" }") { Headers = { ContentType = new MediaTypeHeaderValue("application/json") } }};using (var response = await client.SendAsync(request)){ response.EnsureSuccessStatusCode(); var body = await response.Content.ReadAsStringAsync(); Console.WriteLine(body);}package main
import ( "fmt" "strings" "net/http" "io")
func main() {
url := "https://api.sealcord.com/v1/admin/workspaces"
payload := strings.NewReader("{ \"name\": \"example\", \"slug\": \"example\" }")
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(res) fmt.Println(string(body))
}HttpRequest request = HttpRequest.newBuilder() .uri(URI.create("https://api.sealcord.com/v1/admin/workspaces")) .header("Authorization", "Bearer <token>") .header("Content-Type", "application/json") .method("POST", HttpRequest.BodyPublishers.ofString("{ \"name\": \"example\", \"slug\": \"example\" }")) .build();HttpResponse<String> response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());System.out.println(response.body());const url = 'https://api.sealcord.com/v1/admin/workspaces';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"name":"example","slug":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}use serde_json::json;use reqwest;
#[tokio::main]pub async fn main() { let url = "https://api.sealcord.com/v1/admin/workspaces";
let payload = json!({ "name": "example", "slug": "example" });
let mut headers = reqwest::header::HeaderMap::new(); headers.insert("Authorization", "Bearer <token>".parse().unwrap()); headers.insert("Content-Type", "application/json".parse().unwrap());
let client = reqwest::Client::new(); let response = client.post(url) .headers(headers) .json(&payload) .send() .await;
let results = response.unwrap() .json::<serde_json::Value>() .await .unwrap();
dbg!(results);}curl --request POST \ --url https://api.sealcord.com/v1/admin/workspaces \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "name": "example", "slug": "example" }'Create a workspace on Free, owned by you. Only a user through the MCP server (403 forbidden for an API key). An account may own any number of workspaces; 409 slug_taken; 429 past 3 an hour or 10 a day; 503 without Redis. Creating one agrees to the Terms, as in the Console. The token keeps acting in its own workspace.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
name
required
string
slug
required
string
Examplegenerated
{ "name": "example", "slug": "example"}Responses
Section titled “Responses”Missing or invalid API key.
Needs scope workspaces:write.