Skip to main content
POST
Publish a text story as the pilot

Authorizations

Authorization
string
header
required

OAuth 2.0 client credentials. Request a token from the token endpoint of the identity provider's domain (https://{cognito-domain}/oauth2/token, with HTTP Basic client authentication) and send it as a Bearer token. Production uses auth.mypilotindex.com. The sandbox uses the dev environment's Cognito domain, which is given to the partner with its sandbox credential. A token carries only the scopes the partner was approved for.

Path Parameters

grant_id
string<uuid>
required

Body

application/json

Maximum 4096 bytes. Exactly client_ref, subject and caption, and for a flight origin and destination; unknown or repeated members are rejected.

client_ref
string
required

The partner's own name for this create, unique per partner and kind of publication. Send the same ref to retry.

Required string length: 1 - 64
Pattern: ^[A-Za-z0-9._:-]{1,64}$
subject
enum<string>
required
Available options:
standard,
flight
caption
string
required

The story's text, up to 200 UTF-16 units after surrounding whitespace is trimmed. No control characters but line breaks and tabs, and no @handle or @all.

Required string length: 1 - 200
origin
string

Required on a flight and refused on a standard story. An airport code of 3 or 4 letters and digits.

destination
string

Required on a flight and refused on a standard story. A code other than the origin.

Response

A retry of a create already made; nothing was published.

story_id
string<uuid>
required

The story; a removal names it.

replayed
boolean
required

True when this client_ref had already made the story and nothing was published.