Produktly docs
SurveysId

Update a survey

PATCH
/surveys/{id}

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.

Authorization

BearerAuth
AuthorizationBearer <token>

Use an API key from the Produktly dashboard → Settings → API keys.

In: header

Path Parameters

id*integer
Range0 < value

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X PATCH "https://example.com/surveys/1" \  -H "Content-Type: application/json" \  -d '{    "responseCap": 200  }'
{  "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"}