curl --request PATCH \
--url https://app.usertick.com/api/public/v1/survey-themes/{themeId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"expectedVersion": 3
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({expectedVersion: 3})
};
fetch('https://app.usertick.com/api/public/v1/survey-themes/{themeId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.usertick.com/api/public/v1/survey-themes/{themeId}"
payload = { "expectedVersion": 3 }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)Edit a survey theme
Changes a theme’s name, some of its keys, or both. Every draft and archived survey on the theme takes the new look at once, so a theme that a live or paused survey of the organization uses, in what visitors see, in a variant or in its unpublished changes, is 409 PUB-018-002: a person edits it in Usertick, or a new theme is created from it. Send expectedVersion from the last read: a theme saved since is 409 PUB-018-003. A theme used by a survey outside the member’s reach is 403 AUTHZ-007-001. On a plan without them, custom CSS in set is 403 THM-001-007 and a picture of the page in set 403 PUB-018-006; clearing them with null is always allowed. A theme that kept its custom CSS through a downgrade and that a website survey uses is 403 THM-002-003 until the CSS is cleared. Needs the member’s permission to manage surveys. Recorded in the audit log as made through the credential.
Scopes: themes:write, surveys:read.
curl --request PATCH \
--url https://app.usertick.com/api/public/v1/survey-themes/{themeId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"expectedVersion": 3
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({expectedVersion: 3})
};
fetch('https://app.usertick.com/api/public/v1/survey-themes/{themeId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.usertick.com/api/public/v1/survey-themes/{themeId}"
payload = { "expectedVersion": 3 }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)Authorizations
Headers
Any 1 to 255 printable ASCII characters, without a space at either end. The answer to the first request with a key is kept for 24 hours per credential: the same request again gets it back (Idempotent-Replayed: true), another request with the key is 409 PUB-002-002, and while the first still runs 409 PUB-002-003. A server error is not kept, and a request that never answered frees its key after 2 minutes: a retry with the key then runs again.
255Body
A name, a set or both.
Response
The theme after the edit.