Browse developer documentation
Websites
Create a website
Add a website, or reuse its existing domain, within the workspace's current plan.
/api/v1/sitesAccess: OAuth analytics:read + sites:write · workspace owner/admin · Permission details
JSON request body
| Field | Type | Description |
|---|---|---|
domainRequired | string | Public domain or HTTP(S) address. Normalized to a lowercase domain without www, credentials or a port. |
confirmRequired | boolean | Confirm the website details with the account holder before sending true. |
name | string | Website name; defaults to domain. |
currency | string | Supported three-letter currency. Default: |
timezone | string | IANA timezone. Default: |
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 -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.
| Field | Type | Description |
|---|---|---|
site | object | Returned website details. |
created | boolean | Whether a website was created. |
{
"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.