Get a form block
curl --request GET \
--url https://api.onlyform.com/v1/forms/{formId}/blocks/{blockId} \
--header 'X-API-Key: <api-key>'const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.onlyform.com/v1/forms/{formId}/blocks/{blockId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.onlyform.com/v1/forms/{formId}/blocks/{blockId}"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.onlyform.com/v1/forms/{formId}/blocks/{blockId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"id": "<string>",
"label": "<string>",
"description": "<string>",
"required": true,
"properties": {
"buttonText": "<string>",
"buttonLink": "<string>",
"shareButtons": true,
"maxChars": 0,
"min": 123,
"max": 123,
"minVal": true,
"maxVal": true,
"dateSeparator": "<string>",
"disabledDays": 5,
"beforeDate": "2023-11-07T05:31:56Z",
"afterDate": "2023-11-07T05:31:56Z",
"specificDates": [
"2023-11-07T05:31:56Z"
],
"weekStartsOn": 4,
"quotationMarks": true,
"multiSelection": true,
"randomize": true,
"alphaOrder": true,
"defaultCountry": "<string>",
"from": 123,
"to": 123,
"scaleStep": 123,
"limit": 2,
"currency": "<string>",
"amount": "<string>",
"paymentGateway": "<string>",
"showFields": true,
"showDatePicker": true,
"showLabels": true,
"superSize": true,
"otherOption": true,
"otherText": "<string>",
"horizontalAlign": true,
"verticalAlign": true,
"perRow": 2,
"altText": true,
"imageAlt": "<string>",
"imageWidth": 123,
"firstLabel": "<string>",
"secondLabel": "<string>",
"thirdLabel": "<string>",
"leftLabel": true,
"centerLabel": true,
"rightLabel": true,
"addressOrContact": {
"firstName": {
"hide": true,
"required": true
},
"lastName": {
"hide": true,
"required": true
},
"email": {
"hide": true,
"required": true
},
"phone": {
"hide": true,
"required": true
},
"company": {
"hide": true,
"required": true
},
"address": {
"hide": true,
"required": true
},
"address2": {
"hide": true,
"required": true
},
"city": {
"hide": true,
"required": true
},
"state": {
"hide": true,
"required": true
},
"zip": {
"hide": true,
"required": true
},
"country": {
"hide": true,
"required": true
}
},
"legalText": "<string>",
"legalStopFurther": true,
"showSeconds": true,
"showTimePicker": true,
"videoLink": "<string>",
"pdfLink": "<string>",
"embedLink": "<string>",
"placeholderText": "<string>",
"numberFormat": "<string>",
"allowedFiles": [
"<string>"
],
"multipleFiles": true,
"maxFileSize": true,
"hide": true,
"showActions": true,
"colorOption": true,
"rule": {},
"image": {}
},
"part_of": "<string>",
"row_id": "<string>",
"choices": [
{
"id": "<string>",
"label": "<string>",
"image": "<unknown>",
"color": "<string>",
"row_id": "<string>",
"alt": "<string>"
}
],
"children": "<array>",
"matrix_columns": [
{
"id": "<string>",
"label": "<string>",
"image": "<unknown>",
"color": "<string>",
"row_id": "<string>",
"alt": "<string>"
}
],
"matrix_rows": [
{
"id": "<string>",
"label": "<string>",
"image": "<unknown>",
"color": "<string>",
"row_id": "<string>",
"alt": "<string>"
}
]
}{
"type": "<string>",
"code": "<string>",
"message": "<string>",
"status": 123,
"request_id": "<string>",
"details": [
{}
]
}{
"type": "<string>",
"code": "<string>",
"message": "<string>",
"status": 123,
"request_id": "<string>",
"details": [
{}
]
}{
"type": "<string>",
"code": "<string>",
"message": "<string>",
"status": 123,
"request_id": "<string>",
"details": [
{}
]
}{
"type": "<string>",
"code": "<string>",
"message": "<string>",
"status": 123,
"request_id": "<string>",
"details": [
{}
]
}Forms
Get a form block
Returns one top-level question or content block. Requires forms:read.
GET
https://api.onlyform.com
/
v1
/
forms
/
{formId}
/
blocks
/
{blockId}
Get a form block
curl --request GET \
--url https://api.onlyform.com/v1/forms/{formId}/blocks/{blockId} \
--header 'X-API-Key: <api-key>'const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.onlyform.com/v1/forms/{formId}/blocks/{blockId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.onlyform.com/v1/forms/{formId}/blocks/{blockId}"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.onlyform.com/v1/forms/{formId}/blocks/{blockId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"id": "<string>",
"label": "<string>",
"description": "<string>",
"required": true,
"properties": {
"buttonText": "<string>",
"buttonLink": "<string>",
"shareButtons": true,
"maxChars": 0,
"min": 123,
"max": 123,
"minVal": true,
"maxVal": true,
"dateSeparator": "<string>",
"disabledDays": 5,
"beforeDate": "2023-11-07T05:31:56Z",
"afterDate": "2023-11-07T05:31:56Z",
"specificDates": [
"2023-11-07T05:31:56Z"
],
"weekStartsOn": 4,
"quotationMarks": true,
"multiSelection": true,
"randomize": true,
"alphaOrder": true,
"defaultCountry": "<string>",
"from": 123,
"to": 123,
"scaleStep": 123,
"limit": 2,
"currency": "<string>",
"amount": "<string>",
"paymentGateway": "<string>",
"showFields": true,
"showDatePicker": true,
"showLabels": true,
"superSize": true,
"otherOption": true,
"otherText": "<string>",
"horizontalAlign": true,
"verticalAlign": true,
"perRow": 2,
"altText": true,
"imageAlt": "<string>",
"imageWidth": 123,
"firstLabel": "<string>",
"secondLabel": "<string>",
"thirdLabel": "<string>",
"leftLabel": true,
"centerLabel": true,
"rightLabel": true,
"addressOrContact": {
"firstName": {
"hide": true,
"required": true
},
"lastName": {
"hide": true,
"required": true
},
"email": {
"hide": true,
"required": true
},
"phone": {
"hide": true,
"required": true
},
"company": {
"hide": true,
"required": true
},
"address": {
"hide": true,
"required": true
},
"address2": {
"hide": true,
"required": true
},
"city": {
"hide": true,
"required": true
},
"state": {
"hide": true,
"required": true
},
"zip": {
"hide": true,
"required": true
},
"country": {
"hide": true,
"required": true
}
},
"legalText": "<string>",
"legalStopFurther": true,
"showSeconds": true,
"showTimePicker": true,
"videoLink": "<string>",
"pdfLink": "<string>",
"embedLink": "<string>",
"placeholderText": "<string>",
"numberFormat": "<string>",
"allowedFiles": [
"<string>"
],
"multipleFiles": true,
"maxFileSize": true,
"hide": true,
"showActions": true,
"colorOption": true,
"rule": {},
"image": {}
},
"part_of": "<string>",
"row_id": "<string>",
"choices": [
{
"id": "<string>",
"label": "<string>",
"image": "<unknown>",
"color": "<string>",
"row_id": "<string>",
"alt": "<string>"
}
],
"children": "<array>",
"matrix_columns": [
{
"id": "<string>",
"label": "<string>",
"image": "<unknown>",
"color": "<string>",
"row_id": "<string>",
"alt": "<string>"
}
],
"matrix_rows": [
{
"id": "<string>",
"label": "<string>",
"image": "<unknown>",
"color": "<string>",
"row_id": "<string>",
"alt": "<string>"
}
]
}{
"type": "<string>",
"code": "<string>",
"message": "<string>",
"status": 123,
"request_id": "<string>",
"details": [
{}
]
}{
"type": "<string>",
"code": "<string>",
"message": "<string>",
"status": 123,
"request_id": "<string>",
"details": [
{}
]
}{
"type": "<string>",
"code": "<string>",
"message": "<string>",
"status": 123,
"request_id": "<string>",
"details": [
{}
]
}{
"type": "<string>",
"code": "<string>",
"message": "<string>",
"status": 123,
"request_id": "<string>",
"details": [
{}
]
}Authorizations
A scoped key with the of_live_ prefix, generated from Profile > API keys.
Path Parameters
Pattern:
^[0-9a-fA-F]{24}$Example:
"507f1f77bcf86cd799439011"
Stable caller-supplied ID of a top-level block.
Required string length:
1 - 200Response
Block details.
Stable caller-supplied block ID.
Available options:
welcome, ending, date, file-upload, phone-number, email, website, payment, statement, group, short-text, long-text, ranking, opinion-scale, rating, matrix, number, multiple-choice, picture-choice, yes-no, dropdown, legal, address, contact-info, time, color, currency, slider, gate, signature, coordinates, captcha, video, pdf, text, divider, label, heading-1, heading-2, heading-3, page-break, logic, hidden-field, image, audio, checkboxes Type-specific block settings. Unsupported combinations are ignored by the renderer.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Was this page helpful?
⌘I