Update Survey Template
const options = {
method: 'PATCH',
headers: {
'x-api-key': '<x-api-key>',
'x-organization-id': '<x-organization-id>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: '<string>',
description: '<string>',
config: {},
status: '<string>',
is_default: true
})
};
fetch('https://api.dcycle.io/v1/employee-survey-templates/{template_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.dcycle.io/v1/employee-survey-templates/{template_id}"
payload = {
"name": "<string>",
"description": "<string>",
"config": {},
"status": "<string>",
"is_default": True
}
headers = {
"x-api-key": "<x-api-key>",
"x-organization-id": "<x-organization-id>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)curl --request PATCH \
--url https://api.dcycle.io/v1/employee-survey-templates/{template_id} \
--header 'Content-Type: application/json' \
--header 'x-api-key: <x-api-key>' \
--header 'x-organization-id: <x-organization-id>' \
--data '
{
"name": "<string>",
"description": "<string>",
"config": {},
"status": "<string>",
"is_default": true
}
'{
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Updated Survey Name",
"version": 4,
"config": { "..." : "..." },
"updated_at": "2024-07-15T12:00:00Z"
}
Update Survey Template
Update a survey template’s configuration
PATCH
/
v1
/
employee-survey-templates
/
{template_id}
Update Survey Template
const options = {
method: 'PATCH',
headers: {
'x-api-key': '<x-api-key>',
'x-organization-id': '<x-organization-id>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: '<string>',
description: '<string>',
config: {},
status: '<string>',
is_default: true
})
};
fetch('https://api.dcycle.io/v1/employee-survey-templates/{template_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.dcycle.io/v1/employee-survey-templates/{template_id}"
payload = {
"name": "<string>",
"description": "<string>",
"config": {},
"status": "<string>",
"is_default": True
}
headers = {
"x-api-key": "<x-api-key>",
"x-organization-id": "<x-organization-id>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)curl --request PATCH \
--url https://api.dcycle.io/v1/employee-survey-templates/{template_id} \
--header 'Content-Type: application/json' \
--header 'x-api-key: <x-api-key>' \
--header 'x-organization-id: <x-organization-id>' \
--data '
{
"name": "<string>",
"description": "<string>",
"config": {},
"status": "<string>",
"is_default": true
}
'{
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Updated Survey Name",
"version": 4,
"config": { "..." : "..." },
"updated_at": "2024-07-15T12:00:00Z"
}
← Survey Templates API
Update an existing survey template. Only provided fields are updated. When
config is updated, the template version auto-increments.
Live Editing: Updating a template affects all future survey responses. Employees who open the survey link after the update will see the new configuration. Existing responses are not affected.
Request
Headers
string
required
Your API key for authentication
string
required
Your organization UUID
Path Parameters
string
required
The UUID of the survey template
Body Parameters
All fields are optional. Only include fields you want to update.string
Updated template name (1-255 characters)
string
Updated description (max 1000 characters)
object
Updated template configuration. Must include all steps (not just changed ones).
string
Available values:
draft, active, archivedboolean
Set as organization default (clears previous default)
Response
Returns the updated template object.{
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Updated Survey Name",
"version": 4,
"config": { "..." : "..." },
"updated_at": "2024-07-15T12:00:00Z"
}
Was this page helpful?