Skip to content
Letterhead Letterhead Letterhead Help Center
Admin Tools

Review an Analyze agent prompt

POST
/api/v3/agents/analyze/prompt-review
curl --request POST \
--url https://api.tryletterhead.com/api/v3/agents/analyze/prompt-review \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "api": true, "prompt": "Tell me which newsletter made the most revenue last month.", "scope": [ "the-daily" ] }'

Review an Analyze agent’s prompt before activation and return a structured assessment — whether it’s fully in scope, specific issues to fix, any out-of-scope asks, and a suggested rewrite.

Media type application/json
object
api
required

Required. Set to true to authenticate with an API key.

boolean
prompt
required

The prompt to review, up to 1500 characters.

string
scope

Optional list of newsletters the agent is scoped to, for context.

Array<string>
Example
{
"api": true,
"prompt": "Tell me which newsletter made the most revenue last month.",
"scope": [
"the-daily"
]
}

200 OK

Media type application/json
object
items
object
compatible
boolean
issues
Array<object>
object
concern
string
fix
string
outOfScopeFeatures
Array<string>
suggestedPrompt
string
suggestedRewrite
string
nullable
message
string
total
integer
Example
{
"items": {
"compatible": false,
"issues": [
{
"concern": "The prompt asks about revenue, which the agent can't see.",
"fix": "Ask about engagement metrics instead, like open or click rate."
}
],
"outOfScopeFeatures": [
"revenue analysis"
],
"suggestedPrompt": "Tell me which newsletter had the highest open rate last month.",
"suggestedRewrite": "Tell me which newsletter had the highest open rate last month."
},
"message": "",
"total": 1
}

Still can’t find what you need? Contact support.