POST/api/v1/orgs

Create a new organization

Creates a new org and assigns the caller as owner (role='owner'). Triggers default RLS bootstrap (auto-creates membership row, default project, default API key). Idempotent per Idempotency-Key (ADR-0024).

Authentication

Send Authorization: Bearer YOUR_API_KEY on every request. Generate API keys at /dashboard/api-keys.

Request body required

Example

{
  "name": "string",
  "slug": "<URL-safe identifier; auto-generated if o>"
}
Schema
{
  "application/json": {
    "schema": {
      "type": "object",
      "required": [
        "name"
      ],
      "properties": {
        "name": {
          "type": "string"
        },
        "slug": {
          "type": "string",
          "description": "URL-safe identifier; auto-generated if omitted."
        }
      }
    }
  }
}

Response

200 example

{
  "success": true
}

All status codes

200Org created.
400(no description)
401(no description)
429(no description)

Code samples

cURL

curl -X POST \
  https://evalguard.ai/api/v1/orgs \
  -H "Authorization: Bearer $EVALGUARD_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "name": "string", "slug": "<URL-safe identifier; auto-generated if o>" }'

TypeScript

import { EvalGuard } from "@evalguard/sdk";

const client = new EvalGuard({ apiKey: process.env.EVALGUARD_API_KEY });

const response = await client.request({
  method: "POST",
  path: "/api/v1/orgs",
  body: {
    "name": "string",
    "slug": "<URL-safe identifier; auto-generated if o>"
  },
});
console.log(response);

Python

from evalguard import EvalGuard
import os

client = EvalGuard(api_key=os.environ["EVALGUARD_API_KEY"])

response = client.request(
    method="POST",
    path="/api/v1/orgs",
    body={
    "name": "string",
    "slug": "<URL-safe identifier; auto-generated if o>"
},
)
print(response)

Go

package main

import (
	"context"
	"fmt"
	"os"

	"github.com/evalguard/evalguard-go"
)

func main() {
	client := evalguard.NewClient(os.Getenv("EVALGUARD_API_KEY"))
	resp, err := client.Request(context.Background(), "POST", "/api/v1/orgs", map[string]any{"name": "string", "slug": "<URL-safe identifier; auto-generated if o>"})
	if err != nil { panic(err) }
	fmt.Println(resp)
}

Errors

400401429

Other Admin endpoints