Cord CLI tool

Interact with our REST API using our CLI tool


The Cord CLI tool allows you to interact with your data via our REST endpoints without having to manually authenticate each request.

Install the Cord CLI tool #

Run the command below in your terminal:

bash:
npm install -g @cord-sdk/cli
npm install -g @cord-sdk/cli
Copy

Initialize Cord #

Before you get started calling our API we need to configure the tool to authenticate each request with your application.

Run the command below in your terminal:

bash:
cord init
cord init
Copy

This will prompt you first for your application ID and secret. You can retrieve them from the console under the desired application entry.

The customer ID and secret are only needed if you want to run application management commands. i.e., create, update or delete an application. These values can be found in the console under View application management credentials.

You can update these values any time by re-running the init command.

Try it out! #

You're ready to go!

bash:
# see what commands there are:
cord --help
# try one out:
cord user ls
              
# see what commands there are:
cord --help
# try one out:
cord user ls
              
Copy

Where to find help? #

To check out how to format the commands and what options are available you can run --help at any level of a command. This will show you what commands and options are available, and what data is needed to make the request.

If you prefer to use cURL syntax but would like to benefit from our automatic authentication, then you can use cord curl application -- <request> for application management commands, and cord curl -- <request> for all others.

For more detailed documentation on the requests the command makes and the options it takes you can refer to the REST API docs where you'll also be able to see examples of how to call the commands.

Ask Cordy