Create a new API key for the specified questionnaire.
Requires a key with the apikey:write scope. The full key value is returned only in this response — store it securely immediately. Subsequent list calls return a masked version.
Security
authorization
List of scopes to grant this key. Valid values:
participant:write— create participantsapikey:write— create API keys for the same questionnaireapikey:delete— delete API keys for the same questionnaire
Items Enum:"participant:write""apikey:write""apikey:delete"
Example:
[ "participant:write" ]
- US Production serverhttps://api.us.clearspeed.com/questionnaire/tenants/{tenant_id}/questionnaires/{questionnaire_id}/apikeys
- UK Production serverhttps://api.uk.clearspeed.com/questionnaire/tenants/{tenant_id}/questionnaires/{questionnaire_id}/apikeys
- Key for creating participants
- Key with all participant and key management scopes
curl -i -X POST \
'https://api.us.clearspeed.com/questionnaire/tenants/{tenant_id}/questionnaires/{questionnaire_id}/apikeys' \
-H 'Authorization: YOUR_API_KEY_HERE' \
-H 'Content-Type: application/json' \
-d '{
"key_name": "ci-participant-writer",
"scopes": [
"participant:write"
]
}'API key created. The api_key value is shown only once — save it now.
The API key value. Returned in full only on creation — masked in all subsequent responses.
Example:"cs_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxx"
UUID of the questionnaire this key is scoped to
Example:"fd9690b0-9050-4acd-ad74-7f906c07fe93"
Response
{ "id": "a1b2c3d4-0000-0000-0000-000000000001", "api_key": "cs_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxx", "key_name": "ci-participant-writer", "scopes": [ "participant:write" ], "questionnaire_id": "fd9690b0-9050-4acd-ad74-7f906c07fe93", "create_ts": "2026-04-10T10:00:00Z", "update_ts": "2026-04-10T10:00:00Z" }