PUT
/
open
/
forms
/
{id}
/
submissions
/
{submission_id}
curl --request PUT \
  --url https://api.opnform.com/open/forms/{id}/submissions/{submission_id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "data": {}
}'
{
  "submission_id": 123,
  "form_id": 123,
  "submitted_at": "2023-11-07T05:31:56Z",
  "data": {}
}

Update Submission

Modify an existing submission’s answers. This endpoint is useful when you want to correct values or enrich a submission after it was created.

Authentication & Scope

Requires forms-write ability.

Request

PUT /open/forms/{id}/submissions/{submission_id} HTTP/1.1
Host: api.opnform.com
Content-Type: application/json
Authorization: Bearer <token>

Path Parameters

ParameterTypeDescription
idnumberID of the parent form.
submission_idnumberID of the submission you want to update.

Body Parameters

The payload should be an object whose keys correspond to the field IDs in the form definition. You only need to send the fields you intend to change. Other special meta-fields:

FieldTypeDescription
completion_timeintegerOptional; total time in seconds.

Example (updating two answers):

{
  "field_name": "Alice",
  "field_email": "alice@example.com",
  "completion_time": 125
}

Response

200 OK – Returns the updated Submission object plus a success message.

{
  "message": "Record successfully updated.",
  "data": {
    "submission_id": 17,
    "form_id": 99,
    "submitted_at": "2024-06-12T10:11:12Z",
    "data": {
      "field_name": "Alice",
      "field_email": "alice@example.com"
    }
  }
}

403 Forbidden – Token lacks forms-write or you do not have permission.

Authorizations

Authorization
string
header
required

Personal Access Token

Path Parameters

id
number
required
submission_id
number
required

Body

application/json

Response

200
application/json

Updated

The response is of type object.