Skip to main content
All CollectionsAdvanced
Frontly Database API Documentation
Frontly Database API Documentation

Learn how to manage data in your Frontly Database via API

Patrick avatar
Written by Patrick
Updated this week

If you're using Frontly's built-in database solution, you also have the ability to manage records via Frontly's API. This enables you to integrate with any other system, including automation platforms like Zapier and Make.com.

Each endpoint is protected by a setting on each specific data source. You can individually enable the Create, Read, Update and Delete endpoints.

For security purposes, it's important to only enable the endpoints you're using:

All Frontly Database API endpoints require the following headers:

x-api-key = The API key from your Frontly Advanced Settings

x-subdomain = The subdomain of the specific app this data source belongs to

x-data-source = The unique ID of the data source. This can be found in the URL when on the data source details page in the Frontly Admin. It looks like db__1234.


Get Records - GET

https://api.frontly.ai/records/?page=1&page_size=25

Note: Records are returned in pages of 25 results by default. If you need more than 25 records, you can adjust the page size (to a max of 100).

Expected response: A JSON object with 'pagination' object and 'records' array:

{
"pagination": {
"page": 1,
"page_size": 25,
"count": 12,
"total_pages": 1
},
"records": [
{
"frontly_id": "1234-abcd-9876-efgh",
"field_1": "value1",
"field_2": "value1",
},
... more records
]
}


Get Record - GET

https://api.frontly.ai/records/<RECORD_ID>/

Replace the <RECORD_ID> with your actual ID, like this:

Note: No request body is required for the get endpoint.

Expected response: A JSON object with the requested record data.


Create Record - POST

https://api.frontly.ai/records/

Request Body

Include a JSON object with the data you want to include in your new record:

{
"your_field": "value1",
... more fields
}

Expected response: A JSON object with the updated record data.


Update Record - PATCH

https://api.frontly.ai/records/<RECORD_ID>/

Replace the <RECORD_ID> with your actual ID, like this:

Request Body

Include a JSON object with the data you want to update in your new record:

{
"your_field": "value1",
... more fields
}

Note: Only the provided fields will be updated.

Expected response: A JSON object with the updated record data.


Delete Record - DELETE

https://api.frontly.ai/records/<RECORD_ID>/

Replace the <RECORD_ID> with your actual ID, like this:

Note: No request body is required for the delete endpoint.


Errors

If your API Key, Subdomain or Data Source ID are invalid, you will receive an error response like this:

{ "error": "An error message will be here"}


Notes / Tips

  • Only valid fields on your data source will be accepted for Create and Update

Did this answer your question?