Skip to content
Keygen logo

Connectors / Developer tools · HTTP Connector

Keygen integration and API

Create a license, create a product and create a policy in Keygen, and start a workflow when Keygen sends “License created”.

What can you do with Keygen on Tray.ai?

Keygen is a software licensing and distribution service that issues license keys, tracks machine activations and hosts software releases for developers. Tray.ai connects to Keygen through the HTTP Connector, so your workflows can call the Keygen API alongside the rest of your stack.

  • When Keygen sends “License expiring soon”, create a renewal task for the account owner in your CRM.
  • When Keygen sends “License created”, email the key to the customer through your support system.
  • Create a license when an order is paid in your billing system.
  • Suspend a license when a subscription payment fails in your billing system.
Connects through
HTTP Connector
Authentication
A bearer token or basic authentication or an API key in the query string
Base URL
https://api.keygen.sh/v1/accounts/{account}

Set it up

Connect Keygen to Tray.ai

Each step uses Keygen's own API details, from its documentation.

Save Keygen's API token

Save the token Keygen issues as a Tray.ai authentication. The HTTP Client sends it as a bearer token on every call. The token stays out of the workflow and out of the logs.

Point the HTTP Client at the API

Add an HTTP Client step and use https://api.keygen.sh/v1/accounts/{account} as the base URL. Or paste a cURL example from Keygen's API docs, and Tray.ai fills in the method, URL, and headers.

Start with “List licenses”

It's one of 25 documented actions, under Licenses. The response comes back as data the next step can map into your other apps.

Start workflows from Keygen events

Give Keygen the URL of a Tray.ai webhook trigger. “License created” can then start a workflow, and so can 7 other events.

Workflows to build with Keygen

Connect Keygen with Stripe, Gmail, Slack and Salesforce

Each one uses actions and events from Keygen's own API documentation.

Issue Keygen licenses for new Stripe subscriptions

When

A subscription starts in Stripe

Then

  1. Create a license
  2. Email the license key to the customer with Gmail

With Stripe and Gmail

Suspend Keygen licenses when Stripe payments fail

When

A payment fails in Stripe

Then

  1. Suspend a license
  2. Post the account to the billing channel in Slack

With Stripe and Slack

Create renewal tasks in Salesforce for expiring Keygen licenses

When

License expiring soon

Then

  1. Find the customer's account in Salesforce
  2. Create a renewal task on the account in Salesforce

With Salesforce

Apps you can build on Keygen data

Internal tools your team can build with an AI assistant, each one using Keygen calls from its API documentation.

License support desk

Looks up a customer's licenses and machines and lets support renew, suspend or deactivate.

Expiring license list

Shows licenses expiring soon with their policy so sales can follow up on renewals.

Release publishing board

Lists releases per product and lets engineers publish a release.

Keygen MCP server for AI agents

Build an MCP server on Keygen in Agent Gateway and choose which actions your agents can call. Every call runs with access control and an audit trail. How Agent Gateway works

  • List licenses
  • List machines
  • List users
  • List products
  • List policies
  • List releases
  • Create a license
  • Validate a license

What the Keygen API covers

6 resources and 25 documented actions, each one a call the HTTP Connector can make from a Tray.ai workflow. Connecting it takes a few clicks: here's how.

Licenses

  • List licenses
  • Create a license
  • Validate a license
  • Suspend a license
  • Renew a license
  • Revoke a license

Machines

  • List machines
  • Activate a machine
  • Retrieve a machine
  • Deactivate a machine

Users

  • List users
  • Create a user
  • Update a user
  • Delete a user

Products

  • List products
  • Create a product
  • Update a product
  • Delete a product

Policies

  • List policies
  • Create a policy
  • Update a policy
  • Delete a policy

Releases

  • List releases
  • Create a release
  • Publish a release

Events Keygen can send to a Tray.ai webhook trigger

  • License created
  • License validation succeeded
  • License expiring soon
  • License revoked
  • Machine created
  • Machine heartbeat dead
  • User created
  • Release published

Checked against Keygen's own documentation on 2026-10-22

keygen.sh/docs/api

Frequently asked questions

What can a Tray.ai workflow do in Keygen?

The Keygen API documents 25 actions across 6 resources (Licenses, Machines, Users, Products, Policies, Releases). For example: List licenses; List machines; List users. A workflow can make any documented call through the HTTP Connector.

How does Tray.ai authenticate with Keygen?

The Keygen API uses a bearer token, basic authentication, and an API key in the query string. You save it once as a Tray.ai authentication, and the HTTP Connector adds it to every request.

Which Keygen events can start a Tray.ai workflow?

Keygen sends 8 events to a webhook URL, for example: License created; License validation succeeded; License expiring soon; License revoked; Machine created; Machine heartbeat dead; User created; Release published. A Tray.ai webhook trigger receives them and starts a workflow.

See Keygen working against your stack.

We'll walk through a tailored demo with your systems plugged in.

Great, a couple more details

This helps us connect you with the right person. Optional, and you can skip it.