# All Commands Reference

The following pages will show you (almost) all of the commands that Captivate makes available to API consumers.

You can call these commands with the ServiceHandler library by using the `scheduleCommand` method on the `scheduler` object as described in the [JavaScript API Reference](/captivate-api/javascript-api-reference/using-the-servicehandler/schedulecommand-method.md), and this reference assumes you are familiar with information contained there.

You can also call these commands through the use of one of our [Advanced API](/captivate-api/advanced-api-reference.md) connection methods.

These reference will describe the commands according to the HTTP connection method but they can easily be translated back to the `scheduleCommand` method.

**Translating from this documentation back to `scheduleCommand`**

For `/api/command/` endpoints:

```javascript
await ServiceHandler.scheduler.scheduleCommand([command], [params], [variables]);
```

* `command` is the path element after `/api/command/`
* `params` is an object described by the `properties` field
* `variables` is an object with the variables to set.
* all arguments are required

For `/api/action/` endpoints:

```javascript
await ServiceHandler.scheduler.scheduleAction([action], [input], [title], [variables]);
```

* `action` is the path element after `/api/action/`
* `input` is the input name to target
* `title` is the id or the name of the title to target
* `variables` is an object with the variables to set
* all arguments are required, so to target just an input or a title, pass an empty string for the other one


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://developers.newbluefx.com/captivate-api/all-commands-reference.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
