---
title: "Create Website"
method: POST
path: "/api/v1/websites"
tags: ["Basics"]
---

# Create Website

`POST /api/v1/websites`

Creates a new website in your organization. The website will be created with onboarding step 1, ready for further configuration. **Partner integrations** may include an `external_id` to map their own identifier onto the new Athena website.

## Request body

- CreateWebsiteRequest — Request body for creating a new website
  - `url` string, uri, required — The URL of the website to create. Protocol (http/https) and trailing slashes will be automatically removed.
  - `external_id` string — **Partner-only.** An identifier from your own system to map to this Athena website. Accepted only when authenticating with an API key for an organization flagged as a partner. Sending this field as a direct customer returns `403 Forbidden`. Must be unique per resource type within your organization — duplicates return `409` with the existing resource in the payload.

## Response `201`

Website created successfully. Partner responses include an `externalId` field (string or `null`); direct-customer responses omit the field entirely.

- object
  - `website` CreatedWebsite, required — A newly created website resource
    - `id` string, uuid, required — Unique identifier for the website
    - `websiteUrl` string, required — The cleaned URL of the website (without protocol or trailing slash)
    - `orgId` string, uuid, required — The organization ID the website belongs to
    - `onboardingStep` integer, required — The current onboarding step (starts at 1)
    - `externalId` string, nullable — **Partner-only.** Echoes the `external_id` from the create request if provided, or `null` if the partner did not supply one. Only present on responses to partner API keys — direct-customer responses omit the field.
  - `billingEntityCreated` boolean, required — Whether the billing entity exists after provisioning. When false, entity creation failed even after a retry: the website exists but has no credits, and setting credits fails with a 400 until it is repaired. Contact AthenaHQ support in that case.

## Other responses

- `400` — Bad request - Invalid parameters
- `401` — Unauthorized - Invalid or missing API key
- `403` — Forbidden - `external_id` is partner-only; non-partner API keys cannot set it.
- `409` — Conflict - (partners only) the supplied `external_id` is already mapped to another website.
- `500` — Internal server error

---

[API](https://skmtc.net/athenahq/apis/athenahq-api.md) · [All operations](https://skmtc.net/athenahq/apis/athenahq-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/athenahq/athenahq-api/versions/6c5d71622cb9/schema)
