amp surveys

이 페이지는 아직 귀하의 언어로 번역되지 않았습니다. 현재 작업 중이므로 곧 다시 확인해 주십시오.

amp surveys manages in-app surveys. Read commands require surveys:read; create, update, and archive require surveys:write. Publish and schedule surveys in Amplitude.

amp surveys list

Returns surveys in the project. Results use the standard Developer API list envelope with cursor pagination (cursor, limit).

Full-text search (q) and custom sort orders are not supported yet.

bash
amp surveys list --project <project_id> --limit 10

Requires the surveys:read scope.

amp surveys get

Get survey.

bash
amp surveys get --project <project_id> --survey <survey_id> --include-unpublished-changes

Requires the surveys:read scope.

amp surveys create

Creates an unpublished draft survey. Publish, schedule, and test instrumentation are not available via API in v1. At most one content variant is accepted on create; the control key is reserved.

bash
amp surveys create --project <project_id> --title "NPS survey"

Requires the surveys:write scope.

amp surveys update

Updates metadata, targeting, and content variants. For published surveys, changes apply to a draft until publish in the UI. latest_version is required and must match the current draft, otherwise the update returns 409. The check runs before the write rather than atomically with it, so it reduces but does not fully prevent lost updates from concurrent writers. Publish, schedule, and test instrumentation are not available via API in v1. Status fields on the response are derived read-only. When variants is sent, it must list every existing variant by id with its unchanged variant key; steps within a variant can be added, edited, reordered, or removed. tags is not writable in v1 and returns 400.

bash
amp surveys update --project <project_id> --survey <survey_id> --latest-version <version> --title "NPS survey v2"

Requires the surveys:write scope.

amp surveys archive

Archives an unpublished survey. A survey counts as published while its flag is enabled, unless it's only in test mode without a schedule; archiving a published survey returns 409 with error_code: cannot_archive_published. Unpublish it in Amplitude first. Use dry_run=true to check whether a survey can be archived. An already archived survey returns 404, like GET.

Requires --yes to apply changes, or --dry-run when supported to validate without applying changes.

bash
amp surveys archive --project <project_id> --survey <survey_id> --dry-run

Requires the surveys:write scope.

이 내용이 도움이 되었나요?

For AI agents: a documentation index is available at /docs/llms.txt. Append .md to any page URL for markdown, or send Accept: text/markdown.

이 페이지에서