Getting Started

Guide to getting started with the Team API

Overview

The Team API enables you to access Creator metadata from your account.

GraphQL

The Team API is based on the GraphQL query language. This allows you to create any query for data that is supported by the API and customize those queries to only receive the data your need. Additionally, strong typing and schema definition makes the API easy to use and understand. In your account, when you access the Team API, the interface provides developer data documentation as well as a query schema. Data from this API is returned in a JSON format.

Authentication

Our API uses Basic Authentication, requiring an API username and API key for access. Ensure that both credentials are included in your request headers to authenticate successfully. They are available in the “Account”, “API Configuration” section of the dashboard.

Using the Team API

The API is available to all clients with the Team product and can be accessed via the platform. From the main navigation menu, under the "Team" section, click on "Team API".

When you initially open the explorer, you’ll see something like this:

The API explorer is unique to your account, if you notice the API URL in the explorer, that is specific for you.

The left panel is your working area, where you can construct, test and troubleshoot queries to the API.

The right panel is your results area. This is where you will see data responses or error messages based on your query from the left panel.

To execute a query, paste or write it into the left panel, then hit the PLAY button in between both panels.

Get all users:

{
  users {
    total,
    items {
      user_id
    }
  }
}

Get a specific user by Employee ID:

{
  users(filter: { employee_id: "123456" }) {
    total,
    items {
      user_id
    }
  }
}

The tabs at the top allow you to work with many queries at the same time without having to lose any work.

For convenience, you can click “COPY CURL” and this will allow you to paste a command into a standard unix/linux terminal to execute the query to our API using a generic CURL command.

API Access

The Team API is an authenticated API meant to be used by our clients to get data about team user for internal purposes. The API URL you see in the explorer is unique to your account. If for any reason you need to invalidate this URL and generate a new one, please contact our support team.

Note: this will disable any API calls being made to the former URL.

API Endpoint

Here is an example of the API endpoint:

https://app.creatable.io/v3/api/search/users/lL6BgaEn48soiR9l8ouh2Vfs1WPAnmS4/graphql

You can see there the URL is comprised of:

  • The API hostname app.creatable.io
  • The version /v3 subfolder indicating the API version you are currently using
  • The /api/search/users subfolder
  • The account specific hash /lL6BgaEn48soiR9l8ouh2Vfs1WPAnmS4, which represents your account
  • The /graphql endpoint identifier

Error handling

The API explorer has built in syntax validation, so if there is every a problem with your query, the errors will be highlighted for you and provide some hints on where the problem is.

When you submit a query to the API with improper syntax, you will receive a response similar to this:

{
  "errors": [
    {
      "message": "Syntax error while parsing GraphQL query. Invalid input '}', expected ExecutableDefinition or TypeSystemDefinition (line 8, column 5):\n    }\n    ^",
      "locations": [
        {
          "line": 8,
          "column": 5
        }
      ]
    }
  ]
}

If you have any additional problems using the Content API, please reach our to our support team and we'll be happy to help.