Skip to main content

Get Websites

Returns all websites that the authenticated user has access to, including personal websites and team websites.

Endpoint

GET /api/websites

Headers

Authorization
string
required
Bearer token for authentication

Query Parameters

page
number
Page number for pagination (default: 1)
pageSize
number
Number of results per page
Search term to filter websites by name or domain
includeTeams
string
Include websites from teams the user belongs to. Set to any value to enable.

Response

data
array
Array of website objects
count
number
Total number of websites
page
number
Current page number
pageSize
number
Results per page

Example Request

curl https://your-umami-instance.com/api/websites?includeTeams=true \
  -H "Authorization: Bearer YOUR_TOKEN"

Example Response

{
  "data": [
    {
      "id": "550e8400-e29b-41d4-a716-446655440000",
      "name": "My Website",
      "domain": "example.com",
      "shareId": "abc123def456",
      "userId": "660e8400-e29b-41d4-a716-446655440001",
      "teamId": null,
      "createdAt": "2024-01-15T10:30:00.000Z",
      "createdBy": "660e8400-e29b-41d4-a716-446655440001"
    },
    {
      "id": "770e8400-e29b-41d4-a716-446655440002",
      "name": "Team Website",
      "domain": "team.example.com",
      "shareId": null,
      "userId": null,
      "teamId": "880e8400-e29b-41d4-a716-446655440003",
      "createdAt": "2024-02-20T14:45:00.000Z",
      "createdBy": "660e8400-e29b-41d4-a716-446655440001"
    }
  ],
  "count": 2,
  "page": 1,
  "pageSize": 20
}
Use the includeTeams parameter to get all websites including those owned by teams you belong to.

Build docs developers (and LLMs) love