API reference

Post templates

2 endpoints, served at https://orbitwrite.com/api/v1. Each one lists the credentials it accepts, its parameters and every response it can give.

List post templates#

GET/api/v1/post-templates

Ideas to write about, each with a draft to start from: body marks what to fill in as {{label: hint, hint}} (also parsed into fields), and a bracketed line opening with Attach or Add is a note to act on and delete. Replace every field before publishing; one left in is reported as a template_field issue on the post. Filter with category and q (title and description). Any credential is served, whatever its scopes.

Authentication

An API key or OAuth access token as a bearer token, or a signed-in session.

Query parameters

categorystring
  • "behind-the-scenes"
  • "story"
  • "lesson"
  • "how-to"
  • "opinion"
  • "question"
  • "list"
  • "promote"
qstring

At most 200 characters.

Responses

200object

The categories, in display order, and the matching templates

Response attributes
categoriesobject[]Required
Child attributes
idstringRequired
  • "behind-the-scenes"
  • "story"
  • "lesson"
  • "how-to"
  • "opinion"
  • "question"
  • "list"
  • "promote"
labelstringRequired
templatesobject[]Required
Child attributes
idstringRequired
emojistringRequired
titlestringRequired
descriptionstringRequired
categorystringRequired
  • "behind-the-scenes"
  • "story"
  • "lesson"
  • "how-to"
  • "opinion"
  • "question"
  • "list"
  • "promote"
bodystringRequired

The draft. {{label: hint, hint}} marks a field to replace; a bracketed line opening with Attach or Add is a note to act on and delete.

fieldsobject[]Required

The body's fields, in order.

Child attributes
labelstringRequired
hintsstring[]Required
401Error

Not signed in

Response attributes
errorstringRequired
issuesany[]
GET /api/v1/post-templates
curl -X GET "https://orbitwrite.com/api/v1/post-templates" \
  -H "Authorization: Bearer $ORBITWRITE_API_KEY"
Response
{
  "categories": [
    {
      "id": "behind-the-scenes",
      "label": "string"
    }
  ],
  "templates": [
    {
      "id": "string",
      "emoji": "string",
      "title": "string",
      "description": "string",
      "category": "behind-the-scenes",
      "body": "string",
      "fields": [
        {
          "label": "string",
          "hints": [
            "string"
          ]
        }
      ]
    }
  ]
}

Get one post template#

GET/api/v1/post-templates/{id}

One template by id. Same shape as an entry of GET /post-templates.

Authentication

An API key or OAuth access token as a bearer token, or a signed-in session.

Path parameters

idstringRequired

Responses

200object

The template

Response attributes
templateobjectRequired
Child attributes
idstringRequired
emojistringRequired
titlestringRequired
descriptionstringRequired
categorystringRequired
  • "behind-the-scenes"
  • "story"
  • "lesson"
  • "how-to"
  • "opinion"
  • "question"
  • "list"
  • "promote"
bodystringRequired

The draft. {{label: hint, hint}} marks a field to replace; a bracketed line opening with Attach or Add is a note to act on and delete.

fieldsobject[]Required

The body's fields, in order.

Child attributes
labelstringRequired
hintsstring[]Required
401Error

Not signed in

Response attributes
errorstringRequired
issuesany[]
404Error

The resource does not exist

Response attributes
errorstringRequired
issuesany[]
GET /api/v1/post-templates/{id}
curl -X GET "https://orbitwrite.com/api/v1/post-templates/{id}" \
  -H "Authorization: Bearer $ORBITWRITE_API_KEY"
Response
{
  "template": {
    "id": "string",
    "emoji": "string",
    "title": "string",
    "description": "string",
    "category": "behind-the-scenes",
    "body": "string",
    "fields": [
      {
        "label": "string",
        "hints": [
          "string"
        ]
      }
    ]
  }
}