Get a survey
Authorization
BearerAuth Use an API key from the Produktly dashboard → Settings → API keys.
In: header
Path Parameters
0 < valueResponse Body
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/surveys/1"{ "id": 0, "name": "string", "active": true, "status": "draft", "publicUrl": "string", "responseCount": 0, "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z", "folderId": 0, "publicId": "string", "opensAt": "2019-08-24T14:15:22Z", "closesAt": "2019-08-24T14:15:22Z", "responseCap": 0, "themeId": 0, "surveyDomainId": 0, "settings": { "property1": null, "property2": null }, "dashboardUrl": "string", "note": "string"}Create a survey POST
Creates the survey as a draft. Pass active: true to publish immediately so publicUrl accepts responses; that needs an API key with the publish scope, otherwise the survey stays a draft and the response note says why. A question can be shown only when earlier answers match: give the earlier question an id and reference it from conditions.rules. Conditions that could never match are rejected.
Update a survey PATCH
Only the fields you send are changed. settings are merged over stored settings, and settings.questions replaces the whole list: keep existing question ids so stored responses still line up. active: false unpublishes. Editing a live survey needs the publish scope.