Skip to developer documentation
Browse developer documentation
API documentation / Websites

Websites

Create a website

Add a website, or reuse its existing domain, within the workspace's current plan.

POST/api/v1/sites

Access: OAuth analytics:read + sites:write · workspace owner/admin · Permission details

JSON request body

JSON request fields
FieldTypeDescription
domainRequiredstringPublic domain or HTTP(S) address. Normalized to a lowercase domain without www, credentials or a port.
confirmRequiredbooleanConfirm the website details with the account holder before sending true.
namestringWebsite name; defaults to domain.
currencystringSupported three-letter currency.

Default: USD.

timezonestringIANA timezone.

Default: UTC.

Request examples

Examples run from your server or terminal. Configure ATTRIBOO_TOKEN privately for authenticated requests. Replace example website IDs and values with your own. The examples make real requests when you run them.

cURL request
curl -X POST "https://www.attriboo.com/api/v1/sites" \
  -H "Authorization: Bearer $ATTRIBOO_TOKEN" \
  -H "Content-Type: application/json" \
  --data '{
  "domain": "shop.example.com",
  "name": "Example shop",
  "currency": "USD",
  "timezone": "UTC",
  "confirm": true
}'

Response

Illustrative response. Fields below are inside the data object. Optional coverage, notes and continuation fields vary by report.

Response fields
FieldTypeDescription
siteobjectReturned website details.
createdbooleanWhether a website was created.
JSON response
{
  "status": "success",
  "data": {
    "site": {
      "id": "site_example",
      "domain": "shop.example.com",
      "currency": "USD",
      "name": "Example shop",
      "timezone": "UTC"
    },
    "created": true
  }
}

Behavior and limits

Requires an OAuth connection with analytics:read sites:write and current workspace owner/admin access. Workspace keys cannot use this endpoint.

Does not buy an upgrade. A website plan limit returns 403. Always use the returned site rather than inventing an ID.