Skip to main content

Saved Views

Saved filter presets for tickets, customers, articles, or community posts. Create reusable views and execute them to get filtered results.

The Saved View object

id string

View ID

name string

View name

entityType string

Entity type "tickets" | "customers" | "articles" | "community_posts"

filters object

Saved filter configuration

sortField string

Sort field

sortDirection string

Sort direction "asc" | "desc"

visibility string

Who can see this view "private" | "team"

Endpoints

GET /api/v1/teams/{teamId}/views

List Views

List saved views, optionally filtered by entity type.

Query Parameters

entityType string

Filter by entity type

Code Examples

bash
curl -X GET "https://www.cstar.help/api/v1/teams/{teamId}/views?entityType=tickets" \
  -H "Authorization: Bearer sk_live_your_key"

Responses

200 View list
json
{
  "success": true,
  "data": [
    {
      "id": "view_abc",
      "name": "Urgent Unresolved",
      "entityType": "tickets",
      "filters": {
        "priority": "urgent",
        "status": "open"
      },
      "visibility": "team"
    }
  ]
}

401 Authentication failed: missing or invalid API key
json
{
  "success": false,
  "error": {
    "type": "authentication_error",
    "code": "authentication_required",
    "message": "Invalid or expired API key",
    "doc_url": "https://www.cstar.help/developers/api-reference#authentication",
    "request_id": "req_abc123"
  },
  "meta": {
    "timestamp": "2025-12-10T14:30:00Z"
  }
}

403 Insufficient permissions: wrong key type or team access
json
{
  "success": false,
  "error": {
    "type": "authorization_error",
    "code": "insufficient_permissions",
    "message": "Secret key required for this endpoint",
    "doc_url": "https://www.cstar.help/developers/api-reference#authentication",
    "request_id": "req_abc123"
  },
  "meta": {
    "timestamp": "2025-12-10T14:30:00Z"
  }
}

429 Rate limit exceeded
json
{
  "success": false,
  "error": {
    "type": "rate_limit_error",
    "code": "rate_limit_exceeded",
    "message": "Rate limit exceeded. Try again in 60 seconds",
    "doc_url": "https://www.cstar.help/developers/api-reference#rate-limiting",
    "request_id": "req_abc123"
  },
  "meta": {
    "timestamp": "2025-12-10T14:30:00Z"
  }
}

POST /api/v1/teams/{teamId}/views

Create View

Create a saved view.

Request Body

name string required

View name

entityType string required

Entity type

filters object

Filter configuration

sortField string

Sort field

Default: created_at

sortDirection string

Sort direction

Default: desc

visibility string

Visibility

Default: team

Code Examples

bash
curl -X POST "https://www.cstar.help/api/v1/teams/{teamId}/views" \
  -H "Authorization: Bearer sk_live_your_key" \
  -H "Content-Type: application/json" \
  -d '{"name":"Urgent Unresolved","entityType":"tickets","filters":{"priority":"urgent","status":"open"}}'

Responses

201 View created
json
{
  "success": true,
  "data": {
    "id": "view_abc",
    "name": "Urgent Unresolved",
    "entityType": "tickets",
    "filters": {
      "priority": "urgent"
    }
  }
}

401 Authentication failed: missing or invalid API key
json
{
  "success": false,
  "error": {
    "type": "authentication_error",
    "code": "authentication_required",
    "message": "Invalid or expired API key",
    "doc_url": "https://www.cstar.help/developers/api-reference#authentication",
    "request_id": "req_abc123"
  },
  "meta": {
    "timestamp": "2025-12-10T14:30:00Z"
  }
}

403 Insufficient permissions: wrong key type or team access
json
{
  "success": false,
  "error": {
    "type": "authorization_error",
    "code": "insufficient_permissions",
    "message": "Secret key required for this endpoint",
    "doc_url": "https://www.cstar.help/developers/api-reference#authentication",
    "request_id": "req_abc123"
  },
  "meta": {
    "timestamp": "2025-12-10T14:30:00Z"
  }
}

429 Rate limit exceeded
json
{
  "success": false,
  "error": {
    "type": "rate_limit_error",
    "code": "rate_limit_exceeded",
    "message": "Rate limit exceeded. Try again in 60 seconds",
    "doc_url": "https://www.cstar.help/developers/api-reference#rate-limiting",
    "request_id": "req_abc123"
  },
  "meta": {
    "timestamp": "2025-12-10T14:30:00Z"
  }
}

GET /api/v1/teams/{teamId}/views/{viewId}/execute

Execute View

Execute a saved view. Returns the filtered and sorted results in the same shape as the entity's list endpoint. Needs that entity's view permission; test keys see only test data.

Path Parameters

viewId string required

View ID

Query Parameters

page integer

Page number (1-indexed)

Default: 1

pageSize integer

Results per page (max 100)

Default: 20

Code Examples

bash
curl -X GET "https://www.cstar.help/api/v1/teams/{teamId}/views/{viewId}/execute" \
  -H "Authorization: Bearer sk_live_your_key"

Responses

200 Filtered results
json
{
  "success": true,
  "data": [
    {
      "id": "tkt_abc",
      "object": "ticket",
      "title": "Urgent billing issue",
      "priority": "urgent",
      "status": "open"
    }
  ],
  "pagination": {
    "page": 1,
    "pageSize": 20,
    "total": 142,
    "totalPages": 8
  }
}

401 Authentication failed: missing or invalid API key
json
{
  "success": false,
  "error": {
    "type": "authentication_error",
    "code": "authentication_required",
    "message": "Invalid or expired API key",
    "doc_url": "https://www.cstar.help/developers/api-reference#authentication",
    "request_id": "req_abc123"
  },
  "meta": {
    "timestamp": "2025-12-10T14:30:00Z"
  }
}

403 Insufficient permissions: wrong key type or team access
json
{
  "success": false,
  "error": {
    "type": "authorization_error",
    "code": "insufficient_permissions",
    "message": "Secret key required for this endpoint",
    "doc_url": "https://www.cstar.help/developers/api-reference#authentication",
    "request_id": "req_abc123"
  },
  "meta": {
    "timestamp": "2025-12-10T14:30:00Z"
  }
}

429 Rate limit exceeded
json
{
  "success": false,
  "error": {
    "type": "rate_limit_error",
    "code": "rate_limit_exceeded",
    "message": "Rate limit exceeded. Try again in 60 seconds",
    "doc_url": "https://www.cstar.help/developers/api-reference#rate-limiting",
    "request_id": "req_abc123"
  },
  "meta": {
    "timestamp": "2025-12-10T14:30:00Z"
  }
}