# Execute a bot

Canonical page: https://docs.ovok.com/api/bots---execute-a-custom-script/execute-a-bot

`POST /bots`

Runs a Medplum Bot of your project, found by its identifier, and returns its output. Use it to call custom server-side logic without knowing the Bot's id.

**Auth:** bearer token. The Bot is searched and run with your token, so you need read access to the Bot and permission to execute it.

## Behaviour

- `identifier` uses FHIR token search syntax: `system|value`, `system|`, or just `value`. Exactly one Bot must match.
- The JSON request body is passed to the Bot as its input, unchanged. The body is optional.
- The response is whatever the Bot returns.

## Example

```bash
curl -X POST 'https://api.sandbox.ovok.com/bots?identifier=https://example.com|get-users' \
  -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3NjcyNjg4MDAsImV4cCI6MTc2NzI3MjQwMH0.Ql3B_ztDvctlyZ2z0vp4sl3ExXRQGkzmxdmTAqxNzZk' \
  -H 'Content-Type: application/json' \
  -d '{ "parameter1": "value1" }'
```
