Development Guides
API Guides

ROQ API Overview

Introduction

All of ROQ's functionality is provided by ROQ Platform, a headless API-driven system that ROQ operates. ROQ Platform uses GraphQL as the primary approach for representing APIs. GraphQL is simple to use and easy to learn. We recommend starting your journey at the official GraphQL documentation: Introduction to GraphQL (opens in a new tab). The following picture shows a bird's eye view of the API.

Hello

Available APIs

You can find a generated GraphQL reference with all queries, mutations and types here: ROQ Platform API (opens in a new tab). This documentation focuses on the most relevant functionalities:

Using the GraphQL Sandbox

You can run GraphQL queries yourself using the sandbox. See instructions here.

Using the SDK

ROQ provides an SDK for Node.js applications, simplifying the API's usage but still allowing you to use GraphQL queries and mutations if needed. Please start with the SDK documentation.

GraphQL basics

In case you want to use GraphQL directly, we recommend to make yourself familiar with the basics of using queries and mutations:

URL and credentials of ROQ Platform

ROQ operates multiple instances of ROQ Platform. You can find the URL of your instance when you log in to ROQ Console (opens in a new tab). There you also find the other credentials like apiKey and environmentId which you need to pass to the ROQProvider wrapper in your client-side application.

Client- and server-side APIs

Some GraphQL mutations aren't available on the client side of your application and can only be used from the server side. That's because users could manipulate parameters and perform undesirable behavior. For this reason ROQ Platform exposes two endpoints:

  • {URL}/v01/graphql - API for the client-side of your application. Interactions require a user token.
  • {URL}/v01/server/graphql - API for the server-side of your application. Interactions require a user token and the apiKey.
⚠️

Don't share the apiKey with anyone and don't use it on the client-side on your application. It's also recommended to provide it via environment variables and don't place it into your repository.