Skip to main content
POST
/
v1
/
sites
curl -X POST https://xenarch.dev/v1/sites \
  -H "Authorization: Bearer xk_pub_abc123..." \
  -H "Content-Type: application/json" \
  -d '{"domain": "example.com"}'
{
  "id": "b2c3d4e5-f6a7-8901-bcde-f23456789012",
  "site_token": "st_xyz789..."
}
curl -X POST https://xenarch.dev/v1/sites \
  -H "Authorization: Bearer xk_pub_abc123..." \
  -H "Content-Type: application/json" \
  -d '{"domain": "example.com"}'
{
  "id": "b2c3d4e5-f6a7-8901-bcde-f23456789012",
  "site_token": "st_xyz789..."
}

Notes

  • Save the site_token — it is returned once and stored as a SHA-256 hash
  • Domain must be unique across all publishers
  • The site token is used by your middleware to create gates

Headers

authorization
string
required

Body

application/json
domain
string
required
Required string length: 1 - 253

Response

Successful Response

id
string<uuid>
required
site_token
string
required