Projects API
Projects are the core organizational unit in Inpera. Each project represents a website or application you're collecting feedback for.
Create Project
POST /projects
Authorization: Bearer YOUR_TOKEN
Content-Type: application/json
{
"organizationId": "org-uuid",
"name": "Marketing Website",
"slug": "marketing-website"
}
List Projects by Organization
GET /projects/organization/:organizationId
Authorization: Bearer YOUR_TOKEN
Response:
[
{
"id": "project-uuid",
"name": "Marketing Website",
"slug": "marketing-website",
"organizationId": "org-uuid",
"createdAt": "2024-01-01T00:00:00Z",
"updatedAt": "2024-01-01T00:00:00Z"
}
]
Get Project
GET /projects/:id
Authorization: Bearer YOUR_TOKEN
Update Project
PATCH /projects/:id
Authorization: Bearer YOUR_TOKEN
Content-Type: application/json
{
"name": "Updated Name",
"slug": "updated-slug"
}
Delete Project
DELETE /projects/:id
Authorization: Bearer YOUR_TOKEN
Get Embed Script
GET /projects/:id/embed-script
Authorization: Bearer YOUR_TOKEN
Returns the customized embed script snippet for the project:
{
"script": "<script>!function(p){...}(\"PROJECT_KEY\");</script>",
"projectKey": "pk_xxx"
}
Project Properties
| Field | Type | Description |
|---|---|---|
id |
uuid | Unique identifier |
name |
string | Display name |
slug |
string | URL-friendly identifier |
organizationId |
uuid | Parent organization |
projectKey |
string | Key for embed script |
createdAt |
datetime | Creation timestamp |
updatedAt |
datetime | Last update |
Inpera Events
Handle events from the embed script:
POST /inpera/event
Content-Type: application/json
{
"type": "page_view",
"projectKey": "pk_xxx",
"data": { ... }
}
This is a public endpoint used by the embed script.