> For the complete documentation index, see [llms.txt](https://apidocs.zerionsoftware.com/doc/iformbuilder-v81/llms.txt)

# Create Public Link Session Record

> POST /public_link_sessions/current/pages/{page_id}/records
> 
> 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.



## Servers
- https://api.iformbuilder.com/exzact/api/v81/[servername]: https://api.iformbuilder.com/exzact/api/v81/[servername]


## Authentication methods
- Public link session


## Parameters
### Headers

- **Authorization** (string)
  e.g. Bearer {session access_token}


### Path parameters

- **page_id** (integer)
  the link's page, or one of its subform pages



### Body: application/json (object)

- **fields** (array[object])

- **parent_record_id** (integer)
  subform records only

- **parent_page_id** (integer)
  subform records only

- **parent_element_id** (integer)
  subform records only

- **javascript_state** (string)



## Responses
### 201
Created - the record was written.

#### Body: application/json (object)
- **id** (integer)
  id of the new record


### 400
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.

#### Body: application/json (object)
- **error_message** (string)
  human-readable reason for the failure


### 401
Unauthorized - no session token, an unknown or expired one, or the link is no longer collecting.

#### Body: application/json (object)
- **error_message** (string)
  human-readable reason for the failure


### 403
Forbidden - `page_id` is not the link's page or one of its subform pages, the parent fields do not name a real subform of `page_id`, the parent record was not written by this session, or public links are switched off.

#### Body: application/json (object)
- **error_message** (string)
  human-readable reason for the failure


### 404
Not Found - `page_id` is not a number.

#### Body: application/json (object)
- **error_message** (string)
  human-readable reason for the failure


### 429
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.

#### Body: application/json (object)
- **error_message** (string)
  human-readable reason for the failure



[Powered by Bump.sh](https://bump.sh)
