MyanLex

Create organization and initial membership

Requires a verified account session; API keys are not accepted. POST and PATCH require Origin to exactly match AUTH_PUBLIC_URL. Non-members receive 404; missing member permissions receive 403.

POST/platform/organizations

Requires a verified account session; API keys are not accepted. POST and PATCH require Origin to exactly match AUTH_PUBLIC_URL. Non-members receive 404; missing member permissions receive 403.

Authorization

accountSession
better-auth.session_token<token>

Better Auth signed HttpOnly session cookie; HTTPS uses the __Secure-better-auth.session_token name. Sign in through /api/auth. Browser clients send cookies automatically; do not paste secrets into docs.

In: cookie

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

curl -X POST "https://example.com/platform/organizations" \  -H "Content-Type: application/json" \  -d '{    "name": "string",    "slug": "string"  }'
{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "name": "string",  "slug": "string"}