V3 Responses

Update a response

Changed on

Partially updates a response. Requires read-write access; the workspace is resolved from the response. An unknown or inaccessible responseId answers 403.

PATCH is the only update verb — there is no PUT. Within it, data is replaced wholesale rather than deep-merged, so send the complete answer map; embeddedData merges by field name. Unknown top-level keys are rejected with 400 rather than ignored.

Every patch emits responseUpdated and runs the response pipeline, including Hub ingestion. Transitioning finished to true additionally emits responseFinished; patching a response that is already finished does not re-emit it.

patch/api/v3/responses/{responseId}

Request

  • Base URL
    https://app.formbricks.com
  • URL
    https://app.formbricks.com/api/v3/responses/{responseId}
  • Auth
    • API key in cookie next-auth.session-token
    • or API key in header x-api-key
    • or HTTP bearer

Path parameters

responseIdstring cuid2 required

Response identifier.

Request body

finishedboolean
endingIdstring nullable
languagestring nullable
dataResponseDataMapInput

The same map on the way in, with the cardinality bounds a v3 write enforces.

At most 500 keys, and at most 1000 entries in a multi-select array or matrix object. Both sit far above any real survey — a response holds one entry per element, a multi-select answer one per choice — and exist because every later reader pays per entry: the serializer's per-answer mapping, export columns, and the positional probe the "Other" response filter emits. Exceeding either is a 400 from the request schema, not a 422.

Deliberately separate from ResponseDataMap, which the read returns. These bounds are v3-only — the v1 and v2 write paths store the same map without them — so a stored response may exceed them, and the read schema must not claim otherwise.

embeddedDataResponseEmbeddedDataInput

Embedded Data values to write, keyed by field name.

This is the write counterpart of embeddedData[] on the read, and it is keyed the way an author names a field rather than the way storage addresses it. A hidden field is stored under its name but a variable is stored under its cuid, and that split is an implementation detail of the storage layout — the server resolves a name to its storage key through the survey's Embedded Data links, so a caller never sees a cuid and never has to know which kind it is writing.

Which kinds are writable:

  • ingested (hidden fields) — accepted, through the same ingest contract the SDK uses: the name must be declared on the survey, the value is coerced to the field's declared type, a locked field ignores the write, and the whole payload is bounded. A name the survey does not declare is a 422 rather than a silent drop — knowing whether a name is declared means loading the survey, and these operations route every failure that needs stored state to 422.

  • computed (variables) — accepted, because a management caller correcting a response needs to, and v1 and v2 both allow it today.

  • reserved — refused. Auto-captured context describes the submission environment, and a caller-supplied value would be fiction. The three exceptions are source, url and action, which ResponseMetaInput accepts for exactly the replay case.

Values follow their field's declared type. A field the payload omits is left as it is; this is a merge over named fields, not a replacement of the collection.

null clears a field. Omission and null therefore mean different things — leave it alone versus remove its value — which is the only reading that makes a merge-shaped map able to express deletion at all. A cleared field is then absent from embeddedData[] on the next read, exactly as one that was never written, and a field whose definition carries a defaultValue falls back to that default rather than disappearing.

An ambiguous name is refused. The read says key is unique per kind rather than across the collection, because a survey predating the reserved-name guard can hold a variable and a hidden field under one name. This map has no kind, so on such a survey a name cannot say which field it means — and guessing would write the caller's value into the wrong one. A name that matches more than one declared field is a 422 naming it, for the same reason as an undeclared one; rename one side on the survey to clear it. The set is finite, frozen and tracked, and nothing new can enter it.

Reserved names collide differently and are not ambiguous: reserved is not writable at all, so a name that matches both a declared field and a catalog entry resolves to the declared one.

At most 500 names. Every name that matches no declared field becomes its own invalid_params entry naming it, so without a cap a large body answers with a 422 several times its own size. Far above any real survey; a v3-only bound, as on data.

tagsstring[]

Complete set of tag ids for this response, replacing whatever is currently applied. Repeats are allowed and collapse, because the set is applied as a set. Tags must already exist in the same workspace — create them via POST /api/v3/tags.

Response

Response updated successfully

Changes

    • warning

      added the new chart_in_use enum value to the response property for the response status

    • warning

      added the new chart_in_use enum value to the response property for the response status

    • warning

      added the new chart_in_use enum value to the response property for the response status

    • warning

      added the new chart_in_use enum value to the response property for the response status

    • warning

      added the new chart_in_use enum value to the response property for the response status

    • warning

      added the new chart_in_use enum value to the response property for the response status

    • warning

      added the new chart_in_use enum value to the response property for the response status

    • warning

      added the new dashboards_plan_required enum value to the response property for the response status

    • warning

      added the new dashboards_plan_required enum value to the response property for the response status

    • warning

      added the new dashboards_plan_required enum value to the response property for the response status

    • warning

      added the new dashboards_plan_required enum value to the response property for the response status

    • warning

      added the new dashboards_plan_required enum value to the response property for the response status

    • warning

      added the new dashboards_plan_required enum value to the response property for the response status

    • warning

      added the new dashboards_plan_required enum value to the response property for the response status

    • warning

      added the new limit_exceeded enum value to the // response property for the response status

    • warning

      added the new limit_exceeded enum value to the // response property for the response status

    • warning

      added the new limit_exceeded enum value to the // response property for the response status

    • warning

      added the new limit_exceeded enum value to the // response property for the response status

    • warning

      added the new limit_exceeded enum value to the // response property for the response status

    • warning

      added the new limit_exceeded enum value to the // response property for the response status

    • warning

      added the new limit_exceeded enum value to the // response property for the response status

    • warning

      added the new creatives_not_entitled enum value to the response property for the response status

    • warning

      added the new creatives_not_entitled enum value to the response property for the response status

    • warning

      added the new creatives_not_entitled enum value to the response property for the response status

    • warning

      added the new creatives_not_entitled enum value to the response property for the response status

    • warning

      added the new creatives_not_entitled enum value to the response property for the response status

    • warning

      added the new creatives_not_entitled enum value to the response property for the response status

    • warning

      added the new creatives_not_entitled enum value to the response property for the response status

    • warning

      added the new survey_has_linked_creatives enum value to the response property for the response status

    • warning

      added the new survey_has_linked_creatives enum value to the response property for the response status

    • warning

      added the new survey_has_linked_creatives enum value to the response property for the response status

    • warning

      added the new survey_has_linked_creatives enum value to the response property for the response status

    • warning

      added the new survey_has_linked_creatives enum value to the response property for the response status

    • warning

      added the new survey_has_linked_creatives enum value to the response property for the response status

    • warning

      added the new survey_has_linked_creatives enum value to the response property for the response status