WeR Core API
The WeR Behavioural Intelligence HTTP API. Content is generated for a segment and a use case, and read back as suggestion-sets.
New fields are added to responses over time, so ignore any field you do not recognise rather than rejecting the response.
Every error response has the same shape: an errors array of {code, message} objects. Under /v1, a request that fails validation returns 422, and 400 means the request body could not be parsed at all. The two /auth endpoints return 400 for validation failures as well.
Error codes worth handling: input_too_long (422) for input longer than the field allows; input_rejected (422) for input a check refused; and rate_limited (429), which carries a Retry-After header telling you when to try again. Generation that fails after it has been accepted reports its own codes on the run instead — see GET /v1/generation-runs/{generationRunId}.
Operations are retired with notice, never withdrawn without it. A deprecated operation keeps working and starts sending three response headers: Deprecation (RFC 9745), an @ followed by the number of seconds since the Unix epoch marking when it became deprecated; Sunset (RFC 8594), an HTTP-date marking when it stops working; and Link with rel="successor-version" (RFC 5829), naming the operation that replaces it. At least 180 days — six months — separate those two dates. Nothing under /v1 is deprecated today, so no operation sends these headers yet; their shapes are published under components/headers.