Skip to main content

Overview

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

API Key Authentication

All API requests must include your API key in the request headers. Your API keys carry many privileges, so be sure to keep them secure. Do not share your secret API keys in publicly accessible areas such as GitHub, client-side code, etc.

Authentication Header

Include your API key in the Authorization header using the Bearer authentication scheme:
Authorization: Bearer YOUR_API_KEY

Required Headers

All API requests must include the following headers:
  • Authorization: Your API key using Bearer authentication scheme
  • Accept: application/json - Indicates that you expect JSON responses
  • Content-Type: application/json - Specifies that you’re sending JSON data
Authorization: Bearer YOUR_API_KEY
Accept: application/json
Content-Type: application/json

Example Request

Here’s an example of an authenticated request:
curl https://app.cometly.com/public-api/v1/events \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json"

Getting Your API Key

1

Log in to your Cometly account

Navigate to app.cometly.com and log in.
2

Go to Integrations

Navigate to the Integrations page at app.cometly.com/integrations.
3

Search for Cometly API

Use the search bar to find “cometly api” and click on the Cometly API integration page.
4

Generate a new API key

Click the button to generate a new API key. Make sure to copy and save it immediately, as you won’t be able to view it again.

Error Responses

If authentication fails, you’ll receive one of the following error responses:
Status CodeErrorDescription
401UnauthenticatedMissing or invalid API key
403ForbiddenAPI key doesn’t have permission for this resource, or your Cometly subscription is inactive