Get or seed instructions
Fetches the active instructions, creating them first when none exist. Call this at the start of an automation run.
This is a read call: the response body carries the instructions text, not the request. It is a POST rather than a GET only so default can be sent in the body (starter prompts are far too long for a query string).
If the doc is missing and default is provided, that default becomes version 1 (source: seed) and is returned, so a shipped template works with zero setup. If it is missing and no default was sent, you get a 404.
When the doc already exists, default is ignored and the stored text always wins - editing a prompt in the dashboard is never overwritten by the automation. To change the stored text, use POST /api/instructions/versions instead.
https://www.tracira.com/api/instructionsAuthorization
webhookToken Workspace webhook token from Settings -> Integrations.
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/api/instructions" \ -H "Content-Type: application/json" \ -d '{ "project": "Customer Support", "task": "Email reply", "default": "You write friendly, concise replies to customer emails. Never promise a refund date you cannot keep." }'{ "projectName": "string", "taskName": "string", "content": "string", "version": 0, "updatedAt": "2019-08-24T14:15:22Z", "hasPendingSuggestion": true}