Documentation Index
Fetch the complete documentation index at: https://docs.formswrite.com/llms.txt
Use this file to discover all available pages before exploring further.
Convert a Google Doc or uploaded document into a quiz or form on any of the 30+ supported platforms.
Request
| Header | Value | Required |
|---|
Authorization | Bearer YOUR_API_TOKEN | Yes |
Content-Type | application/json | Yes |
Body parameters
| Parameter | Type | Required | Description |
|---|
documentId | string | Yes | Google Doc ID or full Google Docs URL |
format | string | Yes | Target format (see supported formats) |
documentName | string | No | Name for the output file (defaults to "Untitled Document") |
documentType | string | No | Source document type (defaults to "google_doc") |
async | boolean | No | Set to true for async processing (returns immediately with a job ID) |
Document ID
You can pass either a raw Google Doc ID or a full URL:
// Raw ID
{ "documentId": "1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgVE2upms" }
// Full URL
{ "documentId": "https://docs.google.com/document/d/1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgVE2upms/edit" }
The document must be shared with Formswrite (or set to “Anyone with the link can view”) for the conversion to work.
| Format value | Platform | Description |
|---|
google_form | Google Forms | Creates a Google Form in your Google account |
formswrite_form | Formswrite Forms | Creates a hosted form on Formswrite |
google_form requires that you have previously connected your Google account via the Formswrite web app. The form will be created in your Google Drive.
Learning Management Systems (LMS)
| Format value | Platform | File type |
|---|
canvas | Canvas LMS | .zip (QTI package) |
moodle | Moodle | .xml (Moodle XML) |
blackboard | Blackboard | .txt |
brightspace | Brightspace (D2L) | .zip |
schoology | Schoology | .zip (QTI package) |
sakai | Sakai | .zip (QTI 2.1 package) |
| Format value | Platform | File type |
|---|
kahoot | Kahoot! | .csv |
quizizz | Quizizz | .csv |
blooket | Blooket | .csv |
gimkit | Gimkit | .csv |
socrative | Socrative | .csv |
wooclap | Wooclap | .csv |
quizalize | Quizalize | .csv |
classmarker | ClassMarker | .csv |
pear_assessment | Pear Assessment (formerly Pear Deck) | .csv |
| Format value | Description | File type |
|---|
qti_21 | QTI 2.1 (IMS standard) | .zip |
qti_22 | QTI 2.2 (IMS standard) | .zip |
gift | GIFT format (Moodle-compatible) | .txt |
aiken | Aiken format (simple text) | .txt |
cloze | Cloze / Embedded Answers format | .txt |
word | Microsoft Word | .docx |
| Format value | Platform | File type |
|---|
learndash | LearnDash (WordPress) | .txt (GIFT format) |
h5p | H5P | .zip (QTI 2.1 package) |
Synchronous mode (default)
By default, the API waits for the document to be analyzed and converted before returning the result. This can take up to 5 minutes depending on document size.
Request
curl -X POST https://api.formswrite.com/api/v1/convert \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"documentId": "1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgVE2upms",
"format": "moodle",
"documentName": "Chemistry Quiz"
}'
{
"success": true,
"format": "moodle",
"exportId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"downloadUrl": "https://api.formswrite.com/api/forms/exports/a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"fileName": "Chemistry Quiz-moodle.xml"
}
{
"success": true,
"format": "google_form",
"formId": "1AbCdEf2GhIjKlMnOpQrStUvWxYz",
"formUrl": "https://docs.google.com/forms/d/1AbCdEf2GhIjKlMnOpQrStUvWxYz/viewform"
}
Timeout response (408)
If the analysis takes longer than 5 minutes, you will receive a 408 response with a job ID you can use to poll for status:
{
"success": false,
"status": "processing",
"jobId": "123",
"message": "Analysis still in progress. Poll for status.",
"pollUrl": "/api/v1/convert/status/123"
}
Asynchronous mode
Set "async": true to return immediately with a job ID. Use the poll status endpoint to check when the conversion is complete.
Request
curl -X POST https://api.formswrite.com/api/v1/convert \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"documentId": "1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgVE2upms",
"format": "canvas",
"documentName": "Biology Exam",
"async": true
}'
Response (202 Accepted)
{
"success": true,
"status": "processing",
"jobId": "456",
"message": "Document analysis queued. Poll for status.",
"pollUrl": "/api/v1/convert/status/456"
}
Then poll GET /api/v1/convert/status/456 until the job is complete. See Poll status for details.
Error responses
| Status | Description |
|---|
400 | Missing or invalid documentId or format |
401 | Invalid or missing API token |
402 | Subscription expired or credit limit reached |
408 | Analysis timed out (sync mode only — use the returned pollUrl) |
500 | Internal server error |
{
"success": false,
"message": "Invalid format. Supported formats: google_form, formswrite_form, canvas, moodle, blackboard, brightspace, schoology, sakai, kahoot, quizizz, blooket, gimkit, socrative, wooclap, quizalize, classmarker, pear_assessment, qti_21, qti_22, gift, aiken, cloze, word, learndash, h5p"
}
Example: subscription required
{
"success": false,
"message": "Your subscription has expired. Please upgrade to continue using the API."
}