Creates one record through a public link session. page_id is the link's page, or one of its subform pages for a subform record.
Monthly allowance
A record on the link's page takes one submission from the profile's public_link_monthly_limits for the current month before anything is written, under a lock, so concurrent submissions can never exceed it. At the limit, or when the profile has no limit, the call answers 429 and writes nothing. If the write then fails, the submission is given back. Crossing 75 %, 90 % and 100 % sends the public_link_email_alert e-mail once per threshold per month. Subform records do not count.
Subform records
Send parent_record_id, parent_page_id and parent_element_id. The parent must be a record this same session wrote, and parent_element_id must be the subform element on parent_page_id that points at page_id.
Fields
As POST /profiles/{profile_id}/pages/{page_id}/records, with these refused: encoding other than base64 (the server does not fetch URLs for a public link), is_media_internal, an extension other than jpg, jpeg or png, values for assign-to, sound and third-party file-upload elements, and multi-photo values.
Stored metadata
created_by and modified_by are publiclink:{link id}, created_location and modified_location are PUBLIC_LINK, and created_device_id identifies the session. None of them can be set by the caller.
Responses
-
Created - the record was written.
-
Bad Request - the body is not one record object, a field is invalid for its element, a field uses a shape a public link does not accept (see the description), or the parent fields are missing or present when they should not be.
-
Unauthorized - no session token, an unknown or expired one, or the link is no longer collecting.
-
Forbidden -
page_idis not the link's page or one of its subform pages, the parent fields do not name a real subform ofpage_id, the parent record was not written by this session, or public links are switched off. -
Not Found -
page_idis not a number. -
Too Many Requests - the profile has used its public link submissions for this month (nothing is written), or this session has written its maximum number of records.
curl \
--request POST 'https://api.iformbuilder.com/exzact/api/v80/[servername]/public_link_sessions/current/pages/{page_id}/records' \
--header "Content-Type: application/json" \
--header "Authorization: Bearer pls_0123456789abcdef0123456789abcdef.0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef" \
--data '{
"fields": [
{
"element_name": "full_name",
"value": "Jane Doe"
},
{
"element_name": "photo",
"value": "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8z8BQDwAEhQGAhKmMIQAAAABJRU5ErkJggg==",
"extension": "png"
}
]
}'
{
"fields": [
{
"element_name": "full_name",
"value": "Jane Doe"
},
{
"element_name": "photo",
"value": "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8z8BQDwAEhQGAhKmMIQAAAABJRU5ErkJggg==",
"extension": "png"
}
]
}
{
"id": 1001
}
{
"error_message": "string"
}
{
"error_message": "string"
}
{
"error_message": "string"
}
{
"error_message": "string"
}
{
"error_message": "string"
}