Skip to main content

Create workspace contest (v1)

Method & Path

POST /api/v1/workspace/:workspaceId/contests

Description

Creates a draft contest with intro fields, pool draw size, and time limit after the participant taps start.

note

publicToken is an opaque, URL-safe string used in public contest URLs (typically ~12 characters for newly created contests). Older contests may still use a longer legacy token; both forms remain valid until rotated.

Authentication

Required: Workspace token. Persona: Workspace Owner.

Request Body

{
"name": "مسابقة العيد",
"introQuestions": [
{ "id": "f1", "label": "الاسم الكامل", "required": true }
],
"questionsToShowCount": 10,
"timeLimitSeconds": 300,
"backgroundKind": "none",
"backgroundColor": null,
"backgroundImageUrl": null
}

Response 201 Created

{
"contest": { "id": "...", "publicToken": "...", "status": "draft", "...": "..." }
}

Common Errors

  • 400 Bad Request: Invalid body
  • 401 Unauthorized
  • 404 Not Found: Workspace not found