Spoar
Projects

Create a project

POST
/v2/projects

The secret key is in this response only; the API stores its hash.

Authorization

AuthorizationBearer <token>

An API token from POST /v2/tokens (at_live_...), or a project's secret key (sk_...) for server-side ingest.

In: header

Request Body

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v2/projects" \  -H "Content-Type: application/json" \  -d '{    "id": "docs",    "name": "Docs",    "domain": "docs.remcostoeten.nl",    "visibility": "public",    "allowedOrigins": [      "https://docs.remcostoeten.nl"    ]  }'
{  "data": {    "id": "docs",    "name": "Docs",    "domain": "docs.remcostoeten.nl",    "visibility": "public",    "publicVisitorData": false,    "sqlEnabled": true,    "widgetReports": false,    "allowedOrigins": [      "https://docs.remcostoeten.nl"    ],    "retentionDays": 90,    "publicKey": "pk_live_c07b19e2",    "secretKey": "sk_live_5d0e7c1f9a2b4c6d8e0f",    "createdAt": "2026-09-27T16:41:00.000Z",    "updatedAt": "2026-09-27T16:41:00.000Z"  }}