Management API reference

In this guide

Choose a domain and open an operation to see its HTTP path, required permissions, inputs, responses and corresponding MCP tool and CLI command. The descriptions and technical names come from the English contract.

API access

Run management integrations on the publisher’s server. Send an Authorization: Bearer <API_KEY> header over HTTPS. The key determines the organisation, environment and permissions. To try a read with a test key, follow the agent guide. For an app distributed to buyers, use the public licensing protocol.

Command names identify entries in the CLI’s help. When a path contains a parameter in braces, replace it with the resource ID from your organisation. The JSON contract details types, constraints, nested objects and response examples.

Open the OpenAPI contract · Agent index · Full-text guides

Account

account.invitations.acceptAccept an invitation

POST /api/v1/invitations/accept

Accept the invitation whose token the console read from the link of its mail (/app/invitations#<token>). Keyseal reads the current verified primary address from Clerk for the signed-in user ID. It must match the invitation address. A mismatch gives 403 invitation_email_mismatch and leaves the invitation open. The person joins with the invited role. An existing member keeps their role. A successful acceptance consumes the invitation. Unknown, expired, already accepted or withdrawn: 404 invitation_invalid, one answer for all. Returns the organization (slug, name) and the role.

Who may call: A person signed in with Clerk, without the organization headers. API keys are refused (403 forbidden): this is for a person.

Idempotency: not supported: a request with Idempotency-Key is refused (400 idempotency_not_supported). The invitation's token is good once: a retry answers 404 invitation_invalid, and account.me shows the organization joined.

MCP
Console only
CLI
Console only
Parameters
  • token (body, required)
HTTP responses
  • 200 Successful Response
  • 400 idempotency_not_supported
  • 401 unauthenticated
  • 403 email_unverified, forbidden, invitation_email_mismatch
  • 404 invitation_invalid
  • 409 operator_busy
  • 413 payload_too_large
  • 422 invalid_request
  • 429 billing_limit_reached, rate_limited
  • 503 auth_unavailable, billing_unavailable, limits_unavailable
account.meRead the signed-in person and their organizations

GET /api/v1/me

The person behind the Clerk session token, and every organization they are a member of with their role in it (its slug is the value of the Keyseal-Organization header). Keyseal refreshes the name and verified primary email for the same Clerk user ID. A new user is created at first sign-in. An unverified or non-ASCII primary address gives 403 email_unverified. An established user can read their last verified profile while the Clerk backend is unavailable.

Who may call: A person signed in with Clerk, without the organization headers. API keys are refused (403 forbidden): this is for a person.

MCP
Console only
CLI
Console only
HTTP responses
  • 200 Successful Response
  • 401 unauthenticated
  • 403 email_unverified, forbidden
  • 409 operator_busy
  • 413 payload_too_large
  • 429 rate_limited
  • 503 auth_unavailable, limits_unavailable
account.organizations.createCreate an organization

POST /api/v1/organizations

Create an organization, with its test and live environments; the caller becomes its owner. slug (2 to 63 characters [a-z0-9-], starting with a letter or a digit) is the value of the Keyseal-Organization header; one already taken is 409 slug_taken, and api, app, assets, invitations, me and organizations, reserved by Keyseal, are 422 slug_reserved. At most 5 new organizations per person in 24 hours (429 organization_limit_reached). A separate lifetime creation ceiling returns 409 organization_creation_limit and limit. Returns 201 with the organization and the caller's role.

Who may call: A person signed in with Clerk, without the organization headers. API keys are refused (403 forbidden): this is for a person.

Idempotency: not supported: a request with Idempotency-Key is refused (400 idempotency_not_supported). This route is outside any organization; a retry is safe anyway: the slug, once taken, answers 409 slug_taken, and account.me lists the organization made.

MCP
Console only
CLI
Console only
Parameters
  • name (body, required)
  • slug (body, required)
HTTP responses
  • 201 Successful Response
  • 400 idempotency_not_supported
  • 401 unauthenticated
  • 403 email_unverified, forbidden
  • 409 operator_busy, organization_creation_limit, slug_taken
  • 413 payload_too_large
  • 422 invalid_request, slug_reserved
  • 429 organization_limit_reached, rate_limited
  • 503 auth_unavailable, limits_unavailable

Analytics

analytics.summaryRead publisher analytics

GET /api/v1/analytics

Aggregate paid sales and buyer refunds by their effective UTC dates and sale currencies. Settlement entries use their own date and currency. Withheld tax, fees and net are local evidenced amounts. Coverage counts distinct affected orders. An undated cumulative refund marks each possible day from payment through its observation with missing_refunds in the original sale currency. Amounts are integer minor units. MRR uses discounted tax-exclusive rates at period end or the observation instant and rounds once per currency. Dates are inclusive UTC calendar dates, at most 366 days apart including both ends. The default is the 30 days ending today. Future dates are accepted and the daily series stops at the observation time. A reversed or excessive range is 422 invalid_request. When product_id is given, an unknown product or a product outside the caller's environment is 404 not_found.

Who may call: Any member of the organization; an API key with the right read (or admin, which implies every right).

MCP
analytics_summary
CLI
keyseal analytics summary
Parameters
  • product_id (query)
  • from (query)
  • to (query)
HTTP responses
  • 200 Successful Response
  • 401 unauthenticated
  • 403 forbidden, scope_mismatch
  • 404 not_found
  • 409 operator_busy
  • 413 payload_too_large
  • 422 invalid_request
  • 429 billing_limit_reached, rate_limited
  • 503 auth_unavailable, billing_unavailable, limits_unavailable
analytics.exportExport publisher analytics as CSV

GET /api/v1/analytics/export

Download the same aggregate figures as analytics.summary in UTF-8 CSV. Each row names the dimension, key, label, day, metric, currency, unit, value and availability. Missing values are empty and marked unavailable. Dates are inclusive UTC calendar dates, at most 366 days apart including both ends. The default is the 30 days ending today. Future dates are accepted and the daily series stops at the observation time. A reversed or excessive range is 422 invalid_request. When product_id is given, an unknown product or a product outside the caller's environment is 404 not_found.

Who may call: Any member of the organization; an API key with the right read (or admin, which implies every right).

MCP
analytics_export
CLI
keyseal analytics export
Parameters
  • product_id (query)
  • from (query)
  • to (query)
HTTP responses
  • 200 UTF-8 CSV attachment of aggregate report rows.
  • 401 unauthenticated
  • 403 forbidden, scope_mismatch
  • 404 not_found
  • 409 operator_busy
  • 413 payload_too_large
  • 422 invalid_request
  • 429 billing_limit_reached, rate_limited
  • 503 auth_unavailable, billing_unavailable, limits_unavailable

API keys

api_keys.listList the API keys

GET /api/v1/api-keys

The API keys of the organization in the environment of the request (never the other environment's), revoked ones included, oldest first. hint (the prefix and the first characters) recognises a key: the key itself is never returned. created_by is the person the key belongs to (null for a key made by the command line).

Who may call: A person with the role admin or owner; an API key with the right admin.

MCP
api_keys_list
CLI
keyseal api-keys list
HTTP responses
  • 200 Successful Response
  • 401 unauthenticated
  • 403 forbidden, scope_mismatch
  • 404 not_found
  • 409 operator_busy
  • 413 payload_too_large
  • 422 invalid_request
  • 429 billing_limit_reached, rate_limited
  • 503 auth_unavailable, billing_unavailable, limits_unavailable
api_keys.createCreate an API key

POST /api/v1/api-keys

Create a key of the organization and of the environment of the request (ksk_test_… or ksk_live_…), with at least one right among read, licences, catalog, files, customers and admin. The key belongs to the caller (a key made by a key, to that key's person): it is revoked when that person leaves the organization or becomes a member. Returns 201 with the key in key, the only time it is shown: keep it at once (Cache-Control: no-store).

Who may call: A person with the role admin or owner; an API key with the right admin.

Idempotency: not supported: a request with Idempotency-Key is refused (400 idempotency_not_supported). The answer carries the new key in clear, which Keyseal never keeps, even sealed: if it was lost, find the key in api_keys.list, revoke it and make another.

MCP
api_keys_create
CLI
keyseal api-keys create
Parameters
  • name (body, required)
  • scopes (body, required)
HTTP responses
  • 201 Successful Response
  • 400 idempotency_not_supported
  • 401 unauthenticated
  • 403 forbidden, scope_mismatch
  • 404 not_found
  • 409 operator_busy
  • 413 payload_too_large
  • 422 invalid_request
  • 429 billing_limit_reached, rate_limited
  • 503 auth_unavailable, billing_unavailable, limits_unavailable
api_keys.revokeRevoke an API key

DELETE /api/v1/api-keys/{key_id}

Revoke a key of the environment of the request at once, and withdraw the open invitations it sent. A key already revoked changes nothing more. Returns 204.

Irreversible: a revoked key never works again: make a new one.

Who may call: A person with the role admin or owner; an API key with the right admin.

MCP
api_keys_revoke
CLI
keyseal api-keys revoke
Parameters
  • key_id (path, required)
  • Idempotency-Key (header)
HTTP responses
  • 204 Successful Response
  • 401 unauthenticated
  • 403 forbidden, scope_mismatch
  • 404 not_found
  • 409 idempotency_key_in_progress, operator_busy
  • 413 payload_too_large
  • 422 idempotency_key_reused, invalid_request
  • 429 billing_limit_reached, rate_limited
  • 503 auth_unavailable, billing_unavailable, limits_unavailable

Billing

billing.getRead the organization's subscription, offers and quotas

GET /api/v1/billing

The plan and purchased period belong to the entire organization. Usage and reservations are measured in the selected environment. Monthly counters reset at period_end (exclusive, UTC). Divide the integer price by 10 raised to amount_exponent for display. A null limit is unmetered. A pending checkout or plan change grants no rights. operator_access identifies a complimentary edition included for an operator-owned organization. subscription_plan and status describe its ordinary subscription.

Who may call: Any member of the organization; an API key with the right read (or admin, which implies every right).

MCP
billing_get
CLI
keyseal billing show
HTTP responses
  • 200 Successful Response
  • 401 unauthenticated
  • 403 forbidden, scope_mismatch
  • 404 not_found
  • 409 operator_busy
  • 413 payload_too_large
  • 422 invalid_request
  • 429 billing_limit_reached, rate_limited
  • 503 auth_unavailable, billing_unavailable, limits_unavailable
billing.checkoutOpen a subscription checkout for this organization

POST /api/v1/billing/checkout

Opens a private checkout for the selected edition on the platform seller's account. Use test for the sandbox profile and live for the commercial profile. Beta is free. Only verified payment events establish paid rights. Never log or share the temporary URL. For billing_outcome_unknown, a timeout, or a lost response, retry with the same request_id. billing_provider_refused closes this attempt.

Who may call: A signed-in administrator or owner of the named organization. API keys are refused (403 forbidden).

Idempotency: not supported: Idempotency-Key is refused (400 idempotency_not_supported). Use the body request_id for a safe retry. The private checkout URL is never saved for replay.

MCP
Console only
CLI
Console only
Parameters
  • edition_id (body, required)
  • request_id (body, required)
HTTP responses
  • 200 Successful Response
  • 400 idempotency_not_supported
  • 401 unauthenticated
  • 403 forbidden, scope_mismatch
  • 404 not_found
  • 409 billing_conflict, billing_provider_refused, operator_busy
  • 413 payload_too_large
  • 422 invalid_request
  • 429 billing_limit_reached, rate_limited
  • 503 auth_unavailable, billing_outcome_unknown, billing_unavailable, limits_unavailable, stripe_unavailable
billing.changeChange a subscription or its renewal

POST /api/v1/billing/subscription

Submit a new edition or change automatic renewal. A 202 accepts the request. Check billing.get for signed confirmation. Paid access continues through its acquired period. Reuse the same request_id after billing_outcome_unknown, a timeout, or a lost response. billing_provider_refused closes this attempt.

Who may call: A signed-in administrator or owner of the named organization. API keys are refused (403 forbidden).

Idempotency: not supported: Idempotency-Key is refused (400 idempotency_not_supported). Use the same body request_id for an exact retry. The billing workflow tracks the change until the provider confirms its outcome.

MCP
Console only
CLI
Console only
Parameters
  • edition_id (body)
  • renew (body)
  • request_id (body, required)
HTTP responses
  • 202 Successful Response
  • 400 idempotency_not_supported
  • 401 unauthenticated
  • 403 forbidden, scope_mismatch
  • 404 not_found
  • 409 billing_conflict, billing_provider_refused, operator_busy
  • 413 payload_too_large
  • 422 invalid_request
  • 429 billing_limit_reached, rate_limited
  • 503 auth_unavailable, billing_outcome_unknown, billing_unavailable, limits_unavailable, stripe_unavailable

Catalogue

catalog.tax_codes.listList the tax codes a product may carry

GET /api/v1/catalog/tax-codes

The Stripe tax codes a product may carry: the software and services eligible for Stripe's Managed Payments, the same for every organization. default flags the code of a product created without tax_code.

Who may call: Any member of the organization; an API key with the right read or catalog (or admin, which implies every right).

MCP
catalog_tax_codes_list
CLI
keyseal api GET /api/v1/catalog/tax-codes
HTTP responses
  • 200 Successful Response
  • 401 unauthenticated
  • 403 forbidden, scope_mismatch
  • 404 not_found
  • 409 operator_busy
  • 413 payload_too_large
  • 422 invalid_request
  • 429 billing_limit_reached, rate_limited
  • 503 auth_unavailable, billing_unavailable, limits_unavailable
catalog.plans.listList the plans

GET /api/v1/plans

The plans of every product of the environment of the request, oldest first, each with its current price (null for a plan without one, which is not sold: it serves the licences given by hand) and its state at Stripe (stripe).

Who may call: Any member of the organization; an API key with the right read or catalog (or admin, which implies every right).

MCP
catalog_plans_list
CLI
keyseal plans list
HTTP responses
  • 200 Successful Response
  • 401 unauthenticated
  • 403 forbidden, scope_mismatch
  • 404 not_found
  • 409 operator_busy
  • 413 payload_too_large
  • 422 invalid_request
  • 429 billing_limit_reached, rate_limited
  • 503 auth_unavailable, billing_unavailable, limits_unavailable
catalog.plans.createCreate a plan of a product

POST /api/v1/plans

Create a plan, a way to sell a product with its price, then push it to Stripe when Stripe is connected. kind: perpetual, perpetual_with_updates or renewal (both with update_months, 1 to 1200), or subscription (whose price alone has an interval, month or year). slug is unique in the environment (409 plan_slug_taken) and is the address of the buy link, /b/{org}/{slug}; public: false keeps the plan off its buy link, and a renewal plan is sold only through a renewal link. seats: machines per licence (3 by default). price: amount in minor units, currency in three letters, tax_behavior inclusive (default) or exclusive; a plan without a price is not sold. free: true makes a free plan: its buy link gives a licence against a confirmed e-mail address, without Stripe; it is perpetual or perpetual_with_updates and has no price (422 free_plan_not_allowed otherwise), and it is never sent to Stripe. An unknown product is 404 not_found. Returns 201 with the plan, its stripe as for a product.

Irreversible: the kind, the slug and the product of a plan never change.

Who may call: A person with the role admin or owner; an API key with the right catalog (or admin, which implies every right).

MCP
catalog_plans_create
CLI
keyseal plans create
Parameters
  • Idempotency-Key (header)
  • features (body)
  • free (body)
  • kind (body, required)
  • name (body, required)
  • price (body)
  • product_id (body, required)
  • public (body)
  • seats (body)
  • slug (body, required)
  • update_major (body)
  • update_months (body)
  • usage_terms (body)
HTTP responses
  • 201 Successful Response
  • 401 unauthenticated
  • 403 forbidden, scope_mismatch
  • 404 not_found
  • 409 idempotency_key_in_progress, operator_busy, plan_slug_taken
  • 413 payload_too_large
  • 422 free_plan_not_allowed, idempotency_key_reused, invalid_request
  • 429 billing_limit_reached, rate_limited
  • 503 auth_unavailable, billing_unavailable, limits_unavailable
catalog.plans.getRead a plan

GET /api/v1/plans/{plan_id}

One plan of the environment of the request, by its id (a UUID), with its current price and its state at Stripe. Another organization's or environment's is 404 not_found.

Who may call: Any member of the organization; an API key with the right read or catalog (or admin, which implies every right).

MCP
catalog_plans_get
CLI
keyseal plans show
Parameters
  • plan_id (path, required)
HTTP responses
  • 200 Successful Response
  • 401 unauthenticated
  • 403 forbidden, scope_mismatch
  • 404 not_found
  • 409 operator_busy
  • 413 payload_too_large
  • 422 invalid_request
  • 429 billing_limit_reached, rate_limited
  • 503 auth_unavailable, billing_unavailable, limits_unavailable
catalog.plans.updateUpdate a plan

PATCH /api/v1/plans/{plan_id}

Change the fields sent among name, seats, features, update_months, public, free and price, then push the plan to Stripe; the kind, the slug and the product never change. A price replaces the current one: at Stripe a new Price is made and the old one deactivated, and the same price sent again changes nothing. "price": null is refused: a price is replaced, never removed. A price for a free plan is 422 plan_is_free; free: true for a plan that is neither perpetual nor perpetual_with_updates, or that has a price, is 422 free_plan_not_allowed. A free plan is never sent to Stripe. Returns the plan.

Who may call: A person with the role admin or owner; an API key with the right catalog (or admin, which implies every right).

MCP
catalog_plans_update
CLI
keyseal plans update
Parameters
  • plan_id (path, required)
  • Idempotency-Key (header)
  • features (body)
  • free (body)
  • name (body)
  • price (body)
  • public (body)
  • seats (body)
  • update_major (body)
  • update_months (body)
  • usage_terms (body)
HTTP responses
  • 200 Successful Response
  • 401 unauthenticated
  • 403 forbidden, scope_mismatch
  • 404 not_found
  • 409 idempotency_key_in_progress, operator_busy
  • 413 payload_too_large
  • 422 free_plan_not_allowed, idempotency_key_reused, invalid_request, plan_is_free
  • 429 billing_limit_reached, rate_limited
  • 503 auth_unavailable, billing_unavailable, limits_unavailable
catalog.products.listList the products

GET /api/v1/products

The products of the environment of the request, oldest first. stripe says whether each is at Stripe as it is in Keyseal (error: stripe_not_connected without a connection, null while a push is due).

Who may call: Any member of the organization; an API key with the right read or catalog (or admin, which implies every right).

MCP
catalog_products_list
CLI
keyseal products list
HTTP responses
  • 200 Successful Response
  • 401 unauthenticated
  • 403 forbidden, scope_mismatch
  • 404 not_found
  • 409 operator_busy
  • 413 payload_too_large
  • 422 invalid_request
  • 429 billing_limit_reached, rate_limited
  • 503 auth_unavailable, billing_unavailable, limits_unavailable
catalog.products.createCreate a product

POST /api/v1/products

Create a product and its first signing key, then push it to Stripe when Stripe is connected. slug ([a-z0-9-], 64 characters at most) and key_prefix (three capital letters, the start of its licence keys: DSM-…) are unique in the environment (409 product_slug_taken, 409 key_prefix_taken). lease_days (30 by default, 1 to 3650) is the lease of the certificates of its licences; offline_policy is open (default) or closed; website_url is also where a buyer who cancels the payment comes back to; tax_code is one of catalog.tax_codes.list. page_enabled (false by default) gives the product a hosted page, /p/{org}/{slug}, with image_url (https:// only) as its image. Returns 201 with the product. A push to Stripe that fails never fails the write: stripe.synced is then false and stripe.error says why (stripe_unavailable, stripe_refused, stripe_not_connected); stripe.sync catches up.

Irreversible: the slug and the key_prefix of a product never change.

Who may call: A person with the role admin or owner; an API key with the right catalog (or admin, which implies every right).

MCP
catalog_products_create
CLI
keyseal products create
Parameters
  • Idempotency-Key (header)
  • description (body)
  • image_url (body)
  • key_prefix (body, required)
  • lease_days (body)
  • name (body, required)
  • offline_policy (body)
  • page_enabled (body)
  • privacy_url (body)
  • slug (body, required)
  • tax_code (body)
  • terms_url (body)
  • website_url (body)
HTTP responses
  • 201 Successful Response
  • 401 unauthenticated
  • 403 forbidden, scope_mismatch
  • 404 not_found
  • 409 idempotency_key_in_progress, key_prefix_taken, operator_busy, product_slug_taken
  • 413 payload_too_large
  • 422 idempotency_key_reused, invalid_request
  • 429 billing_limit_reached, rate_limited
  • 503 auth_unavailable, billing_unavailable, limits_unavailable
catalog.products.getRead a product

GET /api/v1/products/{product_id}

One product of the environment of the request, by its id (a UUID), with its state at Stripe (stripe). Another organization's or environment's is 404 not_found.

Who may call: Any member of the organization; an API key with the right read or catalog (or admin, which implies every right).

MCP
catalog_products_get
CLI
keyseal products show
Parameters
  • product_id (path, required)
HTTP responses
  • 200 Successful Response
  • 401 unauthenticated
  • 403 forbidden, scope_mismatch
  • 404 not_found
  • 409 operator_busy
  • 413 payload_too_large
  • 422 invalid_request
  • 429 billing_limit_reached, rate_limited
  • 503 auth_unavailable, billing_unavailable, limits_unavailable
catalog.products.updateUpdate a product

PATCH /api/v1/products/{product_id}

Change the fields sent among name, lease_days, offline_policy, description, website_url, tax_code, ls_compat, page_enabled and image_url, then push the product to Stripe; any other field (the slug, the key_prefix) is 422 invalid_request. page_enabled turns the product's hosted page, /p/{org}/{slug}, on or off; image_url (https:// only, null clears it) is its image. ls_compat: true gives the product's new licences a key in Lemon Squeezy's format (a UUID) instead of PFX-…; the keys already issued never change. Returns the product, its stripe as for catalog.products.create.

Who may call: A person with the role admin or owner; an API key with the right catalog (or admin, which implies every right).

MCP
catalog_products_update
CLI
keyseal products update
Parameters
  • product_id (path, required)
  • Idempotency-Key (header)
  • description (body)
  • image_url (body)
  • lease_days (body)
  • ls_compat (body)
  • name (body)
  • offline_policy (body)
  • page_enabled (body)
  • privacy_url (body)
  • tax_code (body)
  • terms_url (body)
  • website_url (body)
HTTP responses
  • 200 Successful Response
  • 401 unauthenticated
  • 403 forbidden, scope_mismatch
  • 404 not_found
  • 409 idempotency_key_in_progress, operator_busy
  • 413 payload_too_large
  • 422 idempotency_key_reused, invalid_request
  • 429 billing_limit_reached, rate_limited
  • 503 auth_unavailable, billing_unavailable, limits_unavailable
catalog.products.preview_imagePreview the selected product image

GET /api/v1/products/{product_id}/image

Read the currently selected Keyseal-hosted thumbnail as base64 WebP, including for an unpublished product. An external image or a product with no uploaded image answers 404 not_found. The preview is private and must not be cached.

Who may call: Any member of the organization; an API key with the right read or catalog (or admin, which implies every right).

MCP
catalog_products_preview_image
CLI
keyseal products preview-image
Parameters
  • product_id (path, required)
HTTP responses
  • 200 Successful Response
  • 401 unauthenticated
  • 403 forbidden, scope_mismatch
  • 404 not_found
  • 409 operator_busy
  • 413 payload_too_large
  • 422 invalid_request
  • 429 billing_limit_reached, rate_limited
  • 503 auth_unavailable, billing_unavailable, limits_unavailable
catalog.products.upload_imageUpload the image for a product's hosted page

PUT /api/v1/products/{product_id}/image

Replace the product image with a still PNG, JPEG or WebP of at most 512 KiB and eight million pixels. Send standard base64 in content_base64. Keyseal strips metadata and returns a same-origin WebP URL, up to 768 pixels per side. Only an enabled product page serves the selected image. A private page retains the image for a future publication. Clearing or replacing image_url withdraws this URL. The operation does not publish a page or an offer.

Who may call: A person with the role admin or owner; an API key with the right catalog (or admin, which implies every right).

MCP
catalog_products_upload_image
CLI
keyseal products upload-image
Parameters
  • product_id (path, required)
  • Idempotency-Key (header)
  • content_base64 (body, required)
HTTP responses
  • 200 Successful Response
  • 401 unauthenticated
  • 403 forbidden, scope_mismatch
  • 404 not_found
  • 409 idempotency_key_in_progress, operator_busy
  • 413 payload_too_large
  • 422 idempotency_key_reused, invalid_request
  • 429 billing_limit_reached, rate_limited
  • 503 auth_unavailable, billing_unavailable, limits_unavailable

Customers

customers.listList and search the customers

GET /api/v1/customers

The customers of the environment of the request, newest first, by pages. q (1 to 200 characters, any case) finds the start of an address or a part of a name; a q with @ looks at the start of the address only. % and _ are plain text; a blank q is 422 invalid_request. Each customer comes with licences_count, all their licences, revoked ones included.

Who may call: Any member of the organization; an API key with the right read or customers (or admin, which implies every right).

MCP
customers_list
CLI
keyseal customers list
Parameters
  • q (query)
  • limit (query)
  • cursor (query)
HTTP responses
  • 200 Successful Response
  • 401 unauthenticated
  • 403 forbidden, scope_mismatch
  • 404 not_found
  • 409 operator_busy
  • 413 payload_too_large
  • 422 invalid_request
  • 429 billing_limit_reached, rate_limited
  • 503 auth_unavailable, billing_unavailable, limits_unavailable
customers.getRead a customer

GET /api/v1/customers/{customer_id}

One customer (a UUID) with their latest 100 licences (licences_truncated when they have more, licences_count the total), their latest 20 sales (orders_count the total) and their latest 20 mails (emails_count the total). Never a licence key, nor a mail's address or text.

Who may call: Any member of the organization; an API key with the right read or customers (or admin, which implies every right).

MCP
customers_get
CLI
keyseal customers show
Parameters
  • customer_id (path, required)
HTTP responses
  • 200 Successful Response
  • 401 unauthenticated
  • 403 forbidden, scope_mismatch
  • 404 not_found
  • 409 operator_busy
  • 413 payload_too_large
  • 422 invalid_request
  • 429 billing_limit_reached, rate_limited
  • 503 auth_unavailable, billing_unavailable, limits_unavailable
customers.messages.sendWrite to one customer

POST /api/v1/customers/{customer_id}/messages

Queue a free message from the publisher to one customer of the environment: the answer to a question, a commercial gesture; not a campaign tool. subject: 1 to 150 characters on one line (line breaks become spaces; bidirectional and zero-width characters are refused); body: 1 to 5000 characters of plain text (a blank line separates paragraphs; HTML is shown as typed, never evaluated); locale (fr or en): the language of Keyseal's words around it, the customer's by default. The mail carries the publisher's brand, and answering it writes to support_email. At most 50 messages per 24 hours in the scope, and 50 per person across all their organizations, the person being the one who writes or who made the API key that writes (429 message_limit_reached). A processing restriction gives 403 forbidden. A customer without an address is 409 customer_has_no_email; without a mail provider configured, nothing is queued (503 mail_unavailable). Returns 202 with email_id; emails.list shows the message's subject and length, never its text.

Sends a mail: the publisher_message mail to the customer, once per call.

Who may call: Any member of the organization; an API key with the right customers (or admin, which implies every right).

MCP
customers_messages_send
CLI
keyseal customers message
Parameters
  • customer_id (path, required)
  • Idempotency-Key (header)
  • body (body, required)
  • locale (body)
  • subject (body, required)
HTTP responses
  • 202 Successful Response
  • 401 unauthenticated
  • 403 forbidden, scope_mismatch
  • 404 not_found
  • 409 customer_has_no_email, idempotency_key_in_progress, operator_busy
  • 413 payload_too_large
  • 422 idempotency_key_reused, invalid_request
  • 429 billing_limit_reached, message_limit_reached, rate_limited
  • 503 auth_unavailable, billing_unavailable, limits_unavailable, mail_unavailable

Discount codes

discounts.listList the discounts

GET /api/v1/discounts

The discounts of the environment of the request made in Keyseal, newest first: their terms, how many codes they have and can be used now, and their uses. Coupons made in the Stripe Dashboard are not listed. discounts.get gives the codes.

Who may call: A person with the role admin or owner; an API key with the right admin.

MCP
discounts_list
CLI
keyseal discounts list
HTTP responses
  • 200 Successful Response
  • 401 unauthenticated
  • 403 forbidden, scope_mismatch
  • 404 not_found
  • 409 operator_busy
  • 413 payload_too_large
  • 422 invalid_request
  • 429 billing_limit_reached, rate_limited
  • 503 auth_unavailable, billing_unavailable, limits_unavailable
discounts.createCreate a discount

POST /api/v1/discounts

Create a discount, a coupon on the publisher's Stripe account: a percentage (percent_off, 1 to 100) or an amount (amount_off in minor units, with currency), on some products (product_ids, at least one, each already at Stripe: 409 discount_product_not_on_stripe otherwise), for subscriptions during duration (once, repeating with duration_months, forever). A value out of these rules is 422 invalid_discount. It has no code yet: discounts.codes.create makes them. Nothing is kept when Stripe does not confirm the coupon (503 stripe_unavailable). A suspended publisher makes none (403 publisher_suspended). The restricted key needs Coupons: write and Promotion Codes: write, which the connection does not require: without them, 422 stripe_permissions_missing names them in missing. Returns 201 with the discount.

Irreversible: its reduction, products and duration never change, and a discount is never deleted: only its name can be changed, and its codes deactivated.

Who may call: A person with the role admin or owner; an API key with the right admin.

MCP
discounts_create
CLI
keyseal discounts create
Parameters
  • Idempotency-Key (header)
  • amount_off (body)
  • currency (body)
  • duration (body)
  • duration_months (body)
  • name (body, required)
  • percent_off (body)
  • product_ids (body, required)
HTTP responses
  • 201 Successful Response
  • 401 unauthenticated
  • 403 forbidden, publisher_suspended, scope_mismatch
  • 404 not_found
  • 409 discount_product_not_on_stripe, discount_unavailable, idempotency_key_in_progress, operator_busy, stripe_not_connected
  • 413 payload_too_large
  • 422 idempotency_key_reused, invalid_discount, invalid_request, stripe_permissions_missing
  • 429 billing_limit_reached, rate_limited
  • 503 auth_unavailable, billing_unavailable, limits_unavailable, stripe_unavailable
discounts.codes.getRead a code and its uses

GET /api/v1/discounts/codes/{code_id}

One code (dco_…), checked at Stripe first: a code left pending (its creation not confirmed) is looked for there, never made (activating it with discounts.codes.update makes it), and whether it is still active is read. A pending code found active though deactivated in Keyseal, or one found after it became unavailable, is deactivated at Stripe. When Stripe cannot be asked (unreachable, disconnected, a right missing), the state Keyseal keeps is answered all the same, with stripe_checked false and why in stripe_error. Its uses (redemptions), newest first, by pages: when, the amount taken off, the sale, the licence and the buyer.

Who may call: A person with the role admin or owner; an API key with the right admin.

MCP
discounts_codes_get
CLI
keyseal discounts codes show
Parameters
  • code_id (path, required)
  • limit (query)
  • cursor (query)
HTTP responses
  • 200 Successful Response
  • 401 unauthenticated
  • 403 forbidden, scope_mismatch
  • 404 discount_code_not_found, not_found
  • 409 operator_busy
  • 413 payload_too_large
  • 422 invalid_request
  • 429 billing_limit_reached, rate_limited
  • 503 auth_unavailable, billing_unavailable, limits_unavailable
discounts.codes.updateActivate, deactivate or annotate a code

PATCH /api/v1/discounts/codes/{code_id}

Activate or deactivate a code (active), at Stripe and in Keyseal, and change its note (null or empty removes it); a field left out stays as it is. A code that is expired, used up or unavailable cannot be activated (409 discount_unavailable; an unavailable one still takes a note), nor one whose text is active elsewhere on the Stripe account (409 discount_code_taken). A suspended publisher activates none (403 publisher_suspended). The restricted key needs Coupons: write and Promotion Codes: write, which the connection does not require: without them, 422 stripe_permissions_missing names them in missing. Returns the code.

Who may call: A person with the role admin or owner; an API key with the right admin.

MCP
discounts_codes_update
CLI
keyseal discounts codes update
Parameters
  • code_id (path, required)
  • Idempotency-Key (header)
  • active (body)
  • note (body)
HTTP responses
  • 200 Successful Response
  • 401 unauthenticated
  • 403 forbidden, publisher_suspended, scope_mismatch
  • 404 discount_code_not_found, not_found
  • 409 discount_code_taken, discount_unavailable, idempotency_key_in_progress, operator_busy, stripe_not_connected
  • 413 payload_too_large
  • 422 idempotency_key_reused, invalid_discount, invalid_request, stripe_permissions_missing
  • 429 billing_limit_reached, rate_limited
  • 503 auth_unavailable, billing_unavailable, limits_unavailable, stripe_unavailable
discounts.getRead a discount and its codes

GET /api/v1/discounts/{discount_id}

One discount (dsc_…) with its codes, oldest first: their text, note, limits, status and number of uses, as Keyseal keeps them (discounts.codes.get checks one code at Stripe and lists its uses).

Who may call: A person with the role admin or owner; an API key with the right admin.

MCP
discounts_get
CLI
keyseal discounts show
Parameters
  • discount_id (path, required)
HTTP responses
  • 200 Successful Response
  • 401 unauthenticated
  • 403 forbidden, scope_mismatch
  • 404 discount_not_found, not_found
  • 409 operator_busy
  • 413 payload_too_large
  • 422 invalid_request
  • 429 billing_limit_reached, rate_limited
  • 503 auth_unavailable, billing_unavailable, limits_unavailable
discounts.updateRename a discount

PATCH /api/v1/discounts/{discount_id}

Change the name of a discount, at Stripe (which shows it to buyers) and in Keyseal; nothing else of a discount can change. A discount that is unavailable is 409 discount_unavailable. The restricted key needs Coupons: write and Promotion Codes: write, which the connection does not require: without them, 422 stripe_permissions_missing names them in missing. Returns the discount.

Who may call: A person with the role admin or owner; an API key with the right admin.

MCP
discounts_update
CLI
keyseal discounts rename
Parameters
  • discount_id (path, required)
  • Idempotency-Key (header)
  • name (body, required)
HTTP responses
  • 200 Successful Response
  • 401 unauthenticated
  • 403 forbidden, scope_mismatch
  • 404 discount_not_found, not_found
  • 409 discount_product_not_on_stripe, discount_unavailable, idempotency_key_in_progress, operator_busy, stripe_not_connected
  • 413 payload_too_large
  • 422 idempotency_key_reused, invalid_discount, invalid_request, stripe_permissions_missing
  • 429 billing_limit_reached, rate_limited
  • 503 auth_unavailable, billing_unavailable, limits_unavailable, stripe_unavailable
discounts.codes.createCreate codes of a discount

POST /api/v1/discounts/{discount_id}/codes

Make either one chosen code (code, kept in upper case) or a series of count (1 to 50) single-use codes series_prefix-XXXXXXXX, as promotion codes on the publisher's Stripe account. A chosen code already active on that account (which other applications may share) or already kept by Keyseal is 409 discount_code_taken. max_redemptions, expires_at (in the future), note and active are optional. When some codes are made and the rest is stopped (Stripe unreachable, a lost answer), the answer is 201 with the codes made in created and why in failed: ask again for the rest, as a new request (the same Idempotency-Key answers the same partial result again). A refusal with nothing made is an error. A suspended publisher makes none (403 publisher_suspended). The restricted key needs Coupons: write and Promotion Codes: write, which the connection does not require: without them, 422 stripe_permissions_missing names them in missing.

Irreversible: a code's text, end date and number of uses never change, and a code is never deleted: it can only be deactivated.

Who may call: A person with the role admin or owner; an API key with the right admin.

MCP
discounts_codes_create
CLI
keyseal discounts codes create
Parameters
  • discount_id (path, required)
  • Idempotency-Key (header)
  • active (body)
  • code (body)
  • count (body)
  • expires_at (body)
  • max_redemptions (body)
  • note (body)
  • series_prefix (body)
HTTP responses
  • 201 Successful Response
  • 401 unauthenticated
  • 403 forbidden, publisher_suspended, scope_mismatch
  • 404 discount_not_found, not_found
  • 409 discount_code_taken, discount_product_not_on_stripe, discount_unavailable, idempotency_key_in_progress, operator_busy, stripe_not_connected
  • 413 payload_too_large
  • 422 idempotency_key_reused, invalid_discount, invalid_request, stripe_permissions_missing
  • 429 billing_limit_reached, rate_limited
  • 503 auth_unavailable, billing_unavailable, limits_unavailable, stripe_unavailable

Emails

emails.templates.listList the texts of the mails to buyers

GET /api/v1/email-templates

The publisher's words (subject, introduction, conclusion) in every editable kind of mail to buyers (licence_issued, renewal_confirmed, renewal_link, payment_failed, licence_revoked, licence_suspended, licence_reinstated), in both languages, always in the same order, for the environment of the request (a text is tried in test without touching live). Each comes with its variables (the names allowed between {{ and }}), Keyseal's own text in default as the buyer would read it with sample data (to read, not to save back), and the publisher's in custom (null for none). A text holds for every cause of its kind: the licence_revoked text also goes out for a Stripe refund or a lost dispute, the licence_suspended one for an opened dispute.

Who may call: Any member of the organization; an API key with the right read (or admin, which implies every right).

MCP
emails_templates_list
CLI
keyseal api GET /api/v1/email-templates
HTTP responses
  • 200 Successful Response
  • 401 unauthenticated
  • 403 forbidden, scope_mismatch
  • 404 not_found
  • 409 operator_busy
  • 413 payload_too_large
  • 422 invalid_request
  • 429 billing_limit_reached, rate_limited
  • 503 auth_unavailable, billing_unavailable, limits_unavailable
emails.templates.previewPreview a mail with given texts

POST /api/v1/email-templates/{kind}/preview

Render a mail of one editable kind with the zones of the body (locale required; a zone left out or blank: Keyseal's text; the saved texts are not read), the brand of the scope and sample data: a made-up buyer, product and plan, the dummy key DEMO-XXXXX-XXXXX-XXXXX-XXXXX, links that all lead to the customer area. Never a real licence nor a link carrying a token; in test the subject carries [TEST], as the real mail does. Nothing is written and nothing is sent. Returns subject, html and text.

Who may call: Any member of the organization; an API key with the right read (or admin, which implies every right).

Idempotency: this POST only reads, it changes nothing: retrying it is safe, and an Idempotency-Key is ignored (nothing is kept, no answer replayed).

MCP
emails_templates_preview
CLI
keyseal api POST /api/v1/email-templates/{kind}/preview
Parameters
  • kind (path, required)
  • intro (body)
  • locale (body, required)
  • outro (body)
  • subject (body)
HTTP responses
  • 200 Successful Response
  • 401 unauthenticated
  • 403 forbidden, scope_mismatch
  • 404 not_found
  • 409 operator_busy
  • 413 payload_too_large
  • 422 invalid_request, invalid_template
  • 429 billing_limit_reached, rate_limited
  • 503 auth_unavailable, billing_unavailable, limits_unavailable
emails.templates.resetPut back Keyseal's text of a kind of mail

DELETE /api/v1/email-templates/{kind}/{locale}

Delete the publisher's text of one kind and language: the mails of that kind carry Keyseal's text again. Nothing to delete is not an error. Returns 204.

Irreversible: the publisher's text is deleted: to have it back, write it again.

Who may call: A person with the role admin or owner; an API key with the right admin.

MCP
emails_templates_reset
CLI
keyseal api DELETE /api/v1/email-templates/{kind}/{locale}
Parameters
  • kind (path, required)
  • locale (path, required)
  • Idempotency-Key (header)
HTTP responses
  • 204 Successful Response
  • 401 unauthenticated
  • 403 forbidden, scope_mismatch
  • 404 not_found
  • 409 idempotency_key_in_progress, operator_busy
  • 413 payload_too_large
  • 422 idempotency_key_reused, invalid_request
  • 429 billing_limit_reached, rate_limited
  • 503 auth_unavailable, billing_unavailable, limits_unavailable
emails.templates.saveWrite the texts of a kind of mail

PUT /api/v1/email-templates/{kind}/{locale}

Write the publisher's three zones of one editable kind ({kind}) and language ({locale}: fr or en) at once: subject (150 characters at most, on one line), intro and outro (2000 characters at most each, paragraphs apart by a blank line). A zone left out or blank keeps Keyseal's text, and three blank zones are Keyseal's text again (as emails.templates.reset). A zone naming between {{ and }} what is not a variable of its kind is 422 invalid_template (zone and variable say which). Non-editable kinds (including updates_ending) and unknown languages return 404 not_found. Returns the template, as emails.templates.list gives it.

Who may call: A person with the role admin or owner; an API key with the right admin.

MCP
emails_templates_save
CLI
keyseal api PUT /api/v1/email-templates/{kind}/{locale}
Parameters
  • kind (path, required)
  • locale (path, required)
  • Idempotency-Key (header)
  • intro (body)
  • outro (body)
  • subject (body)
HTTP responses
  • 200 Successful Response
  • 401 unauthenticated
  • 403 forbidden, scope_mismatch
  • 404 not_found
  • 409 idempotency_key_in_progress, operator_busy
  • 413 payload_too_large
  • 422 idempotency_key_reused, invalid_request, invalid_template
  • 429 billing_limit_reached, rate_limited
  • 503 auth_unavailable, billing_unavailable, limits_unavailable
emails.listRead the journal of the mails to buyers

GET /api/v1/emails

The mails to buyers of the environment of the request, newest first, by pages, filtered by licence_id (lic_…) and customer_id: their kind, their status (queued, sending, sent, delivered, bounced, complained, failed, expired), when they were made and sent, their last error. Never the address (recipient_ref is a digest of it) nor the text; a free message (publisher_message) shows its subject and body_length. The invitations of members are not here (members.invitations.list).

Who may call: Any member of the organization; an API key with the right read or licences (or admin, which implies every right).

MCP
emails_list
CLI
keyseal emails list
Parameters
  • licence_id (query)
  • customer_id (query)
  • limit (query)
  • cursor (query)
HTTP responses
  • 200 Successful Response
  • 401 unauthenticated
  • 403 forbidden, scope_mismatch
  • 404 not_found
  • 409 operator_busy
  • 413 payload_too_large
  • 422 invalid_request
  • 429 billing_limit_reached, rate_limited
  • 503 auth_unavailable, billing_unavailable, limits_unavailable

Events

events.listRead the journal of every licence

GET /api/v1/events

The journal of every licence of the environment of the request, newest first, by pages, filtered by kind (issued, activated, status_changed, subscription_linked…) and licence_id (lic_…). Each event as licences.events.list gives it.

Who may call: Any member of the organization; an API key with the right read or licences (or admin, which implies every right).

MCP
events_list
CLI
keyseal api GET /api/v1/events
Parameters
  • kind (query)
  • licence_id (query)
  • limit (query)
  • cursor (query)
HTTP responses
  • 200 Successful Response
  • 401 unauthenticated
  • 403 forbidden, scope_mismatch
  • 404 not_found
  • 409 operator_busy
  • 413 payload_too_large
  • 422 invalid_request
  • 429 billing_limit_reached, rate_limited
  • 503 auth_unavailable, billing_unavailable, limits_unavailable

Imports

imports.listList the imports

GET /api/v1/imports

The imports of the environment of the request, the most recent first, without their report. status: queued, running, done, failed (last_error says why: ls_key_invalid, ls_store_not_found, ls_network, ls_rate_limited…) or finished.

Who may call: Any member of the organization; an API key with the right read (or admin, which implies every right).

MCP
imports_list
CLI
keyseal imports ls status
HTTP responses
  • 200 Successful Response
  • 401 unauthenticated
  • 403 forbidden, scope_mismatch
  • 404 not_found
  • 409 operator_busy
  • 413 payload_too_large
  • 422 invalid_request
  • 429 billing_limit_reached, rate_limited
  • 503 auth_unavailable, billing_unavailable, limits_unavailable
imports.startStart the import of a Lemon Squeezy store

POST /api/v1/imports/lemonsqueezy

Import a Lemon Squeezy store into the environment of the request: its products, variants, customers, orders, licence keys and instances. Body: the store's Lemon Squeezy api_key and its store_id (a number or a string). Keyseal asks Lemon Squeezy for the store before writing anything (422 ls_key_invalid, 422 ls_store_not_found, 503 ls_unavailable), then queues the import: the worker runs it, and it can be replayed until it is finished. An environment has one unfinished import at a time (409 import_running). The key is sealed for the time of the import, never returned (only key_hint, its last 4 characters), and erased by imports.finish. Returns 202 with the import, queued: follow it with imports.get.

Who may call: A person with the role admin or owner; an API key with the right admin.

MCP
imports_start
CLI
keyseal imports ls start
Parameters
  • Idempotency-Key (header)
  • api_key (body, required)
  • store_id (body, required)
HTTP responses
  • 202 Successful Response
  • 401 unauthenticated
  • 403 forbidden, scope_mismatch
  • 404 not_found
  • 409 idempotency_key_in_progress, import_running, operator_busy
  • 413 payload_too_large
  • 422 idempotency_key_reused, invalid_request, ls_key_invalid, ls_store_not_found
  • 429 billing_limit_reached, rate_limited
  • 503 auth_unavailable, billing_unavailable, limits_unavailable, ls_unavailable
imports.getRead an import and its report

GET /api/v1/imports/{import_id}

One import (imp_…) with its report: the counts per type, the objects skipped with their reason (key_exists, key_exists_other_environment…) and the actions left to the publisher. Once finished, the report also has unlinked_subscriptions and, if a run was under way, interrupted: true.

Who may call: Any member of the organization; an API key with the right read (or admin, which implies every right).

MCP
imports_get
CLI
keyseal imports ls report
Parameters
  • import_id (path, required)
HTTP responses
  • 200 Successful Response
  • 401 unauthenticated
  • 403 forbidden, scope_mismatch
  • 404 not_found
  • 409 operator_busy
  • 413 payload_too_large
  • 422 invalid_request
  • 429 billing_limit_reached, rate_limited
  • 503 auth_unavailable, billing_unavailable, limits_unavailable
imports.finishFinish an import for good

POST /api/v1/imports/{import_id}/finish

End the import: its sealed Lemon Squeezy key is erased and it is never replayed again; a run under way stops at its next batch. The report stays, with unlinked_subscriptions (the imported subscription licences with neither an end nor a linked Stripe subscription: nothing stops them any more) and interrupted: true if a run was under way. Already finished: 409 import_finished. Returns the import, finished.

Irreversible: a finished import is never replayed, and its Lemon Squeezy key is erased.

Who may call: A person with the role admin or owner; an API key with the right admin.

MCP
imports_finish
CLI
keyseal imports ls finish
Parameters
  • import_id (path, required)
  • Idempotency-Key (header)
HTTP responses
  • 200 Successful Response
  • 401 unauthenticated
  • 403 forbidden, scope_mismatch
  • 404 not_found
  • 409 idempotency_key_in_progress, import_finished, import_running, operator_busy
  • 413 payload_too_large
  • 422 idempotency_key_reused, invalid_request
  • 429 billing_limit_reached, rate_limited
  • 503 auth_unavailable, billing_unavailable, limits_unavailable
imports.replayReplay an import

POST /api/v1/imports/{import_id}/replay

Queue a done or failed import again: the next run follows what changed at Lemon Squeezy, doubling nothing. It rewrites from Lemon Squeezy the status of the licences it imported (but those linked to their Stripe subscription), so a suspension made by hand may be undone. Queued or running: 409 import_running; finished: 409 import_finished. Returns 202 with the import, queued, without the last_error, started_at and ended_at of the previous run.

Who may call: A person with the role admin or owner; an API key with the right admin.

MCP
imports_replay
CLI
keyseal imports ls replay
Parameters
  • import_id (path, required)
  • Idempotency-Key (header)
HTTP responses
  • 202 Successful Response
  • 401 unauthenticated
  • 403 forbidden, scope_mismatch
  • 404 not_found
  • 409 idempotency_key_in_progress, import_finished, import_running, operator_busy
  • 413 payload_too_large
  • 422 idempotency_key_reused, invalid_request
  • 429 billing_limit_reached, rate_limited
  • 503 auth_unavailable, billing_unavailable, limits_unavailable
imports.matches.listPropose the Stripe subscriptions to link to imported licences

GET /api/v1/imports/{import_id}/subscription-matches

For an import done or finished (otherwise 409 import_running): pairs of a subscription that Stripe's migration tool made again on the connected account and an imported subscription licence, matched by the holder's address and by the product of the subscription's price. Stripe is read and nothing is written: nothing is linked until imports.matches.confirm. Each pair has a signed match_id, confirmable, and a reason: same_email_same_product; expired_at_ls (a licence Lemon Squeezy ended once its subscription left, which linking makes active again); price_without_plan (a price of no Keyseal plan: plan is null, the pair is not confirmable). truncated: more than 10,000 active subscriptions, the rest not read.

Who may call: Any member of the organization; an API key with the right read (or admin, which implies every right).

MCP
imports_matches_list
CLI
keyseal api GET /api/v1/imports/{import_id}/subscription-matches
Parameters
  • import_id (path, required)
HTTP responses
  • 200 Successful Response
  • 401 unauthenticated
  • 403 forbidden, scope_mismatch
  • 404 not_found
  • 409 import_running, operator_busy, stripe_not_connected
  • 413 payload_too_large
  • 422 invalid_request, stripe_key_invalid, stripe_permissions_missing
  • 429 billing_limit_reached, rate_limited
  • 503 auth_unavailable, billing_unavailable, limits_unavailable, stripe_unavailable
imports.matches.confirmLink proposed subscriptions to their licences

POST /api/v1/imports/{import_id}/subscription-matches/confirm

Link the pairs named by match_ids (1 to 50, from imports.matches.list), each on its own, in the order given. Each pair is read again, in Keyseal then at Stripe, and refused if either side changed since the proposal. A linked licence follows its Stripe subscription from then on: it ends with the subscription's current period (plus 3 days of grace while it runs), an expired or suspended one becomes active, the next invoice extends it; Keyseal then sets its metadata (app=keyseal, keyseal_*) on the subscription at Stripe. Returns one result per pair: outcome linked, already_linked, stale (read the proposals again), not_confirmable, or failed (Stripe unreachable, its key refused or a permission missing: the following pairs are not tried), with its code; tag_pending: true when Stripe did not take the metadata yet (confirm the same pair again).

Irreversible: no operation of this API unlinks a licence from its subscription.

Who may call: A person with the role admin or owner; an API key with the right admin.

MCP
imports_matches_confirm
CLI
keyseal api POST /api/v1/imports/{import_id}/subscription-matches/confirm
Parameters
  • import_id (path, required)
  • Idempotency-Key (header)
  • match_ids (body, required)
HTTP responses
  • 200 Successful Response
  • 401 unauthenticated
  • 403 forbidden, scope_mismatch
  • 404 not_found
  • 409 idempotency_key_in_progress, import_running, operator_busy, stripe_not_connected
  • 413 payload_too_large
  • 422 idempotency_key_reused, invalid_request
  • 429 billing_limit_reached, rate_limited
  • 503 auth_unavailable, billing_unavailable, limits_unavailable

Licences

licences.listList and search the licences

GET /api/v1/licences

The licences of the environment of the request, newest first, by pages (limit, cursor). Filters, combined: email (the customer's whole address, any case); product_id, plan_id, customer_id; status, the stored status (active, suspended, revoked, expired); state, what the licence is now (revoked, else suspended, else expired when its status is expired or its valid_until has passed, else active): a licence whose paid period ended keeps status=active and is state=expired; q, either a whole licence key (found by its digest, never by a piece of it) or the start of the holder's address, any case (blank: 422 invalid_request). No answer carries a licence key, only its last 4 characters (key_last4).

Who may call: Any member of the organization; an API key with the right read or licences (or admin, which implies every right).

MCP
licences_list
CLI
keyseal licences list
Parameters
  • email (query)
  • product_id (query)
  • plan_id (query)
  • customer_id (query)
  • status (query)
  • state (query)
  • q (query)
  • limit (query)
  • cursor (query)
HTTP responses
  • 200 Successful Response
  • 401 unauthenticated
  • 403 forbidden, scope_mismatch
  • 404 not_found
  • 409 operator_busy
  • 413 payload_too_large
  • 422 invalid_request
  • 429 billing_limit_reached, rate_limited
  • 503 auth_unavailable, billing_unavailable, limits_unavailable
licences.getRead a licence

GET /api/v1/licences/{licence_id}

One licence (lic_…) with its active machines (activations), and in subscription the Stripe subscription that pays for it as Stripe last told Keyseal (null when none does; stripe_dashboard_url leads to it). open_dispute is true while an order of the licence is under an open Stripe dispute (reinstating it is then refused); status_before_suspension is the status it had before its last suspension (null if Keyseal never suspended it). Never the key: only key_last4.

Who may call: Any member of the organization; an API key with the right read or licences (or admin, which implies every right).

MCP
licences_get
CLI
keyseal licences show
Parameters
  • licence_id (path, required)
HTTP responses
  • 200 Successful Response
  • 401 unauthenticated
  • 403 forbidden, scope_mismatch
  • 404 not_found
  • 409 operator_busy
  • 413 payload_too_large
  • 422 invalid_request
  • 429 billing_limit_reached, rate_limited
  • 503 auth_unavailable, billing_unavailable, limits_unavailable
licences.activations.releaseRelease a machine of a licence

POST /api/v1/licences/{licence_id}/activations/{activation_id}/release

Free the seat of one machine (act_…) of the licence for another machine; the licence's journal says so (activation_released, naming the caller). A machine no longer active (a revoked licence's among them) changes nothing; one of another licence is 404 not_found. Returns 204.

Who may call: Any member of the organization; an API key with the right licences (or admin, which implies every right).

MCP
licences_activations_release
CLI
keyseal licences release-machine
Parameters
  • licence_id (path, required)
  • activation_id (path, required)
  • Idempotency-Key (header)
HTTP responses
  • 204 Successful Response
  • 401 unauthenticated
  • 403 forbidden, scope_mismatch
  • 404 not_found
  • 409 idempotency_key_in_progress, operator_busy
  • 413 payload_too_large
  • 422 idempotency_key_reused, invalid_request
  • 429 billing_limit_reached, rate_limited
  • 503 auth_unavailable, billing_unavailable, limits_unavailable
licences.events.listRead the journal of a licence

GET /api/v1/licences/{licence_id}/events

The journal of one licence (lic_…), newest first, by pages: what happened (kind), when, by whom (actor: user:<id>, api_key:<id>, stripe:<event>, import:imp_…, customer:<id>, client, ls-compat, cli), and data, shown through a list of keys per kind: never a licence key, a token or an address.

Who may call: Any member of the organization; an API key with the right read or licences (or admin, which implies every right).

MCP
licences_events_list
CLI
keyseal licences events
Parameters
  • licence_id (path, required)
  • limit (query)
  • cursor (query)
HTTP responses
  • 200 Successful Response
  • 401 unauthenticated
  • 403 forbidden, scope_mismatch
  • 404 not_found
  • 409 operator_busy
  • 413 payload_too_large
  • 422 invalid_request
  • 429 billing_limit_reached, rate_limited
  • 503 auth_unavailable, billing_unavailable, limits_unavailable
licences.reinstateReinstate a suspended licence

POST /api/v1/licences/{licence_id}/reinstate

Lift the licence's suspension: it gets back the status it had before (active, or expired for a licence suspended after it expired). The body (notify) may be left out. An open Stripe dispute on an order of the licence is 409 licence_dispute_open; a revoked licence is 409 licence_revoked; a licence that is not suspended answers 200 with changed: false, nothing written or sent. A licence whose paid period ended while it was suspended comes back active with its valid_until passed, still unusable. Returns the licence as licences.get gives it, with changed.

Sends a mail: only with notify: true, if the status changed and the licence is usable now (active, its valid_until empty or to come): the licence_reinstated mail to the holder.

Who may call: Any member of the organization; an API key with the right licences (or admin, which implies every right).

MCP
licences_reinstate
CLI
keyseal licences reinstate
Parameters
  • licence_id (path, required)
  • Idempotency-Key (header)
  • notify (body)
HTTP responses
  • 200 Successful Response
  • 401 unauthenticated
  • 403 forbidden, scope_mismatch
  • 404 not_found
  • 409 idempotency_key_in_progress, licence_dispute_open, licence_revoked, operator_busy
  • 413 payload_too_large
  • 422 idempotency_key_reused, invalid_request
  • 429 billing_limit_reached, rate_limited
  • 503 auth_unavailable, billing_unavailable, limits_unavailable
licences.renewal_links.createMake a renewal link for a licence

POST /api/v1/licences/{licence_id}/renewal-link

A link by which the customer renews the licence (lic_…) with a renewal plan of its product (plan_id): valid 30 days, usable as many times as wanted, in the customer's language (with environment=test for a licence of test). Nothing is written and Stripe is not called: the payment opens when the link is followed. A plan that does not renew this licence (not a renewal plan, another product's, a subscription's licence or one whose plan has no updates, a revoked licence) is 404 not_for_sale. With send: true the link also goes by mail to the customer and the answer carries email_id; a customer without an address is 409 customer_has_no_email, and nothing is queued. Returns url and expires_at, never cached: the link is a capability.

Sends a mail: with send: true only: the renewal_link mail to the customer, once per call.

Who may call: A person with the role admin or owner; an API key with the right licences (or admin, which implies every right).

MCP
licences_renewal_links_create
CLI
keyseal licences renewal-link
Parameters
  • licence_id (path, required)
  • Idempotency-Key (header)
  • plan_id (body, required)
  • send (body)
HTTP responses
  • 200 Successful Response
  • 401 unauthenticated
  • 403 forbidden, scope_mismatch
  • 404 not_for_sale, not_found
  • 409 customer_has_no_email, idempotency_key_in_progress, operator_busy
  • 413 payload_too_large
  • 422 idempotency_key_reused, invalid_request
  • 429 billing_limit_reached, rate_limited
  • 503 auth_unavailable, billing_unavailable, limits_unavailable
licences.revokeRevoke a licence

POST /api/v1/licences/{licence_id}/revoke

Revoke the licence (lic_…) and its active machines, with a reason (1 to 200 characters, kept in the licence's journal). It stays possible under an open Stripe dispute. Keyseal does not call Stripe: a subscription that pays for the licence goes on charging the buyer (subscription in the answer); cancel it in Stripe, and refund there too. A licence already revoked is 409 licence_revoked. Returns the licence as licences.get gives it, with changed.

Sends a mail: only with notify: true, and only if the status changed: the licence_revoked mail to the holder (none to a holder without an address).

Irreversible: a revoked licence never comes back, and its machines are revoked with it. Afterwards licences.revoke, licences.suspend and licences.reinstate answer 409 licence_revoked; licences.send_key answers 404 not_found (its key is dead); licences.renewal_links.create answers 404 not_for_sale; licences.activations.release answers 204 and changes nothing (no machine is active any more).

Who may call: Any member of the organization; an API key with the right licences (or admin, which implies every right).

MCP
licences_revoke
CLI
keyseal licences revoke
Parameters
  • licence_id (path, required)
  • Idempotency-Key (header)
  • notify (body)
  • reason (body, required)
HTTP responses
  • 200 Successful Response
  • 401 unauthenticated
  • 403 forbidden, scope_mismatch
  • 404 not_found
  • 409 idempotency_key_in_progress, licence_revoked, operator_busy
  • 413 payload_too_large
  • 422 idempotency_key_reused, invalid_request
  • 429 billing_limit_reached, rate_limited
  • 503 auth_unavailable, billing_unavailable, limits_unavailable
licences.send_keySend a licence's key to its customer again

POST /api/v1/licences/{licence_id}/send-key

Queue the licence mail again, with the key, to the customer's address: the answer to a buyer who lost their key. Every call sends a mail, even when the purchase mail already went. A revoked licence is 404 not_found (its key is dead); a customer without an address is 409 customer_has_no_email. Returns 202 with email_id: the mail is queued and the worker sends it (emails.list shows how it went).

Sends a mail: the licence_issued mail, with the licence key, to the customer, on every call.

Who may call: Any member of the organization; an API key with the right licences (or admin, which implies every right).

MCP
licences_send_key
CLI
keyseal licences send-key
Parameters
  • licence_id (path, required)
  • Idempotency-Key (header)
HTTP responses
  • 202 Successful Response
  • 401 unauthenticated
  • 403 forbidden, scope_mismatch
  • 404 not_found
  • 409 customer_has_no_email, idempotency_key_in_progress, operator_busy
  • 413 payload_too_large
  • 422 idempotency_key_reused, invalid_request
  • 429 billing_limit_reached, rate_limited
  • 503 auth_unavailable, billing_unavailable, limits_unavailable
licences.suspendSuspend a licence

POST /api/v1/licences/{licence_id}/suspend

Suspend the licence (lic_…) with a reason (1 to 200 characters, kept in the licence's journal): its machines stay, unusable while it is suspended, and licences.reinstate lifts it. A licence already suspended (an open Stripe dispute suspends it too) answers 200 with changed: false: nothing written or sent. A revoked licence is 409 licence_revoked. Keyseal does not call Stripe: a subscription that pays for the licence goes on charging the buyer (subscription in the answer); pause or cancel it in Stripe. A licence imported from Lemon Squeezy follows its import until the import is finished: a replay rewrites its status from Lemon Squeezy and may undo the suspension. Returns the licence as licences.get gives it, with changed.

Sends a mail: only with notify: true, and only if the status changed: the licence_suspended mail to the holder (none to a holder without an address).

Who may call: Any member of the organization; an API key with the right licences (or admin, which implies every right).

MCP
licences_suspend
CLI
keyseal licences suspend
Parameters
  • licence_id (path, required)
  • Idempotency-Key (header)
  • notify (body)
  • reason (body, required)
HTTP responses
  • 200 Successful Response
  • 401 unauthenticated
  • 403 forbidden, scope_mismatch
  • 404 not_found
  • 409 idempotency_key_in_progress, licence_revoked, operator_busy
  • 413 payload_too_large
  • 422 idempotency_key_reused, invalid_request
  • 429 billing_limit_reached, rate_limited
  • 503 auth_unavailable, billing_unavailable, limits_unavailable

Members

members.invitations.listList the open invitations

GET /api/v1/organization/invitations

The open invitations of the organization (neither accepted, withdrawn nor expired), the most recent first, all of them (no cursor). mail_status says how the invitation's mail went (queued, sending, sent, delivered, bounced, complained, failed, expired) and mail_error the code of a failure: a mail that did not arrive is a reason to invite again. Never the link nor its token.

Who may call: A person with the role admin or owner; an API key of live with the right admin. Members are the organization's, in both environments: a key of test gets 403 forbidden.

MCP
members_invitations_list
CLI
keyseal api GET /api/v1/organization/invitations
HTTP responses
  • 200 Successful Response
  • 401 unauthenticated
  • 403 forbidden, scope_mismatch
  • 404 not_found
  • 409 operator_busy
  • 413 payload_too_large
  • 422 invalid_request
  • 429 billing_limit_reached, rate_limited
  • 503 auth_unavailable, billing_unavailable, limits_unavailable
members.invitations.createInvite a member by mail

POST /api/v1/organization/invitations

Invite an address to join the organization, in both environments, with the role member or admin: a link sent by mail, valid 7 days, good once and only for the person of that address (the address their account was verified with at its first sign-in). locale (fr by default, or en) is the language of the mail. Inviting an address again replaces its open invitation: the old link stops working, and its mail, if not sent yet, is not sent. An address that is already a member's is 409 already_member. At most 50 invitations per 24 hours per organization, and 50 per person across all their organizations (429 invitation_limit_reached). Without a mail provider configured nothing is made (503 mail_unavailable). Returns 201 with the invitation (mail_status: queued), never its token.

Sends a mail: the member_invitation mail, with its link, to the address invited, once per call.

Who may call: A person with the role admin or owner; an API key of live with the right admin. Members are the organization's, in both environments: a key of test gets 403 forbidden. Inviting an admin is for an owner in person (403 forbidden for an admin or an API key).

MCP
members_invitations_create
CLI
keyseal api POST /api/v1/organization/invitations
Parameters
  • Idempotency-Key (header)
  • email (body, required)
  • locale (body)
  • role (body, required)
HTTP responses
  • 201 Successful Response
  • 401 unauthenticated
  • 403 forbidden, scope_mismatch
  • 404 not_found
  • 409 already_member, idempotency_key_in_progress, operator_busy
  • 413 payload_too_large
  • 422 idempotency_key_reused, invalid_request
  • 429 billing_limit_reached, invitation_limit_reached, rate_limited
  • 503 auth_unavailable, billing_unavailable, limits_unavailable, mail_unavailable
members.invitations.revokeWithdraw an invitation

DELETE /api/v1/organization/invitations/{invitation_id}

Withdraw an open invitation (inv_…): its link stops working. An invitation unknown, of another organization, already accepted, withdrawn or expired is 404 not_found. Returns 204.

Irreversible: the link of a withdrawn invitation never works again: invite anew.

Who may call: A person with the role admin or owner; an API key of live with the right admin. Members are the organization's, in both environments: a key of test gets 403 forbidden.

MCP
members_invitations_revoke
CLI
keyseal api DELETE /api/v1/organization/invitations/{invitation_id}
Parameters
  • invitation_id (path, required)
  • Idempotency-Key (header)
HTTP responses
  • 204 Successful Response
  • 401 unauthenticated
  • 403 forbidden, scope_mismatch
  • 404 not_found
  • 409 idempotency_key_in_progress, operator_busy
  • 413 payload_too_large
  • 422 idempotency_key_reused, invalid_request
  • 429 billing_limit_reached, rate_limited
  • 503 auth_unavailable, billing_unavailable, limits_unavailable
members.listList the members

GET /api/v1/organization/members

The members of the organization with their role, sorted by address. A membership holds for both environments. New members are invited (members.invitations.create), never added by address.

Who may call: Any member of the organization; any API key of the organization, whatever its rights.

MCP
members_list
CLI
keyseal api GET /api/v1/organization/members
HTTP responses
  • 200 Successful Response
  • 401 unauthenticated
  • 403 forbidden, scope_mismatch
  • 404 not_found
  • 409 operator_busy
  • 413 payload_too_large
  • 422 invalid_request
  • 429 billing_limit_reached, rate_limited
  • 503 auth_unavailable, billing_unavailable, limits_unavailable
members.removeRemove a member

DELETE /api/v1/organization/members/{user_id}

Remove a member from the organization, in both environments: the API keys they own in it are revoked and the open invitations they sent withdrawn (their keys in other organizations are untouched). The last owner cannot be removed (409 last_owner). Someone who is not a member of this organization is 404 not_found. Returns 204.

Irreversible: the member's API keys stay revoked; to come back, the person is invited again.

Who may call: A person with the role admin or owner; an API key of live with the right admin. Members are the organization's, in both environments: a key of test gets 403 forbidden. Removing an owner is for an owner in person (403 forbidden otherwise).

MCP
members_remove
CLI
keyseal api DELETE /api/v1/organization/members/{user_id}
Parameters
  • user_id (path, required)
  • Idempotency-Key (header)
HTTP responses
  • 204 Successful Response
  • 401 unauthenticated
  • 403 forbidden, scope_mismatch
  • 404 not_found
  • 409 idempotency_key_in_progress, last_owner, operator_busy
  • 413 payload_too_large
  • 422 idempotency_key_reused, invalid_request
  • 429 billing_limit_reached, rate_limited
  • 503 auth_unavailable, billing_unavailable, limits_unavailable
members.set_roleChange a member's role

PATCH /api/v1/organization/members/{user_id}

Set the role of a member: member, admin or owner. Made member, they lose the API keys they own in the organization (revoked, in both environments) and the open invitations they sent (withdrawn); an owner made admin loses the open invitations of admins they sent. The organization keeps at least one owner (409 last_owner). Someone who is not a member of this organization is 404 not_found. Returns the member with their new role.

Irreversible: the API keys revoked by a demotion to member stay revoked: giving the role back does not bring them back.

Who may call: A person with the role owner; an API key of live with the right admin, between member and admin only. Making or unmaking an owner is for an owner in person (403 forbidden otherwise); a key of test gets 403 forbidden.

MCP
members_set_role
CLI
keyseal api PATCH /api/v1/organization/members/{user_id}
Parameters
  • user_id (path, required)
  • Idempotency-Key (header)
  • role (body, required)
HTTP responses
  • 200 Successful Response
  • 401 unauthenticated
  • 403 forbidden, scope_mismatch
  • 404 not_found
  • 409 idempotency_key_in_progress, last_owner, operator_busy
  • 413 payload_too_large
  • 422 idempotency_key_reused, invalid_request
  • 429 billing_limit_reached, rate_limited
  • 503 auth_unavailable, billing_unavailable, limits_unavailable

Refunds

orders.refundRefund a sale

POST /api/v1/orders/{order_id}/refund

Ask the publisher's Stripe to refund a sale (a UUID): amount in minor units, 1 to the sale's refundable_amount (sales.get), or absent for all that remains; reason optional (requested_by_customer, duplicate, fraudulent). Refundable: a sale paid or partially_refunded, of more than 0, with a Stripe payment (a subscription's sale: the payment of its own invoice); otherwise 409 order_not_refundable. An amount above what remains is 422 refund_amount_too_large, refused before Stripe. Returns 202 with the refund Stripe made (id, amount, currency, status). Keyseal changes nothing itself: when Stripe confirms the refund, the sale becomes refunded or partially_refunded, as for a refund made in the Stripe Dashboard; a full refund takes back what the sale gave (a licence it created is revoked). A refund never cancels a subscription: cancel it in Stripe. A refusal of Stripe is 409 stripe_refused, with missing naming the permission to add to the restricted key when it lacks one (charge_write; invoice_read for a subscription's sale); Stripe unreachable is 503 stripe_unavailable. The Idempotency-Key is passed on to Stripe: the same request sent again, even after a lost answer, refunds once.

Sends a mail: none from this call; when Stripe confirms a refund that revokes the licence the sale created, Keyseal sends its holder the licence_revoked mail.

Irreversible: money refunded is not taken back, and a licence revoked by a full refund never comes back.

Who may call: A person with the role admin or owner; an API key with the right admin.

MCP
orders_refund
CLI
keyseal orders refund
Parameters
  • order_id (path, required)
  • Idempotency-Key (header)
  • amount (body)
  • reason (body)
HTTP responses
  • 202 Successful Response
  • 401 unauthenticated
  • 403 forbidden, scope_mismatch
  • 404 not_found
  • 409 idempotency_key_in_progress, operator_busy, order_not_refundable, stripe_not_connected, stripe_refused
  • 413 payload_too_large
  • 422 idempotency_key_reused, invalid_request, refund_amount_too_large
  • 429 billing_limit_reached, rate_limited
  • 503 auth_unavailable, billing_unavailable, limits_unavailable, stripe_unavailable

Organisation

organization.getRead the organization

GET /api/v1/organization

The organization and the environment of the request: its name, its support address and its brand (logo_url, brand_color), as the mails to buyers show them. reply_to_ok says whether support_email is a plain address, used as the Reply-To of those mails. sale_alerts says whether each owner gets a mail for each sale paid through the checkout page.

Who may call: Any member of the organization; any API key of the organization, whatever its rights.

MCP
organization_get
CLI
keyseal whoami
HTTP responses
  • 200 Successful Response
  • 401 unauthenticated
  • 403 forbidden, scope_mismatch
  • 404 not_found
  • 409 operator_busy
  • 413 payload_too_large
  • 422 invalid_request
  • 429 billing_limit_reached, rate_limited
  • 503 auth_unavailable, billing_unavailable, limits_unavailable
organization.updateUpdate the organization's name, support address, brand and sale alerts

PATCH /api/v1/organization

Change the fields sent among name, support_email (the Reply-To of the mails to buyers: a plain address, no display name), logo_url (an https:// address of 500 characters at most, displayed inline for Keyseal static images and the logo uploaded with organization.upload_logo, linked for external hosts; a new address, or null, withdraws the uploaded logo), brand_color (#RRGGBB) and sale_alerts (true or false: a mail to each owner for each sale paid through the checkout page, the purchase of a subscription included, its later invoices not; never null). A null clears any of them but name and sale_alerts. They hold for both environments. A refusal changes nothing (422 invalid_logo_url, 422 invalid_brand_color, or 422 invalid_request naming the field). Returns the organization, as organization.get does.

Who may call: A person with the role admin or owner; an API key of live with the right admin. Members are the organization's, in both environments: a key of test gets 403 forbidden.

MCP
organization_update
CLI
keyseal organization sale-alerts
Parameters
  • Idempotency-Key (header)
  • brand_color (body)
  • logo_url (body)
  • name (body)
  • sale_alerts (body)
  • support_email (body)
HTTP responses
  • 200 Successful Response
  • 401 unauthenticated
  • 403 forbidden, scope_mismatch
  • 404 not_found
  • 409 idempotency_key_in_progress, operator_busy
  • 413 payload_too_large
  • 422 idempotency_key_reused, invalid_brand_color, invalid_logo_url, invalid_request
  • 429 billing_limit_reached, rate_limited
  • 503 auth_unavailable, billing_unavailable, limits_unavailable

Releases and files

releases.files.deleteDelete a file of a release

DELETE /api/v1/files/{file_id}

Delete a file (fil_…), its object erased from the store once the deletion is committed. The last ready file of a published release is not deleted (409 release_has_no_ready_file): unpublish the release first, or delete it. Returns 204.

Irreversible: the file and its object are deleted for good.

Who may call: A person with the role admin or owner; an API key with the right files (or admin, which implies every right).

MCP
releases_files_delete
CLI
keyseal api DELETE /api/v1/files/{file_id}
Parameters
  • file_id (path, required)
  • Idempotency-Key (header)
HTTP responses
  • 204 Successful Response
  • 401 unauthenticated
  • 403 forbidden, scope_mismatch
  • 404 not_found
  • 409 idempotency_key_in_progress, operator_busy, release_has_no_ready_file
  • 413 payload_too_large
  • 422 idempotency_key_reused, invalid_request
  • 429 billing_limit_reached, rate_limited
  • 503 auth_unavailable, billing_unavailable, limits_unavailable, storage_unavailable
releases.files.complete_uploadComplete the upload of a file

POST /api/v1/files/{file_id}/complete

Step 3 of sending a file (fil_…): Keyseal reads the object in the store; present and of the declared size, the file becomes ready, served to buyers once its release is published. Otherwise 409 file_upload_incomplete, and the file stays pending, never served. Returns the file.

Who may call: A person with the role admin or owner; an API key with the right files (or admin, which implies every right).

MCP
releases_files_complete_upload
CLI
keyseal releases upload
Parameters
  • file_id (path, required)
  • Idempotency-Key (header)
HTTP responses
  • 200 Successful Response
  • 401 unauthenticated
  • 403 forbidden, scope_mismatch
  • 404 not_found
  • 409 file_upload_incomplete, idempotency_key_in_progress, operator_busy
  • 413 payload_too_large
  • 422 idempotency_key_reused, invalid_request
  • 429 billing_limit_reached, rate_limited
  • 503 auth_unavailable, billing_unavailable, limits_unavailable, storage_unavailable
releases.listList the releases of a product

GET /api/v1/products/{product_id}/releases

The releases of a product (a UUID) of the environment of the request, the most recent first (the drafts without a day, then by day, then by creation), each with its files. No answer carries the key of an object in the store.

Who may call: Any member of the organization; an API key with the right read or files (or admin, which implies every right).

MCP
releases_list
CLI
keyseal releases list
Parameters
  • product_id (path, required)
HTTP responses
  • 200 Successful Response
  • 401 unauthenticated
  • 403 forbidden, scope_mismatch
  • 404 not_found
  • 409 operator_busy
  • 413 payload_too_large
  • 422 invalid_request
  • 429 billing_limit_reached, rate_limited
  • 503 auth_unavailable, billing_unavailable, limits_unavailable
releases.createCreate a release of a product

POST /api/v1/products/{product_id}/releases

Create a release of a product, in draft: version (required; at most 64 characters among 0-9 A-Z a-z . + -, unique per product), notes (Markdown, kept as text), public (false by default), released_on (a day YYYY-MM-DD; none: publishing sets the day, in UTC). A version already taken is 409 release_version_taken, a malformed one 422 invalid_version. Then declare its files (releases.files.start_upload) and publish it (releases.publish). Returns 201 with the release.

Irreversible: the version of a release never changes.

Who may call: A person with the role admin or owner; an API key with the right files (or admin, which implies every right).

MCP
releases_create
CLI
keyseal releases create
Parameters
  • product_id (path, required)
  • Idempotency-Key (header)
  • notes (body)
  • public (body)
  • released_on (body)
  • update_major (body)
  • version (body, required)
HTTP responses
  • 201 Successful Response
  • 401 unauthenticated
  • 403 forbidden, scope_mismatch
  • 404 not_found
  • 409 idempotency_key_in_progress, operator_busy, release_version_taken
  • 413 payload_too_large
  • 422 idempotency_key_reused, invalid_request, invalid_version
  • 429 billing_limit_reached, rate_limited
  • 503 auth_unavailable, billing_unavailable, limits_unavailable
releases.deleteDelete a release and its files

DELETE /api/v1/releases/{release_id}

Delete the release, whatever its state, and all its files; their objects are erased from the store once the deletion is committed (an erasure that fails is logged, never fails the request, and the object is never served again). It works without a store configured. Returns 204.

Irreversible: the release and its files are deleted for good, with their objects.

Who may call: A person with the role admin or owner; an API key with the right files (or admin, which implies every right).

MCP
releases_delete
CLI
keyseal releases delete
Parameters
  • release_id (path, required)
  • Idempotency-Key (header)
HTTP responses
  • 204 Successful Response
  • 401 unauthenticated
  • 403 forbidden, scope_mismatch
  • 404 not_found
  • 409 idempotency_key_in_progress, operator_busy
  • 413 payload_too_large
  • 422 idempotency_key_reused, invalid_request
  • 429 billing_limit_reached, rate_limited
  • 503 auth_unavailable, billing_unavailable, limits_unavailable
releases.getRead a release

GET /api/v1/releases/{release_id}

One release (rel_…) of the environment of the request, with its files: their platform, name, size, SHA-256 and status (pending until their upload is complete, then ready).

Who may call: Any member of the organization; an API key with the right read or files (or admin, which implies every right).

MCP
releases_get
CLI
keyseal releases show
Parameters
  • release_id (path, required)
HTTP responses
  • 200 Successful Response
  • 401 unauthenticated
  • 403 forbidden, scope_mismatch
  • 404 not_found
  • 409 operator_busy
  • 413 payload_too_large
  • 422 invalid_request
  • 429 billing_limit_reached, rate_limited
  • 503 auth_unavailable, billing_unavailable, limits_unavailable
releases.updateUpdate a release

PATCH /api/v1/releases/{release_id}

Change the fields sent among notes, public and released_on; null is accepted only for the day of a draft, and the version never changes. Returns the release.

Who may call: A person with the role admin or owner; an API key with the right files (or admin, which implies every right).

MCP
releases_update
CLI
keyseal releases update
Parameters
  • release_id (path, required)
  • Idempotency-Key (header)
  • notes (body)
  • public (body)
  • released_on (body)
  • update_major (body)
HTTP responses
  • 200 Successful Response
  • 401 unauthenticated
  • 403 forbidden, scope_mismatch
  • 404 not_found
  • 409 idempotency_key_in_progress, operator_busy
  • 413 payload_too_large
  • 422 idempotency_key_reused, invalid_request
  • 429 billing_limit_reached, rate_limited
  • 503 auth_unavailable, billing_unavailable, limits_unavailable
releases.files.start_uploadDeclare a file of a release and get its upload address

POST /api/v1/releases/{release_id}/files

Step 1 of 3 of sending a file, whose bytes go straight to the object store, never through Keyseal. Declare the file of one platform (macos-universal, macos-arm64, macos-x64, windows-x64, windows-arm64, linux-x64, linux-arm64, any; one file per platform and release) with its filename (200 characters at most, without slash, backslash, double quote or control character), its size in bytes (at most the server's limit, 2 GiB by default: 413 file_too_large), its sha256 (64 hexadecimal digits, shown to buyers to check their download) and its content_type (application/octet-stream by default). Returns 201 with the file, pending, and upload_url, an address valid 15 minutes (upload_expires_at): step 2 is a PUT of the bytes to it, step 3 releases.files.complete_upload. Declaring again a platform still pending replaces it (a new id, a new address); one already ready is 409 file_platform_taken (delete that file first). Without a store configured: 503 storage_unavailable.

Who may call: A person with the role admin or owner; an API key with the right files (or admin, which implies every right).

MCP
releases_files_start_upload
CLI
keyseal releases upload
Parameters
  • release_id (path, required)
  • Idempotency-Key (header)
  • content_type (body)
  • filename (body, required)
  • platform (body, required)
  • sha256 (body, required)
  • size (body, required)
HTTP responses
  • 201 Successful Response
  • 401 unauthenticated
  • 403 forbidden, scope_mismatch
  • 404 not_found
  • 409 file_platform_taken, idempotency_key_in_progress, operator_busy
  • 413 file_too_large, payload_too_large
  • 422 idempotency_key_reused, invalid_filename, invalid_platform, invalid_request, invalid_sha256
  • 429 billing_limit_reached, rate_limited
  • 503 auth_unavailable, billing_unavailable, limits_unavailable, storage_unavailable
releases.publishPublish a release

POST /api/v1/releases/{release_id}/publish

Publish a draft that has at least one ready file: a release that is not a draft is 409 release_not_draft, one without a ready file 409 release_has_no_ready_file. A draft without released_on gets the day of its publication, in UTC. Returns the release, published.

Who may call: A person with the role admin or owner; an API key with the right files (or admin, which implies every right).

MCP
releases_publish
CLI
keyseal releases publish
Parameters
  • release_id (path, required)
  • Idempotency-Key (header)
HTTP responses
  • 200 Successful Response
  • 401 unauthenticated
  • 403 forbidden, scope_mismatch
  • 404 not_found
  • 409 idempotency_key_in_progress, operator_busy, release_has_no_ready_file, release_not_draft
  • 413 payload_too_large
  • 422 idempotency_key_reused, invalid_request
  • 429 billing_limit_reached, rate_limited
  • 503 auth_unavailable, billing_unavailable, limits_unavailable
releases.unpublishUnpublish a release

POST /api/v1/releases/{release_id}/unpublish

Put a published release back in draft; it keeps its day. Returns the release.

Who may call: A person with the role admin or owner; an API key with the right files (or admin, which implies every right).

MCP
releases_unpublish
CLI
keyseal releases unpublish
Parameters
  • release_id (path, required)
  • Idempotency-Key (header)
HTTP responses
  • 200 Successful Response
  • 401 unauthenticated
  • 403 forbidden, scope_mismatch
  • 404 not_found
  • 409 idempotency_key_in_progress, operator_busy
  • 413 payload_too_large
  • 422 idempotency_key_reused, invalid_request
  • 429 billing_limit_reached, rate_limited
  • 503 auth_unavailable, billing_unavailable, limits_unavailable

Sales

sales.listList the sales

GET /api/v1/orders

The sales (orders) of the environment of the request, newest first, by pages. Filters, combined: status (paid, partially_refunded, refunded, disputed, dispute_lost), product_id, customer_id, licence_id (the licence's lic_… id, a malformed one is 422 invalid_request; the sales that gave to this licence), since (included) and until (excluded), dates with a time zone (2026-03-01T00:00:00Z) bounding created_at, when Keyseal recorded the sale. product_id and customer_id are the plain UUIDs their objects carry. Amounts are the ones Stripe sent, in minor units. A refund, asked with orders.refund or made in Stripe, changes a sale when Stripe confirms it.

Who may call: Any member of the organization; an API key with the right read or customers (or admin, which implies every right).

MCP
sales_list
CLI
keyseal orders list
Parameters
  • status (query)
  • product_id (query)
  • customer_id (query)
  • licence_id (query)
  • since (query)
  • until (query)
  • limit (query)
  • cursor (query)
HTTP responses
  • 200 Successful Response
  • 401 unauthenticated
  • 403 forbidden, scope_mismatch
  • 404 not_found
  • 409 operator_busy
  • 413 payload_too_large
  • 422 invalid_request
  • 429 billing_limit_reached, rate_limited
  • 503 auth_unavailable, billing_unavailable, limits_unavailable
sales.getRead a sale

GET /api/v1/orders/{order_id}

One sale (a UUID) with what it granted (grants: a licence created, updates extended, a paid period; undone_at and undone_reason are set when a refund or a lost dispute took it back), its subscription (null for none), discount (the discount code made in Keyseal that this purchase used: the discount's and the code's ids, the discount's name and the amount taken off; never the code's text; null for none, and for the later invoices of a discounted subscription), and stripe_dashboard_url: the payment in the Stripe Dashboard of the environment (the invoice for a sale of a subscription; null for a sale known by its checkout session only), and refundable_amount: what orders.refund may still refund, in minor units (null when the sale cannot be refunded).

Who may call: Any member of the organization; an API key with the right read or customers (or admin, which implies every right).

MCP
sales_get
CLI
keyseal orders show
Parameters
  • order_id (path, required)
HTTP responses
  • 200 Successful Response
  • 401 unauthenticated
  • 403 forbidden, scope_mismatch
  • 404 not_found
  • 409 operator_busy
  • 413 payload_too_large
  • 422 invalid_request
  • 429 billing_limit_reached, rate_limited
  • 503 auth_unavailable, billing_unavailable, limits_unavailable

Stripe connection

stripe.disconnectDisconnect Stripe

DELETE /api/v1/stripe

Disconnect Stripe from the environment of the request: Keyseal's webhook endpoint is deleted at Stripe, the key and the webhook secret are forgotten, and the Stripe ids of the environment's products and prices are cleared; the licences do not change. Without force=true, a running subscription or an outstanding publisher checkout returns 409 stripe_active_subscriptions. If Keyseal cannot verify an expired checkout with Stripe, it keeps the endpoint and returns 409 stripe_connection_busy. The discount codes made in Keyseal are deactivated at Stripe first, then discounts and codes become unavailable for good, their history kept. Without force=true, if a code cannot be deactivated (Stripe unreachable, a dead or unreadable key, a right taken away, a creation or activation whose answer was lost and that may still land), the connection is kept and the answer is 409 stripe_discount_codes_active, which names them in codes (the codes already deactivated stay so). Returns 200 with disconnected and codes_still_active: after a forced disconnection, the codes that may still be active at Stripe, to deactivate by hand in its Dashboard (empty otherwise).

Irreversible: the key, the webhook secret and the Stripe ids of the catalogue are forgotten: connecting again takes a restricted key. The discount codes made in Keyseal never come back: new ones are made after connecting again.

Who may call: A person with the role admin or owner; an API key with the right admin.

MCP
stripe_disconnect
CLI
keyseal api DELETE /api/v1/stripe
Parameters
  • force (query)
  • Idempotency-Key (header)
HTTP responses
  • 200 Successful Response
  • 401 unauthenticated
  • 403 forbidden, scope_mismatch
  • 404 not_found
  • 409 idempotency_key_in_progress, operator_busy, stripe_active_subscriptions, stripe_connection_busy, stripe_discount_codes_active, stripe_not_connected
  • 413 payload_too_large
  • 422 idempotency_key_reused, invalid_request
  • 429 billing_limit_reached, rate_limited
  • 503 auth_unavailable, billing_unavailable, limits_unavailable
stripe.getRead the Stripe connection

GET /api/v1/stripe

The Stripe connection of the environment of the request: connected, the last 4 characters of the restricted key (key_hint), the webhook endpoint Keyseal made at Stripe (webhook_endpoint, null without one) and when the key was last checked (checked_at); never the key nor the webhook secret. Stripe is connected per environment: test with an rk_test_… key, live with an rk_live_… key.

Who may call: Any member of the organization; an API key with the right read or admin.

MCP
stripe_get
CLI
keyseal api GET /api/v1/stripe
HTTP responses
  • 200 Successful Response
  • 401 unauthenticated
  • 403 forbidden, scope_mismatch
  • 404 not_found
  • 409 operator_busy
  • 413 payload_too_large
  • 422 invalid_request
  • 429 billing_limit_reached, rate_limited
  • 503 auth_unavailable, billing_unavailable, limits_unavailable
stripe.connectConnect Stripe with a restricted key

PUT /api/v1/stripe

Connect (or connect again) the Stripe account of the environment of the request with a restricted key: rk_test_… in test, rk_live_… in live; a secret sk_… key is refused. Keyseal checks the key, its mode, its permissions and Managed Payments, makes its webhook endpoint at Stripe, then pushes the whole catalogue of the environment. Returns the connection and, in catalog, the report of the push: a push that fails does not undo the connection (catalog.synced is false, catalog.error says why, stripe.sync catches up). A key of another Stripe account than the current connection's is 409 stripe_account_changed: disconnect first. An API key of test connects the Stripe of test, never the one of live.

Who may call: A person with the role admin or owner; an API key with the right admin.

MCP
stripe_connect
CLI
keyseal api PUT /api/v1/stripe
Parameters
  • Idempotency-Key (header)
  • restricted_key (body, required)
HTTP responses
  • 200 Successful Response
  • 401 unauthenticated
  • 403 forbidden, scope_mismatch
  • 404 not_found
  • 409 idempotency_key_in_progress, operator_busy, stripe_account_changed, stripe_connection_busy
  • 413 payload_too_large
  • 422 idempotency_key_reused, invalid_request, stripe_key_invalid, stripe_key_not_restricted, stripe_key_wrong_mode, stripe_managed_payments_unavailable, stripe_permissions_missing, stripe_webhook_endpoint_refused, stripe_webhook_unreachable
  • 429 billing_limit_reached, rate_limited
  • 503 auth_unavailable, billing_unavailable, limits_unavailable, stripe_unavailable
stripe.syncPush the catalogue to Stripe

POST /api/v1/stripe/sync

Push the whole catalogue of the environment to Stripe: what a write could not push is caught up here. Returns the report: the products created and updated, the prices created and deactivated, and in failures the objects Stripe refused (skipped; the others are pushed). synced is true when everything passed. Stripe unreachable is 503 stripe_unavailable: what was pushed before is kept, and the next push resumes.

Who may call: A person with the role admin or owner; an API key with the right admin.

MCP
stripe_sync
CLI
keyseal api POST /api/v1/stripe/sync
Parameters
  • Idempotency-Key (header)
HTTP responses
  • 200 Successful Response
  • 401 unauthenticated
  • 403 forbidden, scope_mismatch
  • 404 not_found
  • 409 idempotency_key_in_progress, operator_busy, stripe_not_connected
  • 413 payload_too_large
  • 422 idempotency_key_reused, invalid_request, stripe_permissions_missing
  • 429 billing_limit_reached, rate_limited
  • 503 auth_unavailable, billing_unavailable, limits_unavailable, stripe_unavailable

Usage

usage.getRead publisher usage

GET /api/v1/usage

Current gauges and daily usage across the entire environment. Members are counted for the entire organization. Missing past gauge samples and untracked counters are null. Dates are inclusive UTC calendar dates, at most 366 days apart including both ends. The default is the 30 days ending today. Future dates are accepted and the daily series stops at the observation time. A reversed or excessive range is 422 invalid_request.

Who may call: Any member of the organization; an API key with the right read (or admin, which implies every right).

MCP
usage_get
CLI
keyseal usage
Parameters
  • from (query)
  • to (query)
HTTP responses
  • 200 Successful Response
  • 401 unauthenticated
  • 403 forbidden, scope_mismatch
  • 404 not_found
  • 409 operator_busy
  • 413 payload_too_large
  • 422 invalid_request
  • 429 billing_limit_reached, rate_limited
  • 503 auth_unavailable, billing_unavailable, limits_unavailable

Webhooks

webhooks.deliveries.listList the webhook deliveries

GET /api/v1/webhooks/deliveries

The journal of the environment of the request: one delivery per event and endpoint, newest first, by pages, kept for the plan retention period (30 days in beta). Filters: endpoint_id (whe_…), status (pending, sending, succeeded, failed), type (an event type, or ping). Each says its attempts, the endpoint's last HTTP status and last_error; webhooks.deliveries.get adds the body sent and the start of the answer.

Who may call: A person with the role admin or owner; an API key with the right admin.

MCP
webhooks_deliveries_list
CLI
keyseal webhooks deliveries list
Parameters
  • endpoint_id (query)
  • status (query)
  • type (query)
  • limit (query)
  • cursor (query)
HTTP responses
  • 200 Successful Response
  • 401 unauthenticated
  • 403 forbidden, scope_mismatch
  • 404 not_found
  • 409 operator_busy
  • 413 payload_too_large
  • 422 invalid_request
  • 429 billing_limit_reached, rate_limited
  • 503 auth_unavailable, billing_unavailable, limits_unavailable
webhooks.deliveries.getRead a webhook delivery

GET /api/v1/webhooks/deliveries/{delivery_id}

One delivery (whd_…) with the body sent (payload: id, type, created, environment, data) and the first 1024 bytes of the endpoint's last answer (response_excerpt).

Who may call: A person with the role admin or owner; an API key with the right admin.

MCP
webhooks_deliveries_get
CLI
keyseal webhooks deliveries show
Parameters
  • delivery_id (path, required)
HTTP responses
  • 200 Successful Response
  • 401 unauthenticated
  • 403 forbidden, scope_mismatch
  • 404 not_found, webhook_delivery_not_found
  • 409 operator_busy
  • 413 payload_too_large
  • 422 invalid_request
  • 429 billing_limit_reached, rate_limited
  • 503 auth_unavailable, billing_unavailable, limits_unavailable
webhooks.deliveries.retrySend a webhook delivery again

POST /api/v1/webhooks/deliveries/{delivery_id}/retry

Put a delivery back in the queue, due now, its attempts at zero (nine more tries, about 3 days), whatever its status: a failed one is sent again, a succeeded one once more (the receiver deduplicates by the event's id). Its last_error is cleared. A delivery whose endpoint was deleted is 404 webhook_endpoint_not_found; one a worker is sending right now is 409 webhook_delivery_in_progress (retry once its attempt is over). Returns the delivery, pending.

Who may call: A person with the role admin or owner; an API key with the right admin.

MCP
webhooks_deliveries_retry
CLI
keyseal webhooks deliveries retry
Parameters
  • delivery_id (path, required)
  • Idempotency-Key (header)
HTTP responses
  • 200 Successful Response
  • 401 unauthenticated
  • 403 forbidden, scope_mismatch
  • 404 not_found, webhook_delivery_not_found, webhook_endpoint_not_found
  • 409 idempotency_key_in_progress, operator_busy, webhook_delivery_in_progress
  • 413 payload_too_large
  • 422 idempotency_key_reused, invalid_request
  • 429 billing_limit_reached, rate_limited
  • 503 auth_unavailable, billing_unavailable, limits_unavailable
webhooks.endpoints.listList the webhook endpoints

GET /api/v1/webhooks/endpoints

The webhook endpoints of the environment of the request (at most 10), oldest first: their address, the events they receive, whether they are active. Never a secret.

Who may call: A person with the role admin or owner; an API key with the right admin.

MCP
webhooks_endpoints_list
CLI
keyseal webhooks list
HTTP responses
  • 200 Successful Response
  • 401 unauthenticated
  • 403 forbidden, scope_mismatch
  • 404 not_found
  • 409 operator_busy
  • 413 payload_too_large
  • 422 invalid_request
  • 429 billing_limit_reached, rate_limited
  • 503 auth_unavailable, billing_unavailable, limits_unavailable
webhooks.endpoints.createCreate a webhook endpoint

POST /api/v1/webhooks/endpoints

Create an endpoint of the environment of the request, where Keyseal POSTs the events chosen, each signed with the endpoint's secret (header Keyseal-Signature: t=<unix seconds>,v1=<hex HMAC-SHA256(secret, "<t>.<body>")>). url: https:// only, 2048 characters at most, a public host name: localhost, a name without a dot, credentials or an internal IP address are 422 invalid_webhook_url (a name resolving to an internal address is refused at each delivery). events: one or more of webhooks.event_types.list, or ["*"] alone for all, those added later included (422 invalid_webhook_events otherwise). description: a note, 500 characters at most. active: true by default. At most 10 endpoints per environment (409 webhook_endpoint_limit_reached). Returns the endpoint with its signing secret in secret, the only time it is shown: keep it at once (Cache-Control: no-store).

Who may call: A person with the role admin or owner; an API key with the right admin.

Idempotency: not supported: a request with Idempotency-Key is refused (400 idempotency_not_supported). The answer carries the endpoint's signing secret in clear, shown this once and never kept for a replay: if the answer was lost, find the endpoint in webhooks.endpoints.list and give it a new secret (webhooks.endpoints.rotate_secret), or delete it.

MCP
webhooks_endpoints_create
CLI
keyseal webhooks create
Parameters
  • active (body)
  • description (body)
  • events (body, required)
  • url (body, required)
HTTP responses
  • 201 Successful Response
  • 400 idempotency_not_supported
  • 401 unauthenticated
  • 403 forbidden, scope_mismatch
  • 404 not_found
  • 409 operator_busy, webhook_endpoint_limit_reached
  • 413 payload_too_large
  • 422 invalid_request, invalid_webhook_events, invalid_webhook_url
  • 429 billing_limit_reached, rate_limited
  • 503 auth_unavailable, billing_unavailable, limits_unavailable
webhooks.endpoints.deleteDelete a webhook endpoint

DELETE /api/v1/webhooks/endpoints/{endpoint_id}

Delete an endpoint: nothing more is sent to it, and its deliveries still pending fail (endpoint_deleted). Its deliveries stay in the journal, their endpoint_id set to null; they cannot be sent again. Returns 204.

Irreversible: the endpoint and its secret are gone, and its pending deliveries are failed for good: make a new endpoint, with a new secret.

Who may call: A person with the role admin or owner; an API key with the right admin.

MCP
webhooks_endpoints_delete
CLI
keyseal webhooks delete
Parameters
  • endpoint_id (path, required)
  • Idempotency-Key (header)
HTTP responses
  • 204 Successful Response
  • 401 unauthenticated
  • 403 forbidden, scope_mismatch
  • 404 not_found, webhook_endpoint_not_found
  • 409 idempotency_key_in_progress, operator_busy
  • 413 payload_too_large
  • 422 idempotency_key_reused, invalid_request
  • 429 billing_limit_reached, rate_limited
  • 503 auth_unavailable, billing_unavailable, limits_unavailable
webhooks.endpoints.getRead a webhook endpoint

GET /api/v1/webhooks/endpoints/{endpoint_id}

One endpoint (whe_…) of the environment of the request: its address, its description, the events it receives, whether it is active. Never its secret.

Who may call: A person with the role admin or owner; an API key with the right admin.

MCP
webhooks_endpoints_get
CLI
keyseal webhooks show
Parameters
  • endpoint_id (path, required)
HTTP responses
  • 200 Successful Response
  • 401 unauthenticated
  • 403 forbidden, scope_mismatch
  • 404 not_found, webhook_endpoint_not_found
  • 409 operator_busy
  • 413 payload_too_large
  • 422 invalid_request
  • 429 billing_limit_reached, rate_limited
  • 503 auth_unavailable, billing_unavailable, limits_unavailable
webhooks.endpoints.updateUpdate a webhook endpoint

PATCH /api/v1/webhooks/endpoints/{endpoint_id}

Change the fields sent among url, description, events and active, each checked as at creation (422 invalid_webhook_url, 422 invalid_webhook_events); null is refused. An endpoint made inactive receives nothing: the deliveries due meanwhile fail with endpoint_disabled (webhooks.deliveries.retry sends one again once it is active). An event type removed from events is no longer sent, even a delivery already queued (event_not_selected). Returns the endpoint.

Who may call: A person with the role admin or owner; an API key with the right admin.

MCP
webhooks_endpoints_update
CLI
keyseal webhooks update
Parameters
  • endpoint_id (path, required)
  • Idempotency-Key (header)
  • active (body)
  • description (body)
  • events (body)
  • url (body)
HTTP responses
  • 200 Successful Response
  • 401 unauthenticated
  • 403 forbidden, scope_mismatch
  • 404 not_found, webhook_endpoint_not_found
  • 409 idempotency_key_in_progress, operator_busy
  • 413 payload_too_large
  • 422 idempotency_key_reused, invalid_request, invalid_webhook_events, invalid_webhook_url
  • 429 billing_limit_reached, rate_limited
  • 503 auth_unavailable, billing_unavailable, limits_unavailable
webhooks.endpoints.rotate_secretReplace a webhook endpoint's secret

POST /api/v1/webhooks/endpoints/{endpoint_id}/rotate-secret

Give the endpoint a new signing secret, at once: every delivery from now on, those already queued included, is signed with the new one. Update the receiver right after. Returns the endpoint with its signing secret in secret, the only time it is shown: keep it at once (Cache-Control: no-store).

Irreversible: the old secret signs nothing more and cannot be brought back.

Who may call: A person with the role admin or owner; an API key with the right admin.

Idempotency: not supported: a request with Idempotency-Key is refused (400 idempotency_not_supported). The answer carries the new signing secret in clear, shown this once and never kept for a replay: if the answer was lost, rotate again (the lost secret then signs nothing).

MCP
webhooks_endpoints_rotate_secret
CLI
keyseal webhooks rotate-secret
Parameters
  • endpoint_id (path, required)
HTTP responses
  • 200 Successful Response
  • 400 idempotency_not_supported
  • 401 unauthenticated
  • 403 forbidden, scope_mismatch
  • 404 not_found, webhook_endpoint_not_found
  • 409 operator_busy
  • 413 payload_too_large
  • 422 invalid_request
  • 429 billing_limit_reached, rate_limited
  • 503 auth_unavailable, billing_unavailable, limits_unavailable
webhooks.endpoints.testSend a test event to a webhook endpoint

POST /api/v1/webhooks/endpoints/{endpoint_id}/test

Queue a ping event to this endpoint alone, whatever events it chose, signed like any other: its data is {"endpoint_id": "whe_…"}. The worker sends it within seconds; webhooks.deliveries.get then shows the endpoint's answer. An inactive endpoint is not sent to: the delivery fails with endpoint_disabled. Returns 202 with the delivery, pending.

Who may call: A person with the role admin or owner; an API key with the right admin.

MCP
webhooks_endpoints_test
CLI
keyseal webhooks test
Parameters
  • endpoint_id (path, required)
  • Idempotency-Key (header)
HTTP responses
  • 202 Successful Response
  • 401 unauthenticated
  • 403 forbidden, scope_mismatch
  • 404 not_found, webhook_endpoint_not_found
  • 409 idempotency_key_in_progress, operator_busy
  • 413 payload_too_large
  • 422 idempotency_key_reused, invalid_request
  • 429 billing_limit_reached, rate_limited
  • 503 auth_unavailable, billing_unavailable, limits_unavailable
webhooks.event_types.listList the webhook event types

GET /api/v1/webhooks/event-types

The event types an endpoint may choose, in events; ["*"] chooses them all, those added later included. ping is not one: only webhooks.endpoints.test sends it.

Who may call: A person with the role admin or owner; an API key with the right admin.

MCP
webhooks_event_types_list
CLI
keyseal webhooks event-types
HTTP responses
  • 200 Successful Response
  • 401 unauthenticated
  • 403 forbidden, scope_mismatch
  • 404 not_found
  • 409 operator_busy
  • 413 payload_too_large
  • 422 invalid_request
  • 429 billing_limit_reached, rate_limited
  • 503 auth_unavailable, billing_unavailable, limits_unavailable
All guides