Skip to main content

Introduction

The Codex GraphQL Content API provides a central API interface to retrieve all content created in Codex. Each Codex organization comes with a GraphQL schema based on its models.

The Condex GraphQL API supports the standard GraphQL functionallitis for any type of model that you create through Codex.

Base URL

The base GraphQL API url for Codex is

https://graphql.codex.gjirafa.tech/

Each organization has it's own schema which is available under the link:

https://graphql.codex.gjirafa.tech/v2/{organization}

By default the API returns content from the whole Codex organization. If you want to filter all the content for a specific site only then add the siteId parameter when you execute GraphQL queries.

https://graphql.codex.gjirafa.tech/v2/{organization}?siteId={site_id}

Codex GraphQL API is read-only

Authentication

The Codex GraphQL API uses API keys to authenticate requests. You can view and manage your API keys in the Codex API Keys Dashboard.

Your API keys carry many privileges, so be sure to create dedicated API Keys for read-only purposes to be used in GraphQL API.

Authentication to the API is performed via bearer auth. Provide your API key as the bearer auth value. You do not need to provide a password.

curl https://graphql.codex.gjirafa.tech/v2/{organization} -H "Authorization: Bearer {API_KEY}"
Sending API requests

All API requests must be made over HTTPS and authenticated with a valid user token or API key, otherwise they will fail with a 401 Unauthorized status code, and calls made over plain HTTP will also fail.