Skip to main content
GET
/
api
/
v1
/
products
/
{product_id}
/
usage
/
prompts
Get prompt usage
curl --request GET \
  --url https://api.clarityq.ai/api/v1/products/{product_id}/usage/prompts \
  --header 'X-API-Key: <api-key>'
[
  {
    "product_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "product_name": "<string>",
    "user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "user_email": "<string>",
    "date": "2023-12-25",
    "prompt_count": 123
  }
]
Coming soon. This endpoint is in active development and not yet available in production. The contract below is provisional and may change before release. Reach out to support@clarityq.ai if you’d like early access.
Returns prompt usage for the organization that owns the given product, broken down by product, user and UTC calendar day. Your API key authorizes its own product, but the response covers every product in that organization, so a single key gives org-wide visibility. Requires prompt usage tracking to be enabled for your organization.

Authorizations

X-API-Key
string
header
required

API key obtained from the ClarityQ dashboard.

Path Parameters

product_id
string<uuid>
required

Query Parameters

start_date
string<date>
required

First UTC calendar day to include (YYYY-MM-DD).

end_date
string<date>
required

Last UTC calendar day to include, inclusive (YYYY-MM-DD).

product_ids
string<uuid>[] | null

Restrict to these products in the org (repeatable). Defaults to all products.

search
string | null

Filter to users whose email or full name contains this text.

origin
enum<string> | null

Restrict to a single prompt origin (APP, SLACK, API_KEY). Defaults to all origins. Channel a prompt was sent through, used to filter the usage export.

Available options:
APP,
SLACK,
API_KEY

Response

Successful Response

product_id
string<uuid>
required

ID of the product the prompts were sent to

product_name
string
required

Display name of the product

user_id
string<uuid>
required

ID of the user who sent the prompts

user_email
string
required

Email of the user who sent the prompts

date
string<date>
required

Calendar day (UTC) the prompts were sent on, as YYYY-MM-DD

prompt_count
integer
required

Number of prompts sent by the user on that day, across all origins