Basics

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. A successful creation also provisions the website's Default prompt schedule in the same transaction. Tracking patterns preserve the submitted host, path case, and query parameters. An apex such as acme.com includes www.acme.com; an explicit www.acme.com tracks only that host. Paths include the named section and descendants on slash boundaries. Domain matching is case-insensitive; path and query values are case-sensitive.

post/api/v1/websites

Request

  • Base URL
    https://api.athenahq.ai
  • Auth
    API key in header x-api-key

Request body

urlstring uri required

The URL of the website to create. Protocol (http/https) and trailing slashes will be automatically removed. Email addresses and other URLs with a user name (name@example.com) are rejected with 400.

external_idstring

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.

Example request

{
  "url": "https://example.com",
  "external_id": "ws_a7f3b2c9"
}

Response

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

billingEntityCreatedboolean 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.

Example response

{
  "website": {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "websiteUrl": "example.com",
    "orgId": "987e6543-e21b-12d3-a456-426614174000",
    "onboardingStep": 1,
    "externalId": "ws_a7f3b2c9"
  }
}

Changes