Skip to main content

Deploy a Bot

Deploy source code to a Bot resource. Deployment is an administrative action; use a Bot configured for a supported runtime and ensure the code is reviewed before publishing it.

MethodPath
POST/fhir/R4/Bot/:id/$deploy

Request​

The request body is JSON containing the Bot source and optional filename.

curl --request POST \
--url "https://api.sandbox.ovok.com/fhir/R4/Bot/${BOT_ID}/\$deploy" \
--header "Authorization: Bearer ${OVOK_TOKEN}" \
--header 'Content-Type: application/json' \
--data '{"filename":"index.js","code":"export async function handler() { return { ok: true }; }"}'
Body fieldTypeDescription
codestringSource code to deploy. It may be omitted when the Bot already contains code.
filenamestringSource filename; defaults to index.js.

Response​

HTTP statusMeaning
200 OKDeployment completed. The response may include deployment or runtime information.
Error responseInvalid Bot configuration, unsupported runtime, or deployment failure; inspect the returned OperationOutcome or error details.

Only users with the required Bot administration permissions should deploy code.