Create a survey
Create a survey as a draft. It uses the same contract and validation as the survey designer. Launching is a separate step: call POST /surveys/{id}/status. The response is 422 when a value fails validation, such as an NPS scale that is not 0-10. A body that is not valid JSON is 400. Requires a secret server key (gt_live_). Publishable keys (gt_pub_) return 403.
Scope: write:surveys
Authorizations
Bearer API key. Secret server keys start with gt_live_; client-safe browser keys start with gt_pub_ (write-only, origin-pinned). Create and scope keys in Settings → API Keys.
Body
The survey contract. Send exactly these keys. NPS uses a 0 to 10 scale. CSAT and CES use 1 to 5 or 1 to 7. The first question of an NPS, CSAT or CES survey is the required score question. A survey has 1 to 20 questions.
1 - 255nps is a 0-10 scale. csat and ces use a 1-5 or 1-7 scale. custom has no band and its responses are unscored. For nps, csat and ces, the first question must be a required rating or scale question: it carries the score.
nps, csat, ces, custom 1 - 20 elementsOptional survey settings. Unknown keys are rejected.
Minimum days since this person last got a survey of the same measure (an email sent, an invited answer or an in-app view) before this survey can invite them or show to them in-app. It doesn't block responses you record through the API.
0 <= x <= 730Response
Survey created as a draft.