AI instructions
GET /api/v1/instructions
The user's saved AI instructions, as Settings → AI instructions and each account's page hold them: writer and assistant ({text, enabled}) and per account its own instructions, use_writing_profile, writing_profile_ready, bio, writing_profile and posting_language. Free.
- Scope
postory:read - Limit class
READ - Success
200
Example
curl https://postory.io/api/v1/instructions \
-H "Authorization: Bearer $POSTORY_API_KEY"{"changed": ["<changed>"], "settings_url": "<settings_url>"}Other responses
401No API key, or an invalid or revoked one
403The key lacks the scope, or access is paused
422A request parameter is not valid
429Rate limit spent; see Retry-After
PATCH /api/v1/instructions
Change the AI instructions; only what is sent changes. Every check runs first: a refused request changes nothing, and a value already so is a success. Answers the settings, with changed.
- Scope
postory:drafts - Limit class
WRITE - Success
200
Request body
| Field | Type | Description |
|---|---|---|
account_instructions | string | That account's own writer instructions. REPLACES that whole text ( |
assistant | string | How Postory's chat answers. REPLACES that whole text ( |
assistant_enabled | boolean | Whether the assistant instructions apply. |
bio | string | That account's About you, private context for drafts (up to 2,000 characters): the user's own; |
connection_id | string | The account the account fields below change ( |
posting_language | string | The language that account's new posts are written in ( |
use_writing_profile | boolean | Fit that account's drafts to its writing profile (its page's switch). On needs a plan with it ( |
writer | string | How Postory writes posts. REPLACES that whole text ( |
writer_enabled | boolean | Whether the writer instructions apply. |
writing_profile | string | That account's writing profile text (up to 4,000 characters): the user's own; |
Example
curl -X PATCH https://postory.io/api/v1/instructions \
-H "Authorization: Bearer $POSTORY_API_KEY" \
-H "Content-Type: application/json" \
-d '{"account_instructions": "<account_instructions>"}'{"changed": ["<changed>"], "settings_url": "<settings_url>"}Other responses
401No API key, or an invalid or revoked one
403The key lacks the scope, or access is paused
404Not found, or not this user's
409The state does not allow it now (already scheduled, changed, needs a choice…); branch on
code422A request parameter is not valid, or an account's network does not take what the post asks:
capability_unsupported(network,capability,capability_state,connection_id), e.g. a first comment on a post only for LinkedIn. A shared first comment on a post for several networks is fine: only the accounts whose network takes one send it429Rate limit spent; see Retry-After