installs_propose
POST
/appdoc
const url = 'https://api.canopyhq.dev/appdoc';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"appdoc":1,"description":"example","name":"example","tools":[{"description":"example","input_schema":"example","name":"example","output_schema":"example","result_limit":"example","timeout":"example"}]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.canopyhq.dev/appdoc \ --header 'Content-Type: application/json' \ --data '{ "appdoc": 1, "description": "example", "name": "example", "tools": [ { "description": "example", "input_schema": "example", "name": "example", "output_schema": "example", "result_limit": "example", "timeout": "example" } ] }'Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
A proposed document with bounds checked before it is stored.
object
appdoc
required
The vendor document version, read through the same shape chain as storage.
integer format: int32
description
required
string
name
required
string
Examplegenerated
{ "appdoc": 1, "description": "example", "name": "example", "tools": [ { "description": "example", "input_schema": "example", "name": "example", "output_schema": "example", "result_limit": "example", "timeout": "example" } ]}Responses
Section titled “Responses”The proposal, and the console page to send the human to.
Media typeapplication/json
What a vendor gets back: the proposal plus where to send the human.
object
expires
required
integer format: int64
interval
required
integer format: int64
poll_secret
required
What the vendor polls with. Issued once with the proposal; stored hashed.
string
request
required
One proposal. Minted per POST, so two proposals of one document are two requests, each with its own secret and its own key.
string
vendor
required
The vendor config’s content hash: 64 hex chars.
string
consent_url
required
string
Examplegenerated
{ "expires": 1, "interval": 1, "poll_secret": "example", "request": "example", "vendor": "example", "consent_url": "example"}The response body names the invalid field and reason in the proposed vendor config.