Customers
Customers represent the people who submit tickets. Track their history, sentiment, and metadata across all interactions.
The Customer object
Unique customer identifier (cus_ prefix)
Full name
Email address
Account status: a built-in value or a status your team added. Pending is a widget signup that hasn't confirmed its email yet. cStar makes it active on the first confirmed sign-in. "active" | "inactive" | "churned" | "pending"
One of the team's sentiment keys (GET /settings sentiments). The defaults are happy, neutral, frustrated and angry. "happy" | "neutral" | "frustrated" | "angry"
Array of tag strings
Internal notes about this customer
The customer's tickets in this key's mode (test or live), counted when the customer is read.
When the customer was created
Last modification timestamp
Endpoints
/api/v1/teams/{teamId}/customersList Customers
Try itRetrieve a paginated list of customers with optional filtering.
Query Parameters
status string Filter by status (built-in values, or a status your team added)
sentiment string Filter by one of the team's sentiment keys (GET /settings sentiments). An unknown key is a 400.
search string Search by name or email
page integer Page number (1-indexed)
Default: 1
pageSize integer Results per page (max 100)
Default: 20
Code Examples
curl -X GET "https://www.cstar.help/api/v1/teams/{teamId}/customers?status=active" \
-H "Authorization: Bearer sk_live_your_key" Responses
{
"success": true,
"data": [
{
"id": "cus_7c9e667974254de0944be07fc1f90ae7",
"name": "Jane Smith",
"email": "jane@example.com",
"status": "active",
"sentiment": "happy",
"ticketCount": 5,
"createdAt": "2025-11-01T10:00:00Z"
}
],
"pagination": {
"total": 142,
"page": 1,
"pageSize": 20,
"hasMore": true
},
"meta": {
"requestId": "req_abc123",
"timestamp": "2025-12-10T14:30:00Z"
}
} {
"success": false,
"error": {
"type": "authentication_error",
"code": "invalid_api_key",
"message": "The API key provided is invalid or has been revoked",
"doc_url": "https://www.cstar.help/developers/errors#invalid_api_key",
"request_id": "req_abc123"
},
"meta": {
"timestamp": "2025-12-10T14:30:00Z"
}
} {
"success": false,
"error": {
"type": "authentication_error",
"code": "insufficient_permissions",
"message": "Your API key does not have permission for this operation",
"doc_url": "https://www.cstar.help/developers/errors#insufficient_permissions",
"request_id": "req_abc123"
},
"meta": {
"timestamp": "2025-12-10T14:30:00Z"
}
} {
"success": false,
"error": {
"type": "rate_limit_error",
"code": "rate_limit_exceeded",
"message": "Rate limit exceeded. Try again in 60 seconds.",
"retryAfter": 60,
"doc_url": "https://www.cstar.help/developers/errors#rate_limit_exceeded",
"request_id": "req_abc123"
},
"meta": {
"timestamp": "2025-12-10T14:30:00Z"
}
} /api/v1/teams/{teamId}/customers/{customerId}Get Customer
Try itRetrieve a single customer by ID with their full profile and ticket history summary.
Path Parameters
customerId string requiredThe customer ID (cus_ prefix)
Code Examples
curl -X GET "https://www.cstar.help/api/v1/teams/{teamId}/customers/{customerId}" \
-H "Authorization: Bearer sk_live_your_key" Responses
{
"success": true,
"data": {
"id": "cus_7c9e667974254de0944be07fc1f90ae7",
"name": "Jane Smith",
"email": "jane@example.com",
"status": "active",
"sentiment": "happy",
"tags": [
"vip",
"enterprise"
],
"notes": "Key account: escalate issues immediately",
"ticketCount": 5,
"createdAt": "2025-11-01T10:00:00Z",
"updatedAt": "2025-12-10T14:30:00Z"
},
"meta": {
"requestId": "req_abc123",
"timestamp": "2025-12-10T14:30:00Z"
}
} {
"success": false,
"error": {
"type": "not_found_error",
"code": "resource_not_found",
"message": "Customer not found",
"doc_url": "https://www.cstar.help/developers/errors#resource_not_found",
"request_id": "req_abc123"
},
"meta": {
"timestamp": "2025-12-10T14:30:00Z"
}
} {
"success": false,
"error": {
"type": "authentication_error",
"code": "invalid_api_key",
"message": "The API key provided is invalid or has been revoked",
"doc_url": "https://www.cstar.help/developers/errors#invalid_api_key",
"request_id": "req_abc123"
},
"meta": {
"timestamp": "2025-12-10T14:30:00Z"
}
} {
"success": false,
"error": {
"type": "authentication_error",
"code": "insufficient_permissions",
"message": "Your API key does not have permission for this operation",
"doc_url": "https://www.cstar.help/developers/errors#insufficient_permissions",
"request_id": "req_abc123"
},
"meta": {
"timestamp": "2025-12-10T14:30:00Z"
}
} {
"success": false,
"error": {
"type": "rate_limit_error",
"code": "rate_limit_exceeded",
"message": "Rate limit exceeded. Try again in 60 seconds.",
"retryAfter": 60,
"doc_url": "https://www.cstar.help/developers/errors#rate_limit_exceeded",
"request_id": "req_abc123"
},
"meta": {
"timestamp": "2025-12-10T14:30:00Z"
}
} /api/v1/teams/{teamId}/customersCreate Customer
Try itCreate a new customer record. Email must be unique within your team.
Request Body
name string requiredFull name
email string requiredEmail address
tags string[] Array of tag strings. Each tag is stored lowercase, with spaces and underscores turned into a dash and cut to 50 characters; empty and repeated tags are dropped. 'Invoice_Paid' is stored as 'invoice-paid'.
notes string Internal notes
metadata object Arbitrary key-value metadata (max 50 keys). On update, keys are merged. Set a key to null to remove it. Values must be strings (send 5 as "5"); other types return 400 naming the key.
Code Examples
curl -X POST "https://www.cstar.help/api/v1/teams/{teamId}/customers" \
-H "Authorization: Bearer sk_live_your_key" \
-H "Content-Type: application/json" \
-d '{
"name": "Jane Smith",
"email": "jane@example.com",
"tags": ["vip", "enterprise"]
}' Responses
{
"success": true,
"data": {
"id": "cus_7c9e667974254de0944be07fc1f90ae7",
"name": "Jane Smith",
"email": "jane@example.com",
"status": "active",
"createdAt": "2025-12-10T14:30:00Z"
},
"meta": {
"requestId": "req_abc123",
"timestamp": "2025-12-10T14:30:00Z"
}
} {
"success": false,
"error": {
"type": "invalid_request_error",
"code": "parameter_missing",
"message": "The 'email' field is required",
"param": "email",
"doc_url": "https://www.cstar.help/developers/errors#parameter_missing",
"request_id": "req_abc123"
},
"meta": {
"timestamp": "2025-12-10T14:30:00Z"
}
} {
"success": false,
"error": {
"type": "invalid_request_error",
"code": "resource_conflict",
"message": "A customer with this email already exists",
"doc_url": "https://www.cstar.help/developers/errors#resource_conflict",
"request_id": "req_abc123"
},
"meta": {
"timestamp": "2025-12-10T14:30:00Z"
}
} {
"success": false,
"error": {
"type": "invalid_request_error",
"code": "idempotency_key_reused",
"message": "The Idempotency-Key was already used for a request with a different body. Generate a new key for this request.",
"doc_url": "https://www.cstar.help/developers/errors#idempotency_key_reused",
"request_id": "req_abc123"
},
"meta": {
"requestId": "req_abc123",
"timestamp": "2025-12-10T14:30:00Z"
}
} {
"success": false,
"error": {
"type": "authentication_error",
"code": "invalid_api_key",
"message": "The API key provided is invalid or has been revoked",
"doc_url": "https://www.cstar.help/developers/errors#invalid_api_key",
"request_id": "req_abc123"
},
"meta": {
"timestamp": "2025-12-10T14:30:00Z"
}
} {
"success": false,
"error": {
"type": "authentication_error",
"code": "insufficient_permissions",
"message": "Your API key does not have permission for this operation",
"doc_url": "https://www.cstar.help/developers/errors#insufficient_permissions",
"request_id": "req_abc123"
},
"meta": {
"timestamp": "2025-12-10T14:30:00Z"
}
} {
"success": false,
"error": {
"type": "rate_limit_error",
"code": "rate_limit_exceeded",
"message": "Rate limit exceeded. Try again in 60 seconds.",
"retryAfter": 60,
"doc_url": "https://www.cstar.help/developers/errors#rate_limit_exceeded",
"request_id": "req_abc123"
},
"meta": {
"timestamp": "2025-12-10T14:30:00Z"
}
} /api/v1/teams/{teamId}/customers/{customerId}Update Customer
Try itUpdate one or more fields on an existing customer.
Path Parameters
customerId string requiredThe customer ID (cus_ prefix)
Request Body
name string Full name
email string Email address
status string Account status (built-in values, or a status your team added)
sentiment string Override sentiment with one of the team's keys (GET /settings sentiments)
tags string[] Array of tag strings that replaces the current ones. Each tag is stored lowercase, with spaces and underscores turned into a dash and cut to 50 characters; empty and repeated tags are dropped. 'Invoice_Paid' is stored as 'invoice-paid'.
notes string Internal notes
metadata object Key-value metadata to merge. Existing keys preserved, new keys added. Set a key to null to remove it. Values must be strings (send 5 as "5"); other types return 400 naming the key.
Code Examples
curl -X PATCH "https://www.cstar.help/api/v1/teams/{teamId}/customers/{customerId}" \
-H "Authorization: Bearer sk_live_your_key" \
-H "Content-Type: application/json" \
-d '{ "tags": ["vip", "enterprise", "priority"] }' Responses
{
"success": true,
"data": {
"id": "cus_7c9e667974254de0944be07fc1f90ae7",
"name": "Jane Smith",
"status": "active",
"updatedAt": "2025-12-10T16:00:00Z"
},
"meta": {
"requestId": "req_abc123",
"timestamp": "2025-12-10T16:00:00Z"
}
} {
"success": false,
"error": {
"type": "not_found_error",
"code": "resource_not_found",
"message": "Customer not found",
"doc_url": "https://www.cstar.help/developers/errors#resource_not_found",
"request_id": "req_abc123"
},
"meta": {
"timestamp": "2025-12-10T14:30:00Z"
}
} {
"success": false,
"error": {
"type": "invalid_request_error",
"code": "idempotency_key_in_use",
"message": "A request with this Idempotency-Key is still being processed. Retry after it finishes.",
"doc_url": "https://www.cstar.help/developers/errors#idempotency_key_in_use",
"request_id": "req_abc123"
},
"meta": {
"requestId": "req_abc123",
"timestamp": "2025-12-10T14:30:00Z"
}
} {
"success": false,
"error": {
"type": "invalid_request_error",
"code": "idempotency_key_reused",
"message": "The Idempotency-Key was already used for a request with a different body. Generate a new key for this request.",
"doc_url": "https://www.cstar.help/developers/errors#idempotency_key_reused",
"request_id": "req_abc123"
},
"meta": {
"requestId": "req_abc123",
"timestamp": "2025-12-10T14:30:00Z"
}
} {
"success": false,
"error": {
"type": "authentication_error",
"code": "invalid_api_key",
"message": "The API key provided is invalid or has been revoked",
"doc_url": "https://www.cstar.help/developers/errors#invalid_api_key",
"request_id": "req_abc123"
},
"meta": {
"timestamp": "2025-12-10T14:30:00Z"
}
} {
"success": false,
"error": {
"type": "authentication_error",
"code": "insufficient_permissions",
"message": "Your API key does not have permission for this operation",
"doc_url": "https://www.cstar.help/developers/errors#insufficient_permissions",
"request_id": "req_abc123"
},
"meta": {
"timestamp": "2025-12-10T14:30:00Z"
}
} {
"success": false,
"error": {
"type": "rate_limit_error",
"code": "rate_limit_exceeded",
"message": "Rate limit exceeded. Try again in 60 seconds.",
"retryAfter": 60,
"doc_url": "https://www.cstar.help/developers/errors#rate_limit_exceeded",
"request_id": "req_abc123"
},
"meta": {
"timestamp": "2025-12-10T14:30:00Z"
}
} /api/v1/teams/{teamId}/customers/{customerId}Delete Customer
Try itPermanently delete a customer. Associated tickets are preserved but unlinked.
Path Parameters
customerId string requiredThe customer ID (cus_ prefix)
Code Examples
curl -X DELETE "https://www.cstar.help/api/v1/teams/{teamId}/customers/{customerId}" \
-H "Authorization: Bearer sk_live_your_key" Responses
{
"success": true,
"data": {
"deleted": true
},
"meta": {
"requestId": "req_abc123",
"timestamp": "2025-12-10T14:30:00Z"
}
} {
"success": false,
"error": {
"type": "not_found_error",
"code": "resource_not_found",
"message": "Customer not found",
"doc_url": "https://www.cstar.help/developers/errors#resource_not_found",
"request_id": "req_abc123"
},
"meta": {
"timestamp": "2025-12-10T14:30:00Z"
}
} {
"success": false,
"error": {
"type": "authentication_error",
"code": "invalid_api_key",
"message": "The API key provided is invalid or has been revoked",
"doc_url": "https://www.cstar.help/developers/errors#invalid_api_key",
"request_id": "req_abc123"
},
"meta": {
"timestamp": "2025-12-10T14:30:00Z"
}
} {
"success": false,
"error": {
"type": "authentication_error",
"code": "insufficient_permissions",
"message": "Your API key does not have permission for this operation",
"doc_url": "https://www.cstar.help/developers/errors#insufficient_permissions",
"request_id": "req_abc123"
},
"meta": {
"timestamp": "2025-12-10T14:30:00Z"
}
} {
"success": false,
"error": {
"type": "rate_limit_error",
"code": "rate_limit_exceeded",
"message": "Rate limit exceeded. Try again in 60 seconds.",
"retryAfter": 60,
"doc_url": "https://www.cstar.help/developers/errors#rate_limit_exceeded",
"request_id": "req_abc123"
},
"meta": {
"timestamp": "2025-12-10T14:30:00Z"
}
}