Skip to content

Studio Management API

The Studio Management API is a GraphQL API which allows one to programmatically query studio metadata and perform certain actions.

GraphQL is mostly a self-documenting API format. To interactively explore the API, visit the API's Graphiql endpoint: https://studio.botsqd.com/graphiql.

Authorization

All API operations are done on the environment level. When accessing the API, an OAuth Bearer token is required. The API token for the current environment can be found in the Botsquad studio on the AdminEnvironment page, in the API access section.

Send a request header like the following to authenticate:

Authorization: Bearer ff8d485c-e64b-4343-a278-98a6c7baf6ec.686a8d908dde4c

Where the part after Bearer is the API token for the given environment.

Example GraphQL request

With the curl commandline utility, executing a GraphQL request can be done like this:

curl -X POST \
  -H 'Content-type: application/json' \
  -H 'Authorization: Bearer 308d485c-e64b-4343-a278-98a6c7baf6ec.686a8d908dde4c348a98e206eeadddb6' \
  https://studio.botsqd.com/graphql \
  --data-binary '{"query": "query { organisation { id title } }"}'