GraphQL API

Noora's public API is built using GraphQL. It's the same API we use for developing our applications.

If you're new to GraphQL, Apollo has useful resources for beginners

Endpoint

Noora's GraphQL endpoint is:

https://api.noorahq.com/graphql

The easiest way to work with the GraphQL endpoint is to download the schema and upload it to a free tool such as Insomnia.

Authentication

In order to generate an access token for the GraphQL API, you need to be a workspace admin. Sign-in to your workspace, and go to the Admin > Integrations tab. From here you can generate a token. Be sure to store this token securely as it can be used to read and modify all of the data in your Noora workspace.

To authenticate your requests you need to pass an Authorization header:

curl --request POST \
  --url https://api.noorahq.com/graphql \
  --header 'Authorization: Bearer <Replace with your API token>' \
  --header 'Content-Type: application/json' \
  --data '{
	"query": "query Workspace { workspace(input: { subDomain: \"<Replace with your subdomain>\" }) { _id } }"
}'

Queries & Mutations

As posts (and most other objects) are workspace based, you first need to get the ID of the workspace you want to interact with:
query Workspace {
  workspace(input: { subDomain: "<Replace with your subdomain" }) {
    _id
  }
}

Once you have found the correct workspace, you can get the posts for that workspace:

query Posts {
  posts(input: {
    workspaceId: "<Replace with your workspaceId>"
    orderBy: POPULAR
    limit: 15
  }) {
    title
  }
}

Support

If you run into any issues when using the GraphQL API, please contact us and we'll do our best to help get you up and running.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.