Set Default Template
const options = {
method: 'PATCH',
headers: {'x-api-key': '<x-api-key>', 'x-organization-id': '<x-organization-id>'}
};
fetch('https://api.dcycle.io/v1/employee-survey-templates/{template_id}/default', 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}/default"
headers = {
"x-api-key": "<x-api-key>",
"x-organization-id": "<x-organization-id>"
}
response = requests.patch(url, headers=headers)
print(response.text)curl --request PATCH \
--url https://api.dcycle.io/v1/employee-survey-templates/{template_id}/default \
--header 'x-api-key: <x-api-key>' \
--header 'x-organization-id: <x-organization-id>'{
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Standard Commuting Survey",
"is_default": true,
"updated_at": "2024-07-15T12:00:00Z"
}
Set Default Template
Set a template as the organization’s default survey template
PATCH
/
v1
/
employee-survey-templates
/
{template_id}
/
default
Set Default Template
const options = {
method: 'PATCH',
headers: {'x-api-key': '<x-api-key>', 'x-organization-id': '<x-organization-id>'}
};
fetch('https://api.dcycle.io/v1/employee-survey-templates/{template_id}/default', 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}/default"
headers = {
"x-api-key": "<x-api-key>",
"x-organization-id": "<x-organization-id>"
}
response = requests.patch(url, headers=headers)
print(response.text)curl --request PATCH \
--url https://api.dcycle.io/v1/employee-survey-templates/{template_id}/default \
--header 'x-api-key: <x-api-key>' \
--header 'x-organization-id: <x-organization-id>'{
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Standard Commuting Survey",
"is_default": true,
"updated_at": "2024-07-15T12:00:00Z"
}
← Survey Templates API
Marks a template as the organization’s default. The previous default template (if any) is automatically unset. The default template is used when sending surveys without specifying a
template_id.
Request
Headers
Path Parameters
Response
Returns the updated template object withis_default: true.
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Standard Commuting Survey",
"is_default": true,
"updated_at": "2024-07-15T12:00:00Z"
}
Was this page helpful?