Vary the texts with AI
Writes an AI variation of the text for the pending items (all, or item_ids) into their
rephrased_text, following the workspace's prompt (/broadcasts/rephrase-prompt). It runs in
the background; read the items to see the results. Counts against the limit of 10 pieces of
queued messenger work a minute per key.
An administrator may do this to any broadcast; anyone else only when the items it touches go
out from numbers they work in (403 forbidden otherwise).
Authorization
personalToken Your personal access token from Profile → Access Token in Lalexi. It acts with exactly your role: what you may see and do in the workspace, and nothing more. Everything done with it is recorded as done by you.
In: header
Path Parameters
The broadcast's id.
Header Parameters
The workspace to work in (an id from GET /me). Optional when you belong to a single
workspace; required otherwise (400 workspace_required).
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://app.lalexi.com/v1/broadcasts/0/rephrase" \ -H "X-Workspace-Id: 7" \ -H "Content-Type: application/json" \ -d '{}'{
"queued": 0
}{
"error": {
"code": "workspace_required",
"message": "You belong to several workspaces: pass the X-Workspace-Id header."
}
}{
"error": {
"code": "invalid_api_key",
"message": "The API key is missing or invalid."
}
}{
"error": {
"code": "forbidden",
"message": "You are not allowed to do this."
}
}{
"error": {
"code": "not_found",
"message": "Resource not found."
}
}{
"error": {
"code": "rate_limited",
"message": "Too many requests. Retry after the number of seconds in Retry-After."
}
}{
"error": {
"code": "internal_error",
"message": "Something went wrong on our side."
}
}{
"error": {
"code": "upstream_unavailable",
"message": "The messaging service is unavailable. Nothing was sent; try again."
}
}