Publish a text story as the pilot
Publishes a text story by the pilot of a grant that holds stories.write, with the subject standard, or flight with an origin and a destination, two different airport codes of 3 or 4 letters and digits. Any other subject, a flight without both airports, or either airport on a standard story is 400 invalid_request. A story lives 48 hours. 201 for a new story; 200 with replayed true for a retry of the same client_ref and body, which publishes nothing. A pilot holds at most five active stories, whoever published them: a sixth is 409 story_cap, and its client_ref stays free. See the Publishing tag for the client_ref, mentions, the allowance of 5 stories per grant per rolling 24 hours and removals. A grant that is revoked, unknown or another partner’s answers 404 not_found; a grant, or a token, without stories.write is 403 scope_missing.
Authorizations
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
Body
Maximum 4096 bytes. Exactly client_ref, subject and caption, and for a flight origin and destination; unknown or repeated members are rejected.
The partner's own name for this create, unique per partner and kind of publication. Send the same ref to retry.
1 - 64^[A-Za-z0-9._:-]{1,64}$standard, flight 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.
1 - 200Required on a flight and refused on a standard story. An airport code of 3 or 4 letters and digits.
Required on a flight and refused on a standard story. A code other than the origin.

