Create Workplan
Create a new workplan draft from a prompt.
This endpoint will create a new workplan from a prompt and return the `success` status of the operation, the `workplan_id` of the new workplan, and the `status` of the operation. Once the workplan has a status of `READY`, it can be used to generate reports.
Users can choose to attach reference documents to the `args` of the request body. See the attached examples for more information. For example, creating a financial analysis workplan with a specific prompt:
```json
{
"prompt": "Show a line graph of Target Price Consensus Mean over the past year for Apple. Then show current Target Price Consensus High and Target Price Consensus Low in a table. Finally, in a new section, get all news developments for the target company, then get the articles associated with those developments. Pass the articles to the text to table tool and extract all the analysts that have given ratings and their price targets, using the columns research firm, price target, date, and buy/sell recommendation.",
}
```
For example, referencing a custom document in the prompt and providing the id of the document in the args parameter:
```json
{
"prompt": "Summarize {doc}",
"args": {
"doc": {
"id": "6fcc0ae7-809b-498c-b35b-4ced1114438b",
"type": "custom_document"
}
}
}
```
Authentication
x-api-keystring
Enter your API key here.
Request
This endpoint expects an object.
prompt
A text prompt for the creation of the workplan.
args
Reference objects like documents, portfolios, or tools to use with the prompt.
Response
Successful Response
success
True if the request to create a workplan was accepted successfully.
workplan_id
The newly assigned ID for the workplan.
status
Current status of the workplan.
Allowed values:
Errors
422
Unprocessable Entity Error
