POST /api/v1/projects

Authentication

Bearer Token API Key (cookie: better-auth.session_token)

Request Body

application/json
name string REQUIRED
url string (uri) REQUIRED
viewport string
Enum: desktop, mobile, tablet

Responses

201 Project created
application/json
id string REQUIRED
user_id string REQUIRED
name string REQUIRED
url string REQUIRED
viewport string REQUIRED
refresh_schedule string REQUIRED
webhook_secret string | null REQUIRED
signing_secret string
Returned only on project creation. Store it server-side and rotate if exposed.
created_at string REQUIRED
updated_at string REQUIRED
demo_count number
400 Validation error
401 Unauthorized
curl -X POST 'https://littledemo.com/api/v1/projects' \  -H 'Authorization: Bearer YOUR_API_TOKEN' \  -H 'Content-Type: application/json' \  -d '{  "name": "string",  "url": "https://example.com",  "viewport": "desktop"}'
const response = await fetch('https://littledemo.com/api/v1/projects', {  method: 'POST',  headers: {      "Authorization": "Bearer YOUR_API_TOKEN",      "Content-Type": "application/json"  },  body: JSON.stringify({    "name": "string",    "url": "https://example.com",    "viewport": "desktop"  })});const data = await response.json();console.log(data);
import requestsheaders = {    'Authorization': 'Bearer YOUR_API_TOKEN'}response = requests.post('https://littledemo.com/api/v1/projects', headers=headers, json={  "name": "string",  "url": "https://example.com",  "viewport": "desktop"})print(response.json())
201 Response
{  "id": "<string>",  "user_id": "<string>",  "name": "<string>",  "url": "<string>",  "viewport": "<string>",  "refresh_schedule": "<string>",  "webhook_secret": "<string>",  "signing_secret": "<string>",  "created_at": "<string>",  "updated_at": "<string>",  "demo_count": 123}
Ask a question... ⌘I