curl --request POST \
--url https://app.usertick.com/api/public/v1/surveys/{surveyId}/archive \
--header 'Authorization: Bearer <token>'const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.usertick.com/api/public/v1/surveys/{surveyId}/archive', 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/surveys/{surveyId}/archive"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)Archive a survey
Archives a survey in draft, live or paused status, as Archive in Usertick does: it stops showing and taking answers at once, leaves the survey list and frees its place in the plan’s survey limit. Its responses stay, and POST /surveys//restore brings it back as a draft. Archiving a survey that is open in the Usertick editor is allowed, as in the dashboard. Recorded in the audit log as made through the credential.
Scopes: surveys:archive.
curl --request POST \
--url https://app.usertick.com/api/public/v1/surveys/{surveyId}/archive \
--header 'Authorization: Bearer <token>'const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.usertick.com/api/public/v1/surveys/{surveyId}/archive', 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/surveys/{surveyId}/archive"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, 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.
255Response
The survey.
True when Usertick AI wrote text in the survey's own fields (its name, texts or email design), for example in a draft from Create with AI or a translation. Each question has its own aiGenerated. The mark records where the text came from, so it stays true after a person edits the text.