Block 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}/block', 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}/block"
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}/block \
--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_blocked": true,
"updated_at": "2024-07-15T12:00:00Z"
}
Block Template
Stop a sent survey template from accepting answers
PATCH
/
v1
/
employee-survey-templates
/
{template_id}
/
block
Block 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}/block', 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}/block"
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}/block \
--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_blocked": true,
"updated_at": "2024-07-15T12:00:00Z"
}
← Survey Templates API
Blocks a template that was already sent, for example one sent by mistake. While it is blocked, its survey links (email and QR) show a “survey closed” screen instead of the questions, and any answer submitted for it is rejected with
403 and code SURVEY_BLOCKED. Existing responses are kept. Blocking is reversible with Unblock Template.
Blocking the organization’s default template also closes the survey links that fall back to it.
Request
Headers
string
required
Your API key for authentication
string
required
Your organization UUID
Path Parameters
string
required
The UUID of the template to block
Response
Returns the updated template object withis_blocked: true.
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Standard Commuting Survey",
"is_blocked": true,
"updated_at": "2024-07-15T12:00:00Z"
}
Was this page helpful?