headless lms

Create a download

POST /api/downloads. Create a download. Headless LMS Content API reference.

POST
/api/downloads

Requires downloads:write. The download starts as a draft. 409 when its slug is taken.

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

application/json

curl -X POST "https://example.com/api/downloads" \  -H "Content-Type: application/json" \  -d '{    "title": "string"  }'
{  "orgId": "string",  "id": "string",  "type": "download",  "title": "string",  "slug": "string",  "description": "string",  "status": "draft",  "category": "string",  "thumbnailAssetId": "string",  "createdAt": "2019-08-24T14:15:22Z",  "updatedAt": "2019-08-24T14:15:22Z",  "thumbnailUrl": "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"}
{  "error": "string",  "message": "string",  "requestId": "string"}