Get Form
curl --request GET \
--url https://api.opnform.com/open/forms/{slug} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.opnform.com/open/forms/{slug}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.opnform.com/open/forms/{slug}', 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/{slug}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.opnform.com/open/forms/{slug}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.opnform.com/open/forms/{slug}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.opnform.com/open/forms/{slug}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": 123,
"slug": "<string>",
"title": "<string>",
"visibility": "public",
"tags": [
"<string>"
],
"language": "<string>",
"custom_domain": "<string>",
"theme": "default",
"font_family": "<string>",
"color": "<string>",
"dark_mode": "light",
"width": "centered",
"size": "sm",
"border_radius": "none",
"layout_rtl": true,
"uppercase_labels": true,
"cover_picture": "<string>",
"logo_picture": "<string>",
"no_branding": true,
"transparent_background": true,
"submit_button_text": "<string>",
"submitted_text": "<string>",
"redirect_url": "<string>",
"re_fillable": true,
"re_fill_button_text": "<string>",
"confetti_on_submission": true,
"show_progress_bar": true,
"submission_retention_value": 1825,
"submission_retention_unit": "day",
"closes_at": "2023-11-07T05:31:56Z",
"closed_text": "<string>",
"max_submissions_count": 2,
"max_submissions_reached_text": "<string>",
"auto_save": true,
"auto_focus": true,
"enable_partial_submissions": true,
"editable_submissions": true,
"editable_submissions_button_text": "<string>",
"password": "<string>",
"use_captcha": true,
"captcha_provider": "recaptcha",
"can_be_indexed": true,
"seo_meta": {},
"custom_code": "<string>",
"database_fields_update": [
"<unknown>"
],
"properties": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "<string>",
"name": "<string>",
"help": "<string>",
"hidden": true,
"required": true,
"placeholder": "<string>",
"width": "full"
}
]
}Forms
Get Form
Retrieve a single form.
GET
/
open
/
forms
/
{slug}
Get Form
curl --request GET \
--url https://api.opnform.com/open/forms/{slug} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.opnform.com/open/forms/{slug}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.opnform.com/open/forms/{slug}', 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/{slug}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.opnform.com/open/forms/{slug}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.opnform.com/open/forms/{slug}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.opnform.com/open/forms/{slug}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": 123,
"slug": "<string>",
"title": "<string>",
"visibility": "public",
"tags": [
"<string>"
],
"language": "<string>",
"custom_domain": "<string>",
"theme": "default",
"font_family": "<string>",
"color": "<string>",
"dark_mode": "light",
"width": "centered",
"size": "sm",
"border_radius": "none",
"layout_rtl": true,
"uppercase_labels": true,
"cover_picture": "<string>",
"logo_picture": "<string>",
"no_branding": true,
"transparent_background": true,
"submit_button_text": "<string>",
"submitted_text": "<string>",
"redirect_url": "<string>",
"re_fillable": true,
"re_fill_button_text": "<string>",
"confetti_on_submission": true,
"show_progress_bar": true,
"submission_retention_value": 1825,
"submission_retention_unit": "day",
"closes_at": "2023-11-07T05:31:56Z",
"closed_text": "<string>",
"max_submissions_count": 2,
"max_submissions_reached_text": "<string>",
"auto_save": true,
"auto_focus": true,
"enable_partial_submissions": true,
"editable_submissions": true,
"editable_submissions_button_text": "<string>",
"password": "<string>",
"use_captcha": true,
"captcha_provider": "recaptcha",
"can_be_indexed": true,
"seo_meta": {},
"custom_code": "<string>",
"database_fields_update": [
"<unknown>"
],
"properties": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "<string>",
"name": "<string>",
"help": "<string>",
"hidden": true,
"required": true,
"placeholder": "<string>",
"width": "full"
}
]
}Get Form
Retrieve a single form by its slug (UUID or human-readable slug).Authentication & Scope
Requires a token with theforms-read ability.
Request
GET /open/forms/{slug} HTTP/1.1
Host: api.opnform.com
Authorization: Bearer <token>
Path Parameters
| Parameter | Type | Description |
|---|---|---|
| slug | string | The form slug or UUID (see dashboard) |
Response
200 OK – Returns a Form object.
{
"id": 42,
"slug": "customer-feedback",
"title": "Customer Feedback",
"visibility": "public",
"properties": [...]
}
404 Not Found – No form matches the provided slug.
403 Forbidden – The token lacks the required ability or you do not have permission to view the form.Response
Successful
Was this page helpful?