curl --request POST \
--url https://app.usertick.com/api/public/v1/survey-copies \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "https://usertick.com/try/kX9pQ2mLw4nT8vRz5aBc7dEf"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({url: 'https://usertick.com/try/kX9pQ2mLw4nT8vRz5aBc7dEf'})
};
fetch('https://app.usertick.com/api/public/v1/survey-copies', 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-copies"
payload = { "url": "https://usertick.com/try/kX9pQ2mLw4nT8vRz5aBc7dEf" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)Copy a survey from a copy link
Copies the survey a copy link shares into the organization as a new draft, as Copy in Usertick does: its questions, logic, languages, theme and texts, with its pictures and videos copied into the organization’s library. Send the link’s address (url) or its token. Nothing goes live: a person publishes the copy in Usertick (editorUrl). It counts as a new survey for the plan’s limits, which refuse it rather than cut it, and for the 200 creates a day per credential that POST /surveys counts (429 PUB-008-008). A link that is off, one Usertick turned off, an unknown token and an address that is not on Usertick’s site all answer 404 SRV-014-001, so a caller learns nothing about why. Answers 201 with the draft and its address in Location.
Scopes: surveys:draft, surveys:read.
curl --request POST \
--url https://app.usertick.com/api/public/v1/survey-copies \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "https://usertick.com/try/kX9pQ2mLw4nT8vRz5aBc7dEf"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({url: 'https://usertick.com/try/kX9pQ2mLw4nT8vRz5aBc7dEf'})
};
fetch('https://app.usertick.com/api/public/v1/survey-copies', 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-copies"
payload = { "url": "https://usertick.com/try/kX9pQ2mLw4nT8vRz5aBc7dEf" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(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
Send url or token, one of them and nothing else (400 PUB-008-001 for another field, 400 PUB-001-004 for both or neither).
An address of a copy link on Usertick's site, with or without a language in the path, such as https://usertick.com/try/kX9pQ2mLw4nT8vRz5aBc7dEf or https://usertick.com/de/try/kX9pQ2mLw4nT8vRz5aBc7dEf. Any other address is 404 SRV-014-001.
2048Response
Created.