POST
/v1/chat

Asks Paragraph to do anything it does in the app's chat, such as making a cover for a post or changing the brand, and returns its reply. Leave out sessionId to start a new chat, or send one to continue it. The request waits up to about 45 seconds. If Paragraph is still working then, status is working: check back with GET /v1/chat/{sessionId}. The chat also appears in the app. Chat can't publish, schedule, or send, and automations it sets up stay off: approve those in the app or with the /v1/content publish and /v1/schedule endpoints.

Authorization

apiKey
headerAuthorizationBearer <token>

API key for authenticating protected endpoints. Pass as Bearer token in Authorization header.

Request Body

Body

application/json
  1. body
message*string

What to ask, as you would in the app's chat

Length1 <= length <= 20000
sessionId?string

Continue this chat. Leave out to start a new one

Length1 <= length <= 128
postId?string

A post of this publication the chat is about, as when chatting beside it in the editor. A chat keeps the first post it's given

Length1 <= length <= 128

Response Body

Paragraph's reply

application/json
  1. response
sessionId*string

The chat. Send it with the next message to continue it

status*string

working while Paragraph is still answering: check again with GET /v1/chat/{sessionId}. failed when the turn stopped before finishing: send the message again

Value in"working""done""failed"
reply*|

Paragraph's reply to the latest message, so far

files*array<>

Files the reply comes with, such as generated images

url*string

Opens this chat in the Paragraph app

curl -X POST "https://example.com/v1/chat" \  -H "Content-Type: application/json" \  -d '{    "message": "string"  }'
{  "sessionId": "string",  "status": "working",  "reply": "string",  "files": [    {      "filename": "string",      "mime": "string",      "url": "string",      "label": "string"    }  ],  "url": "string"}