Skip to main content

Get Public Form by Token (v1)

Method & Path

GET /api/v1/workspace/public/form/:token

Actual path: /v1/workspace/public/form/:token

Description

Get form data and workspace branding by token. Used by the public form page (no login). The token is obtained from the short link or from the submission creation response.

Authentication

None - Public endpoint (token-based access). Persona: Customer (or anyone with the link).

Path Parameters

ParameterTypeRequiredDescription
tokenstringYesForm submission token

Response 200 OK

  • form.backgroundImageUrl: optional; URL of the form's public-page background image (only one of backgroundImageUrl or backgroundColor is set).
  • form.backgroundColor: optional; CSS color for the form's public-page background (e.g. #ffffff or rgb(255,255,255)). Cleared when a background image is set.
  • form.completionHandoffWhatsAppPhone: optional; E.164 WhatsApp number for the workspace line that should receive a prefilled message after submit (client may open wa.me with Q&A). null if not configured.
{
"form": {
"id": "...",
"name": "استمارة رضا",
"description": "وصف",
"questions": [
{
"id": "q_1",
"type": "text",
"questionText": "ما تقييمك؟",
"options": [],
"order": 0,
"required": true
}
],
"backgroundImageUrl": "https://...",
"backgroundColor": "#f5f5f5",
"completionHandoffWhatsAppPhone": "+970591234567"
},
"workspace": {
"name": "مساحة العمل",
"logoUrl": "https://...",
"theme": { "--color-primary-default": "#..." }
},
"submission": {
"status": "pending",
"answers": []
}
}

Common Errors

  • 400: Token required
  • 404: Form not found or link expired
  • 500: Server error