Attach a file to an event
POST /api/events/{eventId}/assets. Attach a file to an event. Headless LMS Events API reference.
Requires events:write. Added last. 409 when the file is not a ready library file or is already attached. A file not uploaded for the event needs media:read (403 otherwise). Returns the event's files.
Path Parameters
eventId*string
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
application/json
curl -X POST "https://example.com/api/events/string/assets" \ -H "Content-Type: application/json" \ -d '{ "assetId": "string" }'[ { "orgId": "string", "id": "string", "eventId": "string", "assetId": "string", "seq": -9007199254740991, "displayName": "string", "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z", "filename": "string", "contentType": "string", "size": 0, "url": "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"}{ "error": "string", "message": "string", "requestId": "string"}