Update Submission
curl --request PUT \
--url https://api.opnform.com/open/forms/{id}/submissions/{submission_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{}'import requests
url = "https://api.opnform.com/open/forms/{id}/submissions/{submission_id}"
payload = {}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({})
};
fetch('https://api.opnform.com/open/forms/{id}/submissions/{submission_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.opnform.com/open/forms/{id}/submissions/{submission_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.opnform.com/open/forms/{id}/submissions/{submission_id}"
payload := strings.NewReader("{}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.opnform.com/open/forms/{id}/submissions/{submission_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.opnform.com/open/forms/{id}/submissions/{submission_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{}"
response = http.request(request)
puts response.read_body{
"id": 123,
"form_id": 123,
"completion_time": 123,
"data": {},
"meta": {
"attribution": {
"utm_source": "<string>",
"utm_medium": "<string>",
"utm_campaign": "<string>",
"utm_id": "<string>",
"utm_term": "<string>",
"utm_content": "<string>",
"utm_source_platform": "<string>",
"utm_creative_format": "<string>",
"utm_marketing_tactic": "<string>",
"gclid": "<string>",
"gbraid": "<string>",
"wbraid": "<string>",
"dclid": "<string>",
"fbclid": "<string>",
"ttclid": "<string>",
"msclkid": "<string>"
}
}
}Submissions
Update Submission
Update a submission. Requires forms-write ability.
PUT
/
open
/
forms
/
{id}
/
submissions
/
{submission_id}
Update Submission
curl --request PUT \
--url https://api.opnform.com/open/forms/{id}/submissions/{submission_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{}'import requests
url = "https://api.opnform.com/open/forms/{id}/submissions/{submission_id}"
payload = {}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({})
};
fetch('https://api.opnform.com/open/forms/{id}/submissions/{submission_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.opnform.com/open/forms/{id}/submissions/{submission_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.opnform.com/open/forms/{id}/submissions/{submission_id}"
payload := strings.NewReader("{}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.opnform.com/open/forms/{id}/submissions/{submission_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.opnform.com/open/forms/{id}/submissions/{submission_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{}"
response = http.request(request)
puts response.read_body{
"id": 123,
"form_id": 123,
"completion_time": 123,
"data": {},
"meta": {
"attribution": {
"utm_source": "<string>",
"utm_medium": "<string>",
"utm_campaign": "<string>",
"utm_id": "<string>",
"utm_term": "<string>",
"utm_content": "<string>",
"utm_source_platform": "<string>",
"utm_creative_format": "<string>",
"utm_marketing_tactic": "<string>",
"gclid": "<string>",
"gbraid": "<string>",
"wbraid": "<string>",
"dclid": "<string>",
"fbclid": "<string>",
"ttclid": "<string>",
"msclkid": "<string>"
}
}
}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
Requiresforms-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
| Parameter | Type | Description |
|---|---|---|
| id | number | ID of the parent form. |
| submission_id | number | ID 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:| Field | Type | Description |
|---|---|---|
| completion_time | integer | Optional; total time in seconds. |
{
"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
Personal Access Token
Body
application/json
The body is of type object.
Response
Updated
Was this page helpful?