Skip to contentSkip to navigation

Test Label Prediction Beta

Run the reply categorizer on pasted text.

POST /api/v1/lead-labels/test

Requires an API key with the write scope.

Runs the same reply categorizer that sorts incoming replies and returns what it would say about the text you send. Nothing is stored and no lead is touched.

The category is one of the built-in reply categories (interested, not_interested, out_of_office, bounce, unsubscribe, uncategorized). It is not one of your workspace's lead labels.

Costs 1 AI credit once the categorizer has answered. A call that fails upstream charges nothing. A workspace out of AI credits gets 403 with code ai_credits_exhausted. Only the first 4,000 characters of body are judged.

Request Body

body string body required
The reply text. 1 to 20,000 characters.
subject string body
The reply subject. Up to 500 characters.
fromEmail string body
The sender address. Up to 320 characters.

Errors

StatusDescription
401Missing, invalid, revoked or expired API key
403API key does not have the required scope write, or the plan has no AI credits left (ai_credits_exhausted)
422Missing or oversized body, subject or fromEmail
502 / 503The categorizer failed or is unavailable. Nothing was charged

Rate Limit

  • 100 requests per minute, shared by every expensive call in your workspace. Fixed 60-second window.
  • Every response includes X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset (unix epoch seconds) and X-RateLimit-Bucket (expensive).
  • A 429 response includes a Retry-After header (seconds until the bucket resets).

For client-side patterns, see Rate Limiting.

Was this page helpful?