View all methods
snapshots.settings.csatItems.create
Create an unselected CSAT item; use snapshots.settings.csatSelection.set to select them.
Facts
| Method | POST https://api.getdx.com/snapshots.settings.csatItems.create |
| Required scope | snapshots:admin |
Arguments
| Name | Type | Description |
|---|---|---|
token |
Token |
Auth token passed as an HTTP header. |
name |
Text |
Required. Item name. |
prompt |
Text |
Required. Survey question. |
audience_filters |
Object |
Required. Complete audience filter object; see below. |
exclude_na_responders |
Boolean |
Optional. Whether to exclude N/A responders. |
group_id |
Text or null |
Optional. Existing CSAT group ID, or null to ungroup. Requires CSAT grouping. |
translations |
Object |
Optional locale-to-fields map, e.g. {"fr": {"name": "Exemple"}}. Uses enabled translation locales. |
Audience filters
Provide type, configured, custom, and active_users. Populate only the object matching type; set the others to null.
| Type | Object fields |
|---|---|
configured |
target_role (dev, nondev, or all), team_ids, and attribute_ids (arrays of public IDs; empty arrays apply no corresponding filter). |
custom |
identifier_type (email or user_id) and identifiers (nonempty array). All identifiers must resolve to account users. |
active_users |
project_id (public project ID) and lookback_months (1, 3, or 6). |
Responses return teams/attributes (IDs and names) or users (IDs and emails).
Translations support name and prompt.
Example request
curl -X POST https://api.getdx.com/snapshots.settings.csatItems.create \
-H 'Authorization: Bearer xxxx-xxxxxxxxx-xxxx' \
-H 'Content-Type: application/json' \
--data '{
"name": "Build platform",
"prompt": "How satisfied are you with the build platform?",
"audience_filters": {
"type": "configured",
"configured": {
"target_role": "all",
"team_ids": [],
"attribute_ids": []
},
"custom": null,
"active_users": null
}
}'
Example response
{
"ok": true,
"csat": {
"id": "NTI5Njc",
"name": "Build platform",
"prompt": "How satisfied are you with the build platform?",
"exclude_na_responders": false,
"translations": {},
"group_id": null,
"audience_filters": {
"type": "configured",
"configured": {
"target_role": "all",
"teams": [],
"attributes": []
},
"custom": null,
"active_users": null
}
}
}
Errors
not_authed or not_authorized for missing authentication or access. 422 validation_error for invalid input (error_details explains why); 409 snapshot_live while a snapshot is live.