Data
Collections, records, project keys and change hook deliveries.
On this page
- GET /v1/projects/{project}/collections
- POST /v1/projects/{project}/collections
- GET /v1/projects/{project}/collections/{collection}
- PATCH /v1/projects/{project}/collections/{collection}
- DELETE /v1/projects/{project}/collections/{collection}
- GET /v1/projects/{project}/collections/{collection}/export
- GET /v1/projects/{project}/data/{collection}
- POST /v1/projects/{project}/data/{collection}
- GET /v1/projects/{project}/data/{collection}/{record}
- PATCH /v1/projects/{project}/data/{collection}/{record}
- DELETE /v1/projects/{project}/data/{collection}/{record}
- GET /v1/projects/{project}/data-keys
- POST /v1/projects/{project}/data-keys/publishable
- POST /v1/projects/{project}/data-keys/secret
- DELETE /v1/projects/{project}/data-keys/secret
- GET /v1/projects/{project}/hook-deliveries
Concepts: Data
Endpoint summaries come from the OpenAPI document.
GET/v1/projects/{project}/collections
Collections of the project's headless data layer with their schema, rules and record counts
- Operation (MCP tool)
listCollections- Authentication
- API key (pfa_…)OAuth token (pfo_…)Secret data key (pfk_…)
Parameters
Responses
Related error codes
Error codes this endpoint and its part of the API answer with. Each one explains what happened and what to do.
POST/v1/projects/{project}/collections
Create a collection: name, fields, access rules and optional change hook. The first collection also creates the publishable key
- Operation (MCP tool)
createCollection- Authentication
- API key (pfa_…)OAuth token (pfo_…)
Parameters
Request body
application/jsonCollectionInputRequired
Responses
Related error codes
Error codes this endpoint and its part of the API answer with. Each one explains what happened and what to do.
GET/v1/projects/{project}/collections/{collection}
One collection
- Operation (MCP tool)
getCollection- Authentication
- API key (pfa_…)OAuth token (pfo_…)Secret data key (pfk_…)
Parameters
Responses
Related error codes
Error codes this endpoint and its part of the API answer with. Each one explains what happened and what to do.
PATCH/v1/projects/{project}/collections/{collection}
Change fields (the full list), rules or the change hook. A field's type cannot change; making read, update or delete public needs a person, not an agent
- Operation (MCP tool)
updateCollection- Authentication
- API key (pfa_…)OAuth token (pfo_…)
Parameters
Request body
application/jsonobjectRequired
Responses
Related error codes
Error codes this endpoint and its part of the API answer with. Each one explains what happened and what to do.
DELETE/v1/projects/{project}/collections/{collection}
Delete a collection and its records
- Operation (MCP tool)
deleteCollection- Authentication
- API key (pfa_…)OAuth token (pfo_…)
Parameters
Responses
Related error codes
Error codes this endpoint and its part of the API answer with. Each one explains what happened and what to do.
GET/v1/projects/{project}/collections/{collection}/export
Export every record as CSV or JSON (a file). Not with the publishable key
- Operation (MCP tool)
exportCollection- Authentication
- API key (pfa_…)OAuth token (pfo_…)Secret data key (pfk_…)
Parameters
Responses
Related error codes
Error codes this endpoint and its part of the API answer with. Each one explains what happened and what to do.
GET/v1/projects/{project}/data/{collection}
List records. filter[field]=value or filter[field][gte]=… (eq, ne, gt, gte, lt, lte, in) and sort=-createdAt on indexed and system fields. Counts toward the monthly data requests
- Operation (MCP tool)
listRecords- Authentication
- API key (pfa_…)OAuth token (pfo_…)Secret data key (pfk_…)Publishable data key (pfp_…)
Parameters
Responses
Related error codes
Error codes this endpoint and its part of the API answer with. Each one explains what happened and what to do.
POST/v1/projects/{project}/data/{collection}
Add a record (the body is the record's fields). With the publishable key only when the collection's create rule is public
- Operation (MCP tool)
createRecord- Authentication
- API key (pfa_…)OAuth token (pfo_…)Secret data key (pfk_…)Publishable data key (pfp_…)
Parameters
Request body
application/jsonobjectRequired
Responses
Related error codes
Error codes this endpoint and its part of the API answer with. Each one explains what happened and what to do.
GET/v1/projects/{project}/data/{collection}/{record}
One record
- Operation (MCP tool)
getRecord- Authentication
- API key (pfa_…)OAuth token (pfo_…)Secret data key (pfk_…)Publishable data key (pfp_…)
Parameters
Responses
Related error codes
Error codes this endpoint and its part of the API answer with. Each one explains what happened and what to do.
PATCH/v1/projects/{project}/data/{collection}/{record}
Change some fields; null removes a field
- Operation (MCP tool)
updateRecord- Authentication
- API key (pfa_…)OAuth token (pfo_…)Secret data key (pfk_…)Publishable data key (pfp_…)
Parameters
Request body
application/jsonobjectRequired
Responses
Related error codes
Error codes this endpoint and its part of the API answer with. Each one explains what happened and what to do.
DELETE/v1/projects/{project}/data/{collection}/{record}
Delete a record
- Operation (MCP tool)
deleteRecord- Authentication
- API key (pfa_…)OAuth token (pfo_…)Secret data key (pfk_…)Publishable data key (pfp_…)
Parameters
Responses
Related error codes
Error codes this endpoint and its part of the API answer with. Each one explains what happened and what to do.
GET/v1/projects/{project}/data-keys
The project's publishable key and whether a secret key and webhook secret exist (the secret is never shown again)
- Operation (MCP tool)
getDataKeys- Authentication
- API key (pfa_…)OAuth token (pfo_…)
Parameters
Responses
Related error codes
Error codes this endpoint and its part of the API answer with. Each one explains what happened and what to do.
POST/v1/projects/{project}/data-keys/publishable
Replace the publishable key; the old one stops working at once. Needs keys.manage and a person's key
- Operation (MCP tool)
rotatePublishableKey- Authentication
- API key (pfa_…)OAuth token (pfo_…)
Parameters
Responses
Related error codes
Error codes this endpoint and its part of the API answer with. Each one explains what happened and what to do.
POST/v1/projects/{project}/data-keys/secret
Create or replace the secret key; returned once. It becomes the PERAFLY_SECRET_KEY environment variable from the next version. Needs keys.manage and a person's key
- Operation (MCP tool)
createSecretKey- Authentication
- API key (pfa_…)OAuth token (pfo_…)
Parameters
Responses
Related error codes
Error codes this endpoint and its part of the API answer with. Each one explains what happened and what to do.
DELETE/v1/projects/{project}/data-keys/secret
Revoke the secret key
- Operation (MCP tool)
revokeSecretKey- Authentication
- API key (pfa_…)OAuth token (pfo_…)
Parameters
Responses
Related error codes
Error codes this endpoint and its part of the API answer with. Each one explains what happened and what to do.
GET/v1/projects/{project}/hook-deliveries
The last 50 change hook deliveries
- Operation (MCP tool)
listHookDeliveries- Authentication
- API key (pfa_…)OAuth token (pfo_…)
Parameters
Responses
Related error codes
Error codes this endpoint and its part of the API answer with. Each one explains what happened and what to do.