headless lms

Register an image you are about to upload and get a presigned upload URL

POST /api/member/uploads. Register an image you are about to upload and get a presigned upload URL. Headless LMS Assets API reference.

POST
/api/member/uploads

For a member of the organization. Member uploads are images only (409 otherwise). The asset is yours: only you can finalize it or attach it to your profile, a post or a message. You can delete it while nothing references it.

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/member/uploads" \  -H "Content-Type: application/json" \  -d '{    "filename": "string",    "contentType": "string"  }'
{  "asset": {    "orgId": "string",    "id": "string",    "kind": "image",    "source": "library",    "filename": "string",    "contentType": "string",    "size": 0,    "status": "pending",    "uploadedBy": "string",    "createdAt": "2019-08-24T14:15:22Z",    "updatedAt": "2019-08-24T14:15:22Z",    "url": "string",    "downloadUrl": "string"  },  "uploadUrl": "string",  "method": "PUT",  "expiresInSeconds": 1,  "headers": {    "property1": "string",    "property2": "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"}