# Questra ## Docs - [Create an API key](https://docs.questra.ai/api-reference/api-keys/create-an-api-key.md): Creates a new API key for the authenticated user. The `secret` field is **only returned once** in this response — it cannot be retrieved again. Copy it to a secure location immediately. - [Delete an API key](https://docs.questra.ai/api-reference/api-keys/delete-an-api-key.md): Permanently deletes an API key. Unlike revocation, a deleted key is removed entirely and will no longer appear in the list. This action cannot be undone. - [List API keys](https://docs.questra.ai/api-reference/api-keys/list-api-keys.md): Returns all API keys belonging to the authenticated user, including revoked and expired keys. - [Revoke an API key](https://docs.questra.ai/api-reference/api-keys/revoke-an-api-key.md): Marks an API key as revoked. Revoked keys are rejected on every subsequent request but remain visible in the list (with `revoked: true`). This operation cannot be undone. - [Complete a presigned upload](https://docs.questra.ai/api-reference/files/complete-a-presigned-upload.md): Finalizes a file upload started with `POST /files/create-upload`. Call this after you have successfully `PUT` the file to the presigned URL. Questra verifies the file exists in storage and marks the record as uploaded. - [Create a presigned upload URL](https://docs.questra.ai/api-reference/files/create-a-presigned-upload-url.md): Returns a presigned URL for uploading a file directly to storage. This is the recommended way to upload files — it bypasses server body-size limits and supports files of any size. - [Delete a file](https://docs.questra.ai/api-reference/files/delete-a-file.md) - [Get file contents](https://docs.questra.ai/api-reference/files/get-file-contents.md): Returns AI-ready file contents. Text responses (`text/markdown`, `text/html`, and `application/json`) have `questra://files/{id}` references rewritten to short-lived signed URLs server-side. Responses are cached privately for 5 minutes. - [Get file details](https://docs.questra.ai/api-reference/files/get-file-details.md) - [Get signed file URL](https://docs.questra.ai/api-reference/files/get-signed-file-url.md): Returns a pre-signed URL that can be used to directly access the file (e.g., for displaying PDFs in an iframe) - [List files linked to a survey](https://docs.questra.ai/api-reference/files/list-files-linked-to-a-survey.md) - [Upload a file (direct)](https://docs.questra.ai/api-reference/files/upload-a-file-direct.md): Upload a questionnaire document as a single multipart request. This is the simplest upload method but is limited to ~4.5 MB. For larger files, use the presigned upload flow: `POST /files/create-upload` → `PUT` to storage → `POST /files/{id}/complete-upload`. - [Upload a survey file](https://docs.questra.ai/api-reference/files/upload-a-survey-file.md): **Deprecated.** Use `POST /files` with `survey_id` in the request body instead. - [Get changeset details](https://docs.questra.ai/api-reference/history/get-changeset-details.md): Returns metadata for a single survey changeset, including any captured IR diff metadata when available. - [Get recorded change state](https://docs.questra.ai/api-reference/history/get-recorded-change-state.md): Returns the recorded `after` payload for the specified change, falling back to `before` when no `after` payload exists. - [List survey changes](https://docs.questra.ai/api-reference/history/list-survey-changes.md): Returns a paginated list of individual resource-level changes for the specified survey. Optionally filter by changeset ID or a range of change IDs. IR-diff-only changesets may appear in survey history without discrete change rows. - [List survey changesets](https://docs.questra.ai/api-reference/history/list-survey-changesets.md): Returns a paginated list of changesets for the specified survey, ordered by most recent first. - [Revert change's changeset](https://docs.questra.ai/api-reference/history/revert-changes-changeset.md): Reverts the changeset that contains the specified change by reverse-applying the changeset's stored IR diff. Creates a new changeset of type `revert`. - [Revert changeset](https://docs.questra.ai/api-reference/history/revert-changeset.md): Reverse-applies the changeset's stored IR diff to the current survey IR and creates a new changeset of type `revert`. Changesets without captured IR diff metadata cannot be reverted. - [Connect platform account](https://docs.questra.ai/api-reference/integrations/connect-platform-account.md): Connect a platform account to Questra. - [Create external survey](https://docs.questra.ai/api-reference/integrations/create-external-survey.md): Create a survey on the connected platform. - [Create survey source](https://docs.questra.ai/api-reference/integrations/create-survey-source.md): Creates a participant source or distribution link for one external survey. - [Delete connected account](https://docs.questra.ai/api-reference/integrations/delete-connected-account.md): Delete a connected platform account. - [Delete external survey](https://docs.questra.ai/api-reference/integrations/delete-external-survey.md): Deletes one external survey. - [Delete survey source](https://docs.questra.ai/api-reference/integrations/delete-survey-source.md): Deletes one participant source or distribution link. - [Get connected account](https://docs.questra.ai/api-reference/integrations/get-connected-account.md): Get details for a connected platform account. - [Get external survey](https://docs.questra.ai/api-reference/integrations/get-external-survey.md): Returns one external survey from the connected platform. - [Get survey source](https://docs.questra.ai/api-reference/integrations/get-survey-source.md): Returns one participant source or distribution link. - [List connected accounts](https://docs.questra.ai/api-reference/integrations/list-connected-accounts.md): List the platform accounts connected to Questra. - [List external surveys](https://docs.questra.ai/api-reference/integrations/list-external-surveys.md): List surveys from a connected platform account. - [List supported platforms](https://docs.questra.ai/api-reference/integrations/list-supported-platforms.md): Returns the survey platforms that can be used when creating integrations or setting a survey destination. - [List survey sources](https://docs.questra.ai/api-reference/integrations/list-survey-sources.md): Lists participant sources or distribution links for one external survey. - [Update connected account](https://docs.questra.ai/api-reference/integrations/update-connected-account.md): Update a connected platform account. - [Update external survey](https://docs.questra.ai/api-reference/integrations/update-external-survey.md): Updates mutable state for one external survey. - [Create survey response](https://docs.questra.ai/api-reference/responses/create-survey-response.md): Creates a response in the connected platform using native question-code keys. - [Delete survey response](https://docs.questra.ai/api-reference/responses/delete-survey-response.md): Deletes one response from the connected platform. This is useful for cleaning up after tests. - [Get survey response](https://docs.questra.ai/api-reference/responses/get-survey-response.md): Returns one normalized response from the connected platform. - [List survey responses](https://docs.questra.ai/api-reference/responses/list-survey-responses.md): Lists normalized response data for one external survey. Answers are keyed by the integrated platform's native question code. - [Update survey response](https://docs.questra.ai/api-reference/responses/update-survey-response.md): Updates response status, embedded data, locale, or answers in the connected platform. - [Inspect document](https://docs.questra.ai/api-reference/survey-q&a/inspect-document.md): Streams stateless clarification questions for a questionnaire file as server-sent events. Each `discrepancy` event contains a question. The final `done` event contains `{ "count": number }`. - [Cancel agent run](https://docs.questra.ai/api-reference/surveys/cancel-agent-run.md): Aborts the in-flight survey agent run for this survey, if one is active. - [Create a new survey](https://docs.questra.ai/api-reference/surveys/create-a-new-survey.md) - [Create agent thread](https://docs.questra.ai/api-reference/surveys/create-agent-thread.md): Creates or retrieves an AI agent thread scoped to a survey. - [Delete agent thread](https://docs.questra.ai/api-reference/surveys/delete-agent-thread.md): Deletes one AI agent thread. - [Delete survey](https://docs.questra.ai/api-reference/surveys/delete-survey.md) - [Get agent thread](https://docs.questra.ai/api-reference/surveys/get-agent-thread.md): Returns one AI agent thread scoped to a survey. - [Get survey contents](https://docs.questra.ai/api-reference/surveys/get-survey-contents.md): Returns the generated platform survey contents. For native-source platforms such as Decipher, the default response is the serialized native source; pass `format=envelope` to force the JSON envelope. For connected surveys, this read may synchronously pull the latest upstream state before returning. - [Get survey details](https://docs.questra.ai/api-reference/surveys/get-survey-details.md) - [List agent thread messages](https://docs.questra.ai/api-reference/surveys/list-agent-thread-messages.md): Lists persisted messages for one AI agent thread. - [List agent threads](https://docs.questra.ai/api-reference/surveys/list-agent-threads.md): Lists AI agent threads scoped to a survey. - [List all surveys](https://docs.questra.ai/api-reference/surveys/list-all-surveys.md) - [Send agent message](https://docs.questra.ai/api-reference/surveys/send-agent-message.md): Sends a message to the survey AI agent and waits for the final response. Agent selection is derived from the survey's target platform. - [Set survey destination](https://docs.questra.ai/api-reference/surveys/set-survey-destination.md): Idempotently records the survey destination. Use `{ platform }` for export-only results, or `{ integration_id, external_survey_id }` to program an existing upstream survey. To create a new upstream survey, call `POST /integrations/{id}/surveys` first and pass the returned id as `external_survey_id`.… - [Start programming](https://docs.questra.ai/api-reference/surveys/start-programming.md): Starts platform-agnostic AI programming. Optionally persists the full client-side Q&A snapshot as programming context. - [Stream agent chat](https://docs.questra.ai/api-reference/surveys/stream-agent-chat.md): Streams a survey AI agent response as server-sent events. Use the `X-Thread-Id` response header to continue an auto-created thread on later requests. - [Update agent thread metadata](https://docs.questra.ai/api-reference/surveys/update-agent-thread-metadata.md): Updates metadata for one AI agent thread. - [Update survey](https://docs.questra.ai/api-reference/surveys/update-survey.md): Updates mutable survey metadata. - [Create a webhook](https://docs.questra.ai/api-reference/webhooks/create-a-webhook.md): Register a new webhook endpoint. Returns the webhook including its `secret` — **copy it immediately, it is only shown once**. - [Delete a webhook](https://docs.questra.ai/api-reference/webhooks/delete-a-webhook.md): Permanently deletes a webhook and all its delivery logs. - [Get a webhook](https://docs.questra.ai/api-reference/webhooks/get-a-webhook.md): Returns a single webhook by ID. - [Get a webhook delivery](https://docs.questra.ai/api-reference/webhooks/get-a-webhook-delivery.md): Returns a single delivery attempt, including the full request payload and response body. - [List webhook deliveries](https://docs.questra.ai/api-reference/webhooks/list-webhook-deliveries.md): Returns a paginated list of all delivery attempts for the given webhook, ordered newest first. - [List webhooks](https://docs.questra.ai/api-reference/webhooks/list-webhooks.md): Returns all registered webhook endpoints for the authenticated organization. - [Rotate webhook secret](https://docs.questra.ai/api-reference/webhooks/rotate-webhook-secret.md): Generates a new signing secret for the webhook and invalidates the old one immediately. Returns the new secret — **copy it immediately, it is only shown once**. Update your signature verification logic before rotating in production. - [Send a test event](https://docs.questra.ai/api-reference/webhooks/send-a-test-event.md): Sends a synthetic `survey.created` event to the webhook URL. Useful for verifying that your endpoint is reachable and your signature verification logic is correct. The delivery is logged and can be inspected via `GET /webhooks/{id}/deliveries`. - [Update a webhook](https://docs.questra.ai/api-reference/webhooks/update-a-webhook.md): Update the URL, subscribed event types, description, or active status of a webhook. - [Authentication](https://docs.questra.ai/authentication.md): Create an API key and authenticate requests to the Questra API - [Getting started](https://docs.questra.ai/getting-started.md): Embed Questra's AI survey programming into your own product using the API - [Overview](https://docs.questra.ai/survey-qa/overview.md): Run optional client-driven clarification Q&A before survey programming - [Organization events](https://docs.questra.ai/webhooks/organization-events.md): Webhook event payloads for organization-scoped events - [Overview](https://docs.questra.ai/webhooks/overview.md): Receive HTTP notifications when events happen in your organization - [Survey events](https://docs.questra.ai/webhooks/survey-events.md): Webhook event payloads for survey-scoped events ## OpenAPI Specs - [openapi](https://docs.questra.ai/openapi.json)