headless lms

Create an API key

POST /api/access/api-keys. Create an API key. Headless LMS Access API reference.

POST
/api/access/api-keys

Staff only (owner, admin, instructor). The key acts as you in this organization with the scopes given. 403 when your role cannot hold one of them. The key is returned once.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/api/access/api-keys" \  -H "Content-Type: application/json" \  -d '{    "name": "string",    "scopes": [      "courses:read"    ]  }'
{  "id": "string",  "name": "string",  "start": "string",  "scopes": [    "string"  ],  "createdAt": "2019-08-24T14:15:22Z",  "lastUsedAt": "2019-08-24T14:15:22Z",  "key": "string"}
{  "error": "string",  "message": "string",  "requestId": "string",  "issues": [    {      "path": "string",      "message": "string"    }  ]}
{  "error": "string",  "message": "string",  "requestId": "string"}
{  "error": "string",  "message": "string",  "requestId": "string"}
{  "error": "string",  "message": "string",  "requestId": "string"}