Builder.io Write API
With the Write API you can create, delete, and update content in Builder. This can be useful if you want to programmatically from your own internal application, or as part of a code release and build process.
Getting Started
First, you'll need to create a private key. Go over to your organization settings page (be sure to have Developer or Admin permissions) and create a private key and copy it. Note: Be careful with this key and keep it secret! It allows anyone to have write access to your content in Builder. Only use it in API calls from your server, not any calls from public client applications.
Usage
POST
To create new entries in Builder, send a POST request like below
curl https://builder.io/api/v1/write/MODEL_NAME \
-X POST \
-d '{ "name": "Hi!", "data": { "field": "value" } }' \
-H 'Authorization: Bearer YOUR_PRIVATE_KEY'
# Example response
# {
# "name": "Hi!",
# "id": "ca7397dfdcd93",
# "data": { "field": "value" }
# }
PATCH
To update entries in Builder, send a PATCH request like below
curl https://builder.io/api/v1/write/MODEL_NAME/ENTRY_ID \
-X PATCH \
-d '{ "data": { "field": "newValue" } }' \
-H 'Authorization: Bearer YOUR_PRIVATE_KEY'
# Example response
# {
# "name": "Hi!",
# "id": "ca7397dfdcd93",
# "data": { "field": "newValue" }
# }
PUT
To replace entries in Builder, send a PUT request like below
curl https://builder.io/api/v1/write/MODEL_NAME/ENTRY_ID \
-X PUT \
-d '{ "data": { "field": "newValue" } }' \
-H 'Authorization: Bearer YOUR_PRIVATE_KEY'
# Example response
# {
# "id": "ca7397dfdcd93",
# "data": { "field": "newValue" }
# }
DELETE
To delete entries in Builder, send a PUT request like below
curl https://builder.io/api/v1/write/ENTRY_ID \
-X DELETE \
-H 'Authorization: Bearer YOUR_PRIVATE_KEY'
# Example response
# {
# "message": "Success"
# }
Up next