Skip to main content

API Usage

ChannelApe provides a wide range of APIs that allow for platform extension and integration with other systems and platforms.

Available APIs

We have a V1 and V2 API which behave slightly different. Please read below for details.

REST API V1

Our initial API which is being deprecated by our REST API V2 and GraphQL API. There are a few endpoints that only exist on the V1 REST API awaiting migration to the new API. You can find the API Reference here.

REST API V1 Authentication

The API works with a valid API Account Private Key or JWT passed as a header. Either option is valid to interface with the API.

API Account Private Key Header

⚠️ Deprecation Warning: Use the new way of creating API accounts. See below.

A valid API Account Private Key associated with the businesses you are acting on. Pass this value to the X-Channel-Ape-Authorization-Token header with every request.

To generate a new API Account Private Key login to the ChannelApe App and create an API Account for your business from the Business Settings page.

curl 'https://api.channelape.com/v1/orders/1b11843b-98d9-49c5-bc72-ea63b4118a40' \
-H "X-Channel-Ape-Authorization-Token: YOUR_KEY" \
JWT Header

A valid JWT associated with your username. Pass this value to the X-Channel-Ape-Jwt header with every request.

curl 'https://api.channelape.com/v1/orders/1b11843b-98d9-49c5-bc72-ea63b4118a40' \
-H "X-Channel-Ape-Jwt: YOUR_KEY" \

REST API V2 and GraphQL API

Our latest APIs which are accessible via REST or GraphQL. We are actively working on adding support for all endpoints within REST API V1. You can find the API reference for the REST API V2 here. and the API reference for the GraphQL API here.

REST API V2 and GraphQL API Authentication

The API works through a mixture of JWT and Key auth.

If no Authorization header is included, the API will assume that you are making a request with an anonymous user.

If an Authorization header is included, the API will "switch" to the role of the user making the request. See the User Management section for more details.

  • ANON_KEY - The public API key shared by all users. Required by all API calls.
  • YOUR_KEY - The JSON Web Token (JWT) associated with your username. Required to call any APIs specific to a business.

Example request:

curl 'https://api.channelape.io/rest/v1/webhook_actions' \
-H "apikey: ANON_KEY" \
-H "Authorization: Bearer YOUR_KEY"

REST API V2 and GraphQL API Accounts

Creating an API Account

You can create an API account to access your businesses resources across ChannelApe API's. To do this, you need be the owner of the business. Run the following command:

curl 'https://api.channelape.io/rest/v1/rpc/create_api_account' \
-d '{ "business_id": "c8c6bcfa-f544-4680-bbf3-7d93aee95efa", "name": "My API Account" }' \
-H "apikey: ANON_KEY" \
-H "Content-Type: application/vnd.pgrst.object+json" \
-H "Authorization: Bearer YOUR_KEY"

This will create your API account private key. Note, that this is only shown once, so ensure you save it. Once you have your API secret you can 'login' with your API account. This essentially generates a short-lived (4 hour) JWT that can be used like any other JWT in the system.

curl -X POST 'https://api.channelape.io/rest/v1/rpc/login_api_account' \
-d '{ "account_id": "value", "secret": "value" }' \
-H "Content-Type: application/json" \
-H "apikey: ANON_KEY" \

JSON Web Tokens (JWTs)

JWTs expire after a certain amount of time and need to be refreshed before they expire. If you need require long term API Access and are unable to refresh your JWT regularly please email support@channelape.com.

Rate Limiting

API users are restricted to a rate limit. ChannelApe businesses have a default limit of 5 requests per second across all of the API Accounts of a business. When a request is rate limited, a 429 level status code will be returned. If you need an increased rate limit, please email support@channelape.com.