Skip to main content
POST
Create a survey

Authorizations

Authorization
string
header
required

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

application/json

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.

name
string
required
Required string length: 1 - 255
type
enum<string>
required

nps 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.

Available options:
nps,
csat,
ces,
custom
questions
object[]
required
Required array length: 1 - 20 elements
settings
object

Optional survey settings. Unknown keys are rejected.

cooldownDays
integer

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.

Required range: 0 <= x <= 730

Response

Survey created as a draft.

data
object
required