Skip to main content
POST
/
sites
Create site
curl --request POST \
  --url https://api.surefeedback.com/api/v1/sites \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "name": "<string>",
  "domain": "<string>",
  "project_id": "<string>"
}
'
{
  "success": true,
  "data": {
    "id": "880e8400-e29b-41d4-a716-446655440003",
    "name": "Main Website",
    "domain": "example.com",
    "api_token": "sc_AbCdEfGh123456",
    "is_active": true,
    "project_id": "770e8400-e29b-41d4-a716-446655440002"
  }
}
Creates a new site and generates a site token (sc_...) for use with the SureFeedback widget.
Requires authentication. Domain must be unique across the platform.

Request body

name
string
required
Display name for the site. Max 255 characters.
domain
string
required
The domain where the widget will be embedded (e.g., example.com). Must be unique.
project_id
string
required
UUID of the project this site belongs to.

Response

data
object
{
  "success": true,
  "data": {
    "id": "880e8400-e29b-41d4-a716-446655440003",
    "name": "Main Website",
    "domain": "example.com",
    "api_token": "sc_AbCdEfGh123456",
    "is_active": true,
    "project_id": "770e8400-e29b-41d4-a716-446655440002"
  }
}