Get website information

Returns the website information associated with the provided API key. This endpoint supports both public and private API keys with different authentication methods.

GET
/v1/websites

Header Parameters

Authorization?string

Private API key in Bearer token format. Use this for server-to-server authentication. Format: Bearer sk_[live|test]_...

Match^Bearer sk_(live|test)_[a-f0-9]{64}$
X-Public-Key?string

Public API key for browser-based authentication. Can only be used from whitelisted domains. Format: pk_[live|test]_...

Match^pk_(live|test)_[a-f0-9]{64}$
Origin?string

Required when using public API keys. Must match one of the whitelisted domains for the website. Automatically set by browsers.

Formaturi
X-Visitor-Id?string

Visitor ID from localStorage. If provided, returns existing visitor data. If not provided, creates a new visitor.

Match^[0-9A-HJKMNP-TV-Z]{26}$

Response Body

application/json

application/json

application/json

application/json

curl -X GET "https://api.cossistant.com/v1/v1/websites"
{
  "id": "01JG000000000000000000000",
  "name": "Dub",
  "domain": "dub.co",
  "description": "Link management for modern marketing teams.",
  "logoUrl": "https://dub.co/logo.png",
  "organizationId": "01JG000000000000000000000",
  "status": "active",
  "lastOnlineAt": "2021-01-01T00:00:00.000Z",
  "availableHumanAgents": [
    {
      "id": "01JG000000000000000000000",
      "name": "John Doe",
      "image": "https://cossistant.com/avatar.png",
      "lastSeenAt": "2021-01-01T00:00:00.000Z"
    }
  ],
  "availableAIAgents": [
    {
      "id": "01JG000000000000000000000",
      "name": "John Doe",
      "image": "https://cossistant.com/avatar.png"
    }
  ],
  "visitor": {
    "id": "01JG000000000000000000000",
    "isBlocked": false,
    "language": "en-US",
    "contact": {
      "id": "01JG000000000000000000000",
      "name": "John Doe",
      "email": "john.doe@example.com",
      "image": "https://example.com/avatar.png"
    }
  }
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}