Create Card
Creates a card of the given type (quiz, content, boolean, …). Institution is taken from the admin JWT.
Request Example (quiz)
Section titled “Request Example (quiz)”curl --request POST \ --url 'https://lxp.prod.api.toolzz.media/cards/quiz' \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "name": "Sample quiz", "ask": "What is 2+2?", "time": 60, "difficulties_id": 1, "answers": "[{\"answer\":\"4\",\"correct\":true},{\"answer\":\"3\",\"correct\":false}]" }'Legacy alias: POST /cards/:type/:ctype (same write body).
Response Example
Section titled “Response Example”{ "success": true, "card": { "id": 8709, "name": "Sample quiz", "type": "quiz" }}Request description
Section titled “Request description”Path Parameters
Section titled “Path Parameters”| Parameter | Type | Description | Required |
|---|---|---|---|
type | string | Card source type (quiz, content, images, boolean, words, gibbet, crosswords, phrase). | Yes |
Body Parameters (common)
Section titled “Body Parameters (common)”| Parameter | Type | Description | Required |
|---|---|---|---|
name | string | Card name. | No |
ask | string | Question / prompt HTML. | No |
time | number | Time limit (seconds). | No |
feedback | string | Feedback on success. | No |
wrong_feedback | string | Feedback on failure. | No |
title / text / source | string | Content fields (type-dependent). | No |
correct | boolean | Used by boolean cards. | No |
difficulties_id | number | Difficulty ID. | No |
images_id | number | Cover / asset image ID. | No |
answers | string | JSON string of answer options (quiz, etc.). | No |
tags | string | Tags. | No |
toolzz_school_id | string | Optional school scope. | No |
toolzz_institution_id is enforced from the JWT (optional body value must match).
Error responses
Section titled “Error responses”| HTTP | Code | When |
|---|---|---|
| 400 | invalid_argument | Invalid payload / type |
| 401 | unauthenticated | Missing/invalid JWT |
| 403 | permission_denied | Not an admin |
Security
Section titled “Security”- Admin only. New rows are stamped with the JWT institution.