Customers
Track per-customer usage and costs by associating requests with your end-customers. This is useful when you're building on top of PromptShuttle and want to attribute costs to your own users.
How it works
Pass a customer identifier with each request
PromptShuttle auto-creates a customer record on first use
View per-customer usage and cost breakdowns
Identifying customers on requests
Pass the customer ID on any request via header or body field:
Via header (all endpoints)
curl -X POST https://app.promptshuttle.com/api/v1/chat/completions \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "X-Shuttle-Customer-Id: customer_123" \
-H "Content-Type: application/json" \
-d '{ ... }'Via request body (flow execution)
{
"parameters": { "..." },
"customerId": "customer_123"
}The header takes precedence over the body field. The user field on the OpenAI endpoint also works as a fallback.
Managing customers
Create a customer
externalId must be unique within your tenant. This is the ID you pass in X-Shuttle-Customer-Id.
List customers
Get a customer
Update a customer
Only provided (non-null) fields are updated.
Delete a customer
Deactivate a customer
Set isActive: false to exclude a customer from usage reports without deleting them:
Usage tracking
Per-customer usage
Returns credits used, request count, and cost for the specified period (default 30 days).
All customers usage
Returns usage summary grouped by all customers — useful for billing dashboards.
Filtering logs by customer
The invocation log supports filtering by customer:
This shows all requests attributed to that customer.
Last updated