Posttar API

Autopilot

9 endpoints for autopilot, with parameters and a real response example.

GET/projects/{id}/autopilot

Get the autopilot grid

Returns the autopilot's weekly grid: whether it is on, which days and hours are set, each slot's fixed theme, and the project's timezone, plus any blockers that would prevent publication even while on.

ParameterInTypeDescription
idrequiredpathstringmax 200 charsOpaque id from a previous response. Do not build one: an id that is not a valid identifier is refused with invalid_input, and one that belongs to another workspace with not_found.

Response

{
  "projectId": "c85848ba-2881-4a2e-9bdd-841b26d07359",
  "enabled": false,
  "emailReport": true,
  "requiresApproval": false,
  "timezone": "America/Porto_Velho",
  "slots": [
    {
      "id": "559f79e2-4abd-41dc-8796-6967c790403d",
      "dayOfWeek": 1,
      "dayName": "tuesday",
      "hour": 9,
      "theme": "uma dica pratica, sem jargao",
      "pillarId": "3f0a1c62-58b1-4e9e-9f4e-2a1d7b0c9e41",
      "format": "carousel",
      "structure": null,

POST/projects/{id}/autopilot/enable

Turn on autopilot

Turns on the autopilot: Posttar starts generating and scheduling posts on its own at the grid's slots. Rejected when the grid is empty.

ParameterInTypeDescription
idrequiredpathstringmax 200 charsOpaque id from a previous response. Do not build one: an id that is not a valid identifier is refused with invalid_input, and one that belongs to another workspace with not_found.

Response

{
  "projectId": "c85848ba-2881-4a2e-9bdd-841b26d07359",
  "enabled": true,
  "unchanged": false,
  "totalSlots": 1,
  "blockers": [
    "no_instagram"
  ]
}

POST/projects/{id}/autopilot/disable

Turn off autopilot

Turns off the autopilot. No slot is deleted: the grid is kept and comes back in full when turned on again.

ParameterInTypeDescription
idrequiredpathstringmax 200 charsOpaque id from a previous response. Do not build one: an id that is not a valid identifier is refused with invalid_input, and one that belongs to another workspace with not_found.

Response

{
  "projectId": "c85848ba-2881-4a2e-9bdd-841b26d07359",
  "enabled": false,
  "unchanged": false,
  "totalSlots": 1,
  "blockers": [
    "no_instagram"
  ]
}

POST/projects/{id}/autopilot/slots

Add an autopilot slot

Adds one more day and hour to the autopilot's grid, optionally with a fixed theme. Does not turn the autopilot on by itself.

ParameterInTypeDescription
idrequiredpathstringmax 200 charsOpaque id from a previous response. Do not build one: an id that is not a valid identifier is refused with invalid_input, and one that belongs to another workspace with not_found.
dayOfWeekrequiredbodyinteger0 to 60 is Monday, 6 is Sunday.
hourrequiredbodyinteger0 to 23Whole hour, in the project's timezone.
themebodystringmax 1000 charsFixed topic for this slot, up to 1000 characters. Without it, the autopilot picks the topic.

Response

{
  "slotId": "7dc99c6e-6971-4596-9b0c-91d8ce94b335",
  "dayOfWeek": 2,
  "dayName": "wednesday",
  "hour": 15,
  "theme": "uma dica pratica, sem jargao",
  "totalSlots": 1,
  "alreadyAtThisHour": 0,
  "autopilotOff": true
}

PATCH/projects/{id}/autopilot/slots/{slotId}

Update a slot's theme

Changes a slot's fixed theme. A blank value erases it, and the autopilot goes back to choosing the topic on its own for that slot.

ParameterInTypeDescription
idrequiredpathstringmax 200 charsOpaque id from a previous response. Do not build one: an id that is not a valid identifier is refused with invalid_input, and one that belongs to another workspace with not_found.
slotIdrequiredpathstringmax 200 charsOpaque id from a previous response. Do not build one: an id that is not a valid identifier is refused with invalid_input, and one that belongs to another workspace with not_found.
themerequiredbodystringmax 1000 charsThe slot's fixed topic, up to 1000 characters. Blank erases it: the autopilot goes back to choosing.

Response

{
  "slotId": "7dc99c6e-6971-4596-9b0c-91d8ce94b335",
  "dayOfWeek": 2,
  "dayName": "wednesday",
  "hour": 15,
  "theme": "outro tema",
  "cleared": false,
  "unchanged": false
}

DELETE/projects/{id}/autopilot/slots/{slotId}

Delete an autopilot slot

Removes a slot from the autopilot's grid. Does not turn the autopilot off and does not touch other slots.

ParameterInTypeDescription
idrequiredpathstringmax 200 charsOpaque id from a previous response. Do not build one: an id that is not a valid identifier is refused with invalid_input, and one that belongs to another workspace with not_found.
slotIdrequiredpathstringmax 200 charsOpaque id from a previous response. Do not build one: an id that is not a valid identifier is refused with invalid_input, and one that belongs to another workspace with not_found.

Response

{
  "slotId": "7dc99c6e-6971-4596-9b0c-91d8ce94b335",
  "dayOfWeek": 2,
  "dayName": "wednesday",
  "hour": 15,
  "totalSlots": 0,
  "gridEmpty": false
}

PATCH/projects/{id}/autopilot/slots/{slotId}/fixed

Set what a slot fixes

Sets what this slot always produces: a content pillar, a format, a structure, a source of ideas, or any combination of them. What the slot does not fix, the autopilot chooses, within what the account allows. A field left out is untouched; a field sent as null releases it back to the autopilot's choice.

ParameterInTypeDescription
idrequiredpathstringmax 200 charsOpaque id from a previous response. Do not build one: an id that is not a valid identifier is refused with invalid_input, and one that belongs to another workspace with not_found.
slotIdrequiredpathstringmax 200 charsOpaque id from a previous response. Do not build one: an id that is not a valid identifier is refused with invalid_input, and one that belongs to another workspace with not_found.
dayOfWeekbodyinteger0 to 6Moves the slot to another day. 0 is Monday, 6 is Sunday.
hourbodyinteger0 to 23Moves the slot to another whole hour, in the project's timezone.
themebodystring | nullThe slot's fixed topic, up to 1000 characters. Null clears it.
pillarIdbodystring | nullThe content pillar this slot is about. Null lets the autopilot pick one.
formatbody"carousel" | "caption_reel" | "animated_audio" | "narrated_photos" | "premium_carousel" | "infographic" | "twitter_carousel" | "twitter_repost" | "react_video" | "video_clip" | "motion" | nullThe format this slot always produces. Null lets the autopilot pick, within what the account allows.
structurebody"list" | "myth" | "explanation" | "thesis" | "story" | "objection" | nullHow the piece is built. Null lets the autopilot pick.
sourcebody"fresh" | "radar" | "news" | nullWhere the idea comes from. Null lets the autopilot pick.

Response

{
  "id": "559f79e2-4abd-41dc-8796-6967c790403d",
  "dayOfWeek": 4,
  "dayName": "friday",
  "hour": 18,
  "theme": null,
  "pillarId": "3f0a1c62-58b1-4e9e-9f4e-2a1d7b0c9e41",
  "format": "infographic",
  "structure": null,
  "source": null
}

PATCH/projects/{id}/autopilot/allowed

Set what the autopilot may choose

Sets the formats, structures and sources the autopilot may pick from when a slot does not fix them. An empty list is refused: with nothing allowed the autopilot has nothing to produce. Formats the account cannot reach are refused too. Returns the whole grid, so the caller sees what ended up in force.

ParameterInTypeDescription
idrequiredpathstringmax 200 charsOpaque id from a previous response. Do not build one: an id that is not a valid identifier is refused with invalid_input, and one that belongs to another workspace with not_found.
formatsbody("carousel" | "caption_reel" | "animated_audio" | "narrated_photos" | "premium_carousel" | "infographic" | "twitter_carousel" | "twitter_repost" | "react_video" | "video_clip" | "motion")[]The formats the autopilot may choose from. Formats the account cannot reach are rejected.
structuresbody("list" | "myth" | "explanation" | "thesis" | "story" | "objection")[]The structures the autopilot may choose from.
sourcesbody("fresh" | "radar" | "news")[]Where the autopilot may take ideas from.

Response

{
  "projectId": "c85848ba-2881-4a2e-9bdd-841b26d07359",
  "enabled": false,
  "emailReport": true,
  "requiresApproval": false,
  "timezone": "America/Porto_Velho",
  "slots": [
    {
      "id": "559f79e2-4abd-41dc-8796-6967c790403d",
      "dayOfWeek": 1,
      "dayName": "tuesday",
      "hour": 9,
      "theme": "uma dica pratica, sem jargao",
      "pillarId": "3f0a1c62-58b1-4e9e-9f4e-2a1d7b0c9e41",
      "format": "carousel",
      "structure": null,

PATCH/projects/{id}/autopilot/preferences

Set the autopilot's preferences

Whether every piece waits for approval as a draft instead of going out on its own, and whether the weekly email report is sent. Returns the whole grid.

ParameterInTypeDescription
idrequiredpathstringmax 200 charsOpaque id from a previous response. Do not build one: an id that is not a valid identifier is refused with invalid_input, and one that belongs to another workspace with not_found.
requireApprovalbodybooleanWith true, every piece the autopilot writes waits as a draft instead of going out on its own.
reportEnabledbodybooleanThe weekly email report on how the profile did.
showLegacyFormatsbodybooleanShows the legacy formats (legacyFormats) in availableFormats, so they can be allowed. Only accounts with the new formats have legacy ones. An empty or unset allowed list never includes them.

Response

{
  "projectId": "c85848ba-2881-4a2e-9bdd-841b26d07359",
  "enabled": false,
  "emailReport": true,
  "requiresApproval": true,
  "timezone": "America/Porto_Velho",
  "slots": [
    {
      "id": "559f79e2-4abd-41dc-8796-6967c790403d",
      "dayOfWeek": 1,
      "dayName": "tuesday",
      "hour": 9,
      "theme": "uma dica pratica, sem jargao",
      "pillarId": "3f0a1c62-58b1-4e9e-9f4e-2a1d7b0c9e41",
      "format": "carousel",
      "structure": null,