Run preflight agents on a letter
POST
/api/v3/letters/{letterUuid}/agents/actions/run-preflight
const url = 'https://api.tryletterhead.com/api/v3/letters/example/agents/actions/run-preflight';const form = new FormData();form.append('api', 'true');
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
options.body = form;
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.tryletterhead.com/api/v3/letters/example/agents/actions/run-preflight \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: multipart/form-data' \ --form api=trueProvided you have any preflight agents, this endpoint allows you to trigger them. The newsletter must be in a preflight status - that is, scheduling - for the agents to actually run.
v3 endpoints expect a company API key.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ” letterUuid
required
string
The letter’s unique identifier — an alphanumeric string around ten characters, e.g. ludctamgd6.
Request Body required
Section titled “Request Body required ” Media type multipart/form-data
object
api
required
When set to true, this endpoint will accept authorization with your API Key.
string
Example
trueResponses
Section titled “ Responses ”Trigger Preflight Agents
Media type application/json
object
items
object
uniqueId
string
agentUniqueId
string
resourceType
integer
resourceUniqueId
string
status
integer
summary
string
validationCode
integer
dispatchedAt
string
startedAt
string
completedAt
string
judgments
Array<object>
object
createdAt
string
updatedAt
string
message
string
total
integer
Example
{ "items": { "uniqueId": "vq5rnof1op", "agentUniqueId": "8vbkbo1yqz", "resourceType": 0, "resourceUniqueId": "35f725edbi", "status": 0, "summary": null, "validationCode": 200, "dispatchedAt": null, "startedAt": null, "completedAt": null, "judgments": [], "createdAt": "2026-03-26 15:02:52", "updatedAt": "2026-03-26 15:02:52" }, "message": "", "total": 10}Still can’t find what you need? Contact support.