Skip to main content

POST /api/v1/sites

Creates a new site with the specified domain and configuration. Requires the sites:provision:* API scope.
This endpoint is only available with a subscription that includes the Sites API feature.

Authentication

Requires a valid API key with the sites:provision:* scope passed in the Authorization header.

Request Body

domain
string
required
The domain of the site to create. The domain will be automatically normalized (lowercased, stripped of protocol/www prefix).Examples: example.com, blog.example.com, 音乐.cnInternational domain names (IDNs) are supported. URI reserved characters (:, ?, #, [, ], @, !, $, &, ', (, ), *, +, ,, ;, =) are not allowed.
timezone
string
default:"Etc/UTC"
The timezone for the site. Must be a valid IANA timezone identifier.Examples: America/New_York, Europe/London, Asia/Tokyo
team_id
string
The identifier of the team to create the site under. If not provided, the site will be created under the user’s default team.Note: If using a team-scoped API key, this parameter is ignored and the site is created under the API key’s team.
tracker_script_configuration
object
Optional configuration for the tracker script. If not provided, default values will be used.

Response

domain
string
The domain of the created site.
timezone
string
The timezone of the created site.
custom_properties
array
List of allowed custom event properties for the site. Empty array by default.
tracker_script_configuration
object
The tracker script configuration for the site.
curl -X POST https://plausible.io/api/v1/sites \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "domain": "example.com",
    "timezone": "America/New_York"
  }'

Build docs developers (and LLMs) love