Survey
A survey definition. Persisted once per project; rendered to many respondents.
Properties
| Name | Type | Description |
|---|---|---|
| id | string | MongoDB ObjectId hex string. |
| project_id | string | The project this survey belongs to. |
| name | string | Human-readable survey name shown in the dashboard. |
| status | object | |
| questions | array | Ordered question list. Order is the display order. |
| trigger | object | |
| thank_you | object | |
| cooldown_days | integer | Days to wait before re-prompting the same user. |
| sample_rate | number | Fraction of eligible visits actually prompted (0.0–1.0). 1.0 means everyone qualifies. |
| copy | object | |
| display_mode | object | |
| created_at | string | |
| updated_at | string |
JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://artifacts.apis.io/seggwat-com/json-schema/seggwat-com-survey-schema.json",
"title": "Survey",
"description": "A survey definition. Persisted once per project; rendered to many respondents.",
"x-generated": "2026-11-24",
"x-method": "derived",
"x-generator": "derive-json-schema.py",
"x-source": "openapi/_original/seggwat-com-api-openapi.json#/components/schemas/Survey",
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "MongoDB ObjectId hex string."
},
"project_id": {
"type": "string",
"description": "The project this survey belongs to."
},
"name": {
"type": "string",
"description": "Human-readable survey name shown in the dashboard."
},
"status": {
"$ref": "#/$defs/SurveyStatus"
},
"questions": {
"type": "array",
"description": "Ordered question list. Order is the display order.",
"items": {
"$ref": "#/$defs/SurveyQuestion"
}
},
"trigger": {
"$ref": "#/$defs/SurveyTrigger"
},
"thank_you": {
"$ref": "#/$defs/ThankYouAction"
},
"cooldown_days": {
"type": "integer",
"description": "Days to wait before re-prompting the same user.",
"default": 90
},
"sample_rate": {
"type": "number",
"format": "float",
"description": "Fraction of eligible visits actually prompted (0.0–1.0). 1.0 means everyone qualifies.",
"default": 1.0,
"minimum": 0.0,
"maximum": 1.0
},
"copy": {
"$ref": "#/$defs/SurveyCopyConfig"
},
"display_mode": {
"$ref": "#/$defs/SurveyDisplayMode"
},
"created_at": {
"type": "string",
"format": "date-time"
},
"updated_at": {
"type": "string",
"format": "date-time"
}
},
"required": [
"id",
"project_id",
"name",
"status",
"questions",
"trigger",
"thank_you",
"cooldown_days",
"sample_rate",
"copy",
"display_mode",
"created_at",
"updated_at"
],
"$defs": {
"ChoiceOption": {
"type": "object",
"description": "One option in a SingleChoice or MultiChoice question.",
"properties": {
"id": {
"type": "string",
"description": "Stable identifier within the question."
},
"label": {
"type": "string",
"description": "Visible option label."
},
"allow_other_text": {
"type": "boolean",
"description": "When true, selecting this option reveals a free-text input.",
"default": false
}
},
"required": [
"id",
"label"
]
},
"QuestionKind": {
"description": "The input shape of a survey question. Discriminated by `type`.",
"oneOf": [
{
"type": "object",
"description": "Free-text response.",
"properties": {
"type": {
"type": "string",
"enum": [
"open_text"
]
},
"max_chars": {
"type": [
"integer",
"null"
],
"description": "Optional character limit."
},
"placeholder": {
"type": [
"string",
"null"
],
"description": "Optional placeholder text."
}
},
"required": [
"type"
]
},
{
"type": "object",
"description": "Numeric scale (CSAT 1-5, CES 1-7, or custom range).",
"properties": {
"type": {
"type": "string",
"enum": [
"scale"
]
},
"min": {
"type": "integer",
"description": "Minimum scale value."
},
"max": {
"type": "integer",
"description": "Maximum scale value."
},
"low_label": {
"type": [
"string",
"null"
],
"description": "Label for the low end of the scale."
},
"high_label": {
"type": [
"string",
"null"
],
"description": "Label for the high end of the scale."
}
},
"required": [
"type",
"min",
"max"
]
},
{
"type": "object",
"description": "Net Promoter Score — 0-10 with detractor/passive/promoter bands.",
"properties": {
"type": {
"type": "string",
"enum": [
"nps"
]
}
},
"required": [
"type"
]
},
{
"type": "object",
"description": "Pick exactly one option.",
"properties": {
"type": {
"type": "string",
"enum": [
"single_choice"
]
},
"options": {
"type": "array",
"items": {
"$ref": "#/$defs/ChoiceOption"
}
}
},
"required": [
"type",
"options"
]
},
{
"type": "object",
"description": "Pick one or more options.",
"properties": {
"type": {
"type": "string",
"enum": [
"multi_choice"
]
},
"options": {
"type": "array",
"items": {
"$ref": "#/$defs/ChoiceOption"
}
},
"min": {
"type": "integer",
"description": "Minimum selections required.",
"default": 1
},
"max": {
"type": [
"integer",
"null"
],
"description": "Maximum selections allowed. Null means unlimited."
}
},
"required": [
"type",
"options"
]
},
{
"type": "object",
"description": "Two-way toggle (e.g. Was this useful?).",
"properties": {
"type": {
"type": "string",
"enum": [
"boolean"
]
},
"true_label": {
"type": "string"
},
"false_label": {
"type": "string"
}
},
"required": [
"type",
"true_label",
"false_label"
]
}
]
},
"ShowTo": {
"type": "string",
"description": "Who the thank-you action is shown to.",
"enum": [
"completers",
"all_respondents"
],
"default": "completers"
},
"SurveyCopyConfig": {
"type": "object",
"description": "Per-locale copy overrides. Absent locales fall back to the prompt text on each question.",
"properties": {
"locales": {
"type": "object",
"description": "Map of BCP 47 locale tag to overrides.",
"additionalProperties": {
"$ref": "#/$defs/SurveyCopyLocale"
}
}
}
},
"SurveyCopyLocale": {
"type": "object",
"description": "Copy overrides for a single locale.",
"properties": {
"title": {
"type": [
"string",
"null"
],
"description": "Survey-level title override."
},
"intro": {
"type": [
"string",
"null"
],
"description": "Survey-level intro shown beneath the title."
},
"question_prompts": {
"type": "object",
"description": "Per-question prompt overrides, keyed by question id.",
"additionalProperties": {
"type": "string"
}
},
"submit_label": {
"type": [
"string",
"null"
],
"description": "Submit button label override."
}
}
},
"SurveyDisplayMode": {
"type": "string",
"description": "Render surface the survey widget uses for this survey.",
"enum": [
"banner",
"modal",
"inline"
],
"default": "banner"
},
"SurveyQuestion": {
"type": "object",
"description": "A single question inside a survey. The `kind` field is a tagged union discriminated by `type`.",
"properties": {
"id": {
"type": "string",
"description": "Stable identifier unique within the survey. Survives reorders and edits — response rows reference this."
},
"prompt": {
"type": "string",
"description": "The visible question text."
},
"help_text": {
"type": [
"string",
"null"
],
"description": "Optional helper text shown beneath the prompt."
},
"required": {
"type": "boolean",
"description": "When true, respondents must answer before submitting.",
"default": false
},
"kind": {
"$ref": "#/$defs/QuestionKind"
}
},
"required": [
"id",
"prompt",
"kind"
]
},
"SurveyStatus": {
"type": "string",
"description": "Authoring/lifecycle status of a survey. Only `live` surveys are served by the widget or fired by the lifecycle dispatcher.",
"enum": [
"draft",
"live",
"paused",
"archived"
]
},
"SurveyTrigger": {
"description": "When and where the survey fires. Discriminated by `source`. Currently only `client_side` is supported.",
"oneOf": [
{
"type": "object",
"description": "Client-side trigger evaluated by the widget. A *where* gate (`url_patterns`, combined per `url_match`) is AND-combined with a *when* group (events, time, scroll, exit-intent, combined per `when_match`). `exclude_url_patterns` always takes precedence.",
"properties": {
"source": {
"type": "string",
"enum": [
"client_side"
]
},
"url_patterns": {
"type": "array",
"description": "Where gate: glob patterns for URLs where this survey may fire. Empty means any page.",
"items": {
"type": "string"
}
},
"url_match": {
"type": "string",
"enum": [
"any",
"all"
],
"default": "any",
"description": "How `url_patterns` combine. `any` (default) fires on any matching path; `all` requires every pattern to match."
},
"exclude_url_patterns": {
"type": "array",
"description": "Glob patterns for URLs where this survey must never fire.",
"items": {
"type": "string"
},
"default": []
},
"event_names": {
"type": "array",
"description": "Custom JS event names that trigger the survey.",
"items": {
"type": "string"
},
"default": []
},
"show_after_seconds": {
"type": [
"integer",
"null"
],
"description": "Fire after the visitor has been on the page this many seconds (foreground time only)."
},
"show_after_scroll_percent": {
"type": [
"integer",
"null"
],
"minimum": 1,
"maximum": 100,
"description": "Fire once the visitor has scrolled this percentage of the page."
},
"show_on_exit_intent": {
"type": "boolean",
"description": "Fire when the pointer leaves the viewport toward the browser chrome (exit-intent). Desktop only.",
"default": false
},
"when_match": {
"type": "string",
"enum": [
"any",
"all"
],
"default": "any",
"description": "How the *when* conditions (events, time, scroll, exit-intent) combine. `any` (default) fires on the first met; `all` requires every condition to be met."
}
},
"required": [
"source"
]
}
]
},
"ThankYouAction": {
"description": "What the respondent sees after submitting. Discriminated by `type`.",
"oneOf": [
{
"type": "object",
"description": "Plain text confirmation.",
"properties": {
"type": {
"type": "string",
"enum": [
"message"
]
},
"headline": {
"type": "string"
},
"body": {
"type": [
"string",
"null"
],
"description": "Optional longer text shown beneath the headline."
}
},
"required": [
"type",
"headline"
]
},
{
"type": "object",
"description": "Reward completers with a coupon code.",
"properties": {
"type": {
"type": "string",
"enum": [
"discount_offer"
]
},
"headline": {
"type": "string"
},
"coupon_code": {
"type": "string",
"description": "Customer-managed coupon code matched against Polar/Stripe."
},
"cta_label": {
"type": "string"
},
"cta_url": {
"type": "string",
"format": "uri",
"description": "URL the CTA button points to, typically the checkout page with the coupon prefilled."
},
"show_to": {
"$ref": "#/$defs/ShowTo"
}
},
"required": [
"type",
"headline",
"coupon_code",
"cta_label",
"cta_url"
]
},
{
"type": "object",
"description": "Encourage churned or lapsed users to reactivate.",
"properties": {
"type": {
"type": "string",
"enum": [
"reactivate"
]
},
"headline": {
"type": "string"
},
"cta_label": {
"type": "string"
},
"cta_url": {
"type": "string",
"format": "uri"
}
},
"required": [
"type",
"headline",
"cta_label",
"cta_url"
]
},
{
"type": "object",
"description": "Arbitrary HTML rendered in the thank-you slot.",
"properties": {
"type": {
"type": "string",
"enum": [
"custom"
]
},
"html": {
"type": "string",
"description": "Raw HTML string."
}
},
"required": [
"type",
"html"
]
}
]
}
}
}
Work with this as data
Every JSON Schema here is available over the APIs.io API and to AI agents over MCP.
MCP server
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
Tools for schemas
4 MCP tools reach this
find_json_schemasBrowse and filter every JSON Schema in the catalog.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.
Call it yourself
curl for this page
curl "https://apis.io/api/v1/json-schemas/seggwat-com-survey"
curl "https://apis.io/api/v1/json-schemas?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.