メインコンテンツへスキップ
3分で読めます

GET /websites

List all websites accessible with your API key. Results are scoped based on your API key permissions: full-access keys return all team websites, site-specific keys return only the assigned website.

GET/api/external/v1/websites

List all accessible websites

Authentication

All requests require an API key passed via the X-API-Key header. Alternatively, you can use the Authorization: Bearer YOUR_API_KEY header.

AuthenticationBash
curl -X GET 'https://api.zenovay.com/api/external/v1/websites' \
-H 'X-API-Key: YOUR_API_KEY'

Parameters

This endpoint has no query parameters.

Response

Response (200 OK)JSON
{
"success": true,
"data": {
  "websites": [
    {
      "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "domain": "mywebsite.com",
      "name": "My Website",
      "tracking_code": "ZV_abc123xyz",
      "is_active": true,
      "created_at": "2025-11-15T10:30:00.000Z",
      "team_id": "t1a2b3c4-d5e6-7890-abcd-ef1234567890"
    },
    {
      "id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
      "domain": "acme-store.io",
      "name": "Acme Store",
      "tracking_code": "ZV_def456uvw",
      "is_active": true,
      "created_at": "2026-01-05T08:00:00.000Z",
      "team_id": "t1a2b3c4-d5e6-7890-abcd-ef1234567890"
    }
  ],
  "total": 2
},
"timestamp": "2026-02-07T12:00:00.000Z"
}

Response Fields

FieldTypeDescription
websitesarrayList of website objects
websites[].idstringUnique website identifier (UUID)
websites[].domainstringWebsite domain
websites[].namestringDisplay name
websites[].tracking_codestringTracking code for the snippet
websites[].is_activebooleanWhether tracking is active
websites[].created_atstringISO 8601 creation date
websites[].team_idstringTeam that owns the website
totalnumberTotal number of websites returned

TypeScript Interface

WebsitesResponseTypeScript
interface Website {
id: string;
domain: string;
name: string;
tracking_code: string;
is_active: boolean;
created_at: string;
team_id: string;
}

interface WebsitesResponse {
success: true;
data: {
  websites: Website[];
  total: number;
};
timestamp: string;
}

HTTP Status Codes

Status CodeDescription
200Success
400Bad Request - Invalid parameters
401Unauthorized - Invalid or missing API key
403Forbidden - Insufficient permissions
429Too Many Requests - Rate limit exceeded
500Internal Server Error

Code Examples

cURLBash
curl -X GET 'https://api.zenovay.com/api/external/v1/websites' \
-H 'X-API-Key: YOUR_API_KEY' \
-H 'Content-Type: application/json'

Error Handling

Error Response (401 Unauthorized)JSON
{
"success": false,
"error": {
  "message": "Invalid or missing API key",
  "code": "UNAUTHORIZED",
  "timestamp": "2026-02-07T12:00:00.000Z"
}
}
このページは役に立ちましたか?