Docs
Add Module Template
POST /moduleTemplates
POST
/moduleTemplatesRequired Tokens
| Field | Type | Required | Description |
|---|---|---|---|
| Bearer | Authorization: Bearer <api-key> | Optional | Your API key. Pass it as the Bearer token on every request. |
| Event token | x-Event-Token | Optional | Run **Get Tokens** in the Authorization folder, or call `GET /Events/{eventId}/authorize` manually. |
Creates a new module template for the event. Returns the new template's ID on success.
After creating a module template, use Add Module Template Block to add content, question, and request blocks to it.
Event scoping: These endpoints do not include {eventId} in the URL. The event is determined automatically from your x-Event-Token — the API uses it to know which event's data to return. Ensure you have a valid event token before making any calls in this folder.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| name | string | Required | Internal name for the module template (used for lookups). |
| label | string | Required | Display label shown in the UI. |
| icon | string | Required | Icon identifier for the module. |
| categoryId | Guid | Required | ID of the module category this template belongs to. Categories are user-created via the Advance controller's category endpoints. |
Example Response
{ "id": "mt-guid-001" }
Error Codes
| Code | HTTP Status | Description |
|---|---|---|
UNAUTHORIZED | 401 | Missing or invalid token. |
NOT_FOUND | 404 | Module category not found for this event. |
BAD_REQUEST | 400 | Invalid or missing required fields. |