MyanLex

Create a scoped project key (api_key.create)

Verified session required. Membership and current dynamic permissions are checked on every request. Writes require the configured trusted Origin.

POST/platform/organizations/{organizationId}/projects/{projectId}/api-keys

Verified session required. Membership and current dynamic permissions are checked on every request. Writes require the configured trusted Origin.

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

Path Parameters

organizationId*string

Tenant-scoped resource identifier.

Formatuuid
projectId*string

Tenant-scoped resource identifier.

Formatuuid

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

curl -X POST "https://example.com/platform/organizations/497f6eca-6276-4993-bfeb-53cbbbba6f08/projects/497f6eca-6276-4993-bfeb-53cbbbba6f08/api-keys" \  -H "Content-Type: application/json" \  -d '{    "name": "string",    "scopes": [      "api.invoke"    ]  }'
{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "projectId": "5a8591dd-4039-49df-9202-96385ba3eff8",  "name": "string",  "prefix": "string",  "scopes": [    "string"  ],  "createdAt": "2019-08-24T14:15:22Z",  "lastUsedAt": "2019-08-24T14:15:22Z",  "expiresAt": "2019-08-24T14:15:22Z",  "revokedAt": "2019-08-24T14:15:22Z",  "secret": "string"}