Skip to main content

Search

Search tickets, customers and articles with a secret key. Requires view permission for each selected resource.

The Searc object

type string

Resource type (ticket, customer, article)

id string

Resource ID

title string

Title or name

name string

Customer name

email string

Customer email

Endpoints

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

Search

Try it

Perform a cross-resource search.

Query Parameters

q string required

Search query

types string

Comma-separated types to search (tickets,customers,articles)

limit integer

Max results (up to 50)

Default: 20

Code Examples

bash
curl -X GET "https://www.cstar.help/api/v1/teams/{teamId}/search?q=billing+issue" \
  -H "Authorization: Bearer sk_live_your_key"

Responses

200 Search results
json
{
  "success": true,
  "data": {
    "results": [
      {
        "type": "ticket",
        "id": "tkt_abc",
        "title": "Billing issue"
      }
    ],
    "total": 1,
    "query": "billing issue"
  }
}

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"
  }
}