Skip to main content

Orgs

The key's org, and org creation for platform keys.

MethodPathScopeSummary
POST/orgs/platformCreate Org
PATCH/orgs/{slug}/planbearerSet Plan
GET/orgs/meany keyMy Org
POST/orgs/self-servebearerSelf Serve

Try it​

curl -sf -H "Authorization: Bearer $VIGIL_KEY" "$VIGIL_URL/orgs/me"

Routes​

POST /orgs/​

Create Org. Scope: platform.

Request body:

{
"slug": "string",
"name": "string"
}
FieldTypeRequiredNotes
slugstringyes
namestringyes

Response 200:

{
"id": 0,
"slug": "string",
"name": "string",
"created_at": "2026-09-08T00:00:00Z",
"plan": "string",
"limits_json": "string | null",
"billing_email": "string | null",
"signup_ip_hash": "string | null"
}

PATCH /orgs/{slug}/plan​

Set Plan. Scope: bearer.

Change an org's plan, override single limits, or set the billing email. Changing the plan clears overrides.

ParameterInRequiredTypeNotes
slugpathyesstring

Request body:

{
"plan": "string | null",
"limits": {},
"billing_email": "string | null"
}
FieldTypeRequiredNotes
planstring | nullno
limitsobject | nullno
billing_emailstring | nullno

Response 200:

{
"id": 0,
"slug": "string",
"name": "string",
"created_at": "2026-09-08T00:00:00Z",
"plan": "string",
"limits_json": "string | null",
"billing_email": "string | null",
"signup_ip_hash": "string | null"
}

GET /orgs/me​

My Org. Scope: any key.

Response 200:

{
"id": 0,
"slug": "string",
"name": "string",
"created_at": "2026-09-08T00:00:00Z",
"plan": "string",
"limits_json": "string | null",
"billing_email": "string | null",
"signup_ip_hash": "string | null"
}

POST /orgs/self-serve​

Self Serve. Scope: bearer.

Create a free-pilot org and its first admin key without a bearer key. Refuses with a plain 400 on a malformed or reserved slug, a malformed address or a disposable domain; 409 when the slug is taken; 429 past LIMITS["self_serve"] for one client address. The client address is stored as a sha256 hash for abuse review, never raw.

Request body:

{
"slug": "string",
"name": "string",
"email": "string"
}
FieldTypeRequiredNotes
slugstringyes
namestringyes
emailstringyes

Response 200:

{
"org": {
"id": 0,
"slug": "string",
"name": "string",
"created_at": "2026-09-08T00:00:00Z",
"plan": "string",
"limits_json": "string | null",
"billing_email": "string | null",
"signup_ip_hash": "string | null"
},
"api_key": "string"
}

Generated from openapi.json (VIGIL 0.2.0). Scopes follow the router dependencies in VIGIL_SPEC.md section 4.2.