Skip to content
Letterhead Letterhead Letterhead Help Center
Admin Tools

Create an agent

POST
/api/v3/agents
curl --request POST \
--url https://api.tryletterhead.com/api/v3/agents \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "api": true, "type": 0, "name": "example", "guidelines": "example", "channels": [ "example" ], "runMode": 0, "frequency": {} }'

Create a new agent for the company.

Media type application/json
object
api

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

boolean
type

Required. 0 for a Preflight agent, 2 for an Analyze agent. Analyze agents return a 403 when your company does not have Analyze agents turned on.

integer
Allowed values: 0 2
Example
0
name

Up to 255 characters.

string
guidelines

Instructions for the agent, up to 1,500 characters.

string
channels
Array<string>
runMode

0 manual, 1 automatic, 2 on a schedule. Preflight agents can use 0 or 1. Analyze agents need 2 before they can be activated.

integer
Allowed values: 0 1 2
frequency

Not allowed for Preflight agents. Analyze agents need one before they can be activated. mode (0 or 1), daysOfWeek (values 0 to 6), dayOfMonth (1 to 28), time as H:i, and emailNotifications (up to 5).

object

201 Created

Media type application/json
object
items
object
uniqueId
string
name
string
type
integer
guidelines
string
status
integer
runMode

How the agent runs: 0 manual, 1 automatic, 2 on a schedule.

integer
Allowed values: 0 1 2
frequency

The run schedule, or null when the agent has none. Includes mode, time, emailNotifications, and either daysOfWeek or dayOfMonth.

object
validationCode

Validation status code for the agent. Defaults to 200.

integer
lastRunAt
string
nullable
channels
Array<string>
createdAt
string
updatedAt
string
message
string
total
integer
Example
{
"items": {
"uniqueId": "mofuehvagv",
"name": "House style checker",
"type": 0,
"guidelines": "> Check the draft against our house style guide.\n> - Use the serial comma.\n> - Spell out numbers under 10; use numerals for 10 and above.\n> - Em dashes take no surrounding spaces.\n>\n> Flag every violation with the specific line it appears on.",
"status": 0,
"runMode": 0,
"frequency": null,
"validationCode": 200,
"lastRunAt": null,
"channels": [
"the-daily"
],
"createdAt": "2026-04-11T10:05:33+00:00",
"updatedAt": "2026-04-11T10:05:33+00:00"
},
"message": "",
"total": 10
}

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