Skip to main content
The Cometly API lets you send events from any platform in your tech stack. An event is an action someone takes on the way to becoming a customer, such as a lead, a booked call or a purchase. To use the API, you activate it in your space (a workspace with its own settings, integrations and data) and create a Cometly API token, the key your requests sign in with. This matters when a conversion happens somewhere Cometly has no ready-made integration for, such as your own app or back office. Once those events reach Cometly, they are attributed to your ads like any other event, so you can see which campaign, ad set and ad produced each one. For endpoints, request formats and examples, see the Developer Docs.

Activate the API and create a token

You need the Administrator or Owner role in the space to see the Cometly API card.
  1. In Cometly, click Integrations in the left sidebar.
  2. Select the Webhooks & API category and click the Cometly API card.
  3. Click Activate Cometly API.
  4. Under Manage API tokens, enter a Token Name and click Create Token.
  5. Copy the token straight away. For security reasons, it is not shown again.
The Cometly API page with the API activated, showing step 2 Manage API tokens, the Token Name field, one token under Your Tokens, and an arrow pointing at the Create Token button.
Your tokens are listed under Your Tokens with their created and last used dates. Delete a token there when you no longer need it. Any application or integration using a deleted token stops working immediately.

Check it worked

The Cometly API card now shows Cometly API activated, and your new token appears under Your Tokens with its created date. After your application sends its first request, the token’s last used date tells you when it was last used.

Frequently asked questions

Should I use the Cometly API or a webhook to send events?

Use a webhook for most integrations: you set it up in Cometly without writing code, and it works with any platform that can send webhooks. Use the API for custom implementations where you need full control over when and how events are sent, such as server-side tracking from your own application. Sending data to Cometly compares the two.

How do I use my Cometly API token in a request?

Send the token in the Authorization header of every request, using the Bearer scheme. Authentication lists the required headers with an example request. For help with the API, contact developers@cometly.com.

How many API tokens can I create in Cometly?

A space can hold up to 25 API tokens at a time. When you reach that number, delete a token you no longer need before you create a new one. A separate, clearly named token for each application makes it easy to delete one without affecting the others.

Next steps

Still have questions or need a hand? We’re happy to help. Reach our team at support@cometly.com.