Authentication
Every path of the Distribution API names the product. A request sends a license key in the Seatify-License-Key header. A product with the open distribution setting does not require a license key.
Products
Every path starts with /v1/products/{product}. {product} is the ID of the product. The Distribution API does not use a publishable key.
An unknown product ID answers with the status 404.
License keys
| Header | Required | Description |
|---|---|---|
Seatify-License-Key | For a licensed product | The license key of the customer. |
The distribution setting of the product decides when the key is required:
| Distribution | Without a license key | With a license key |
|---|---|---|
licensed | The answer has the status 401. | Seatify checks the license. |
open | Anyone can list and download the releases. | Seatify checks the license. |
The Distribution API reads the license key only from the header. Do not put the key in the URL.
A browser sends no header when it follows a link. For a download page of a licensed product, see Licensed products.
License checks
A known license key does not always get the releases. The Distribution API refuses the license in these cases:
| Reason | Description |
|---|---|
product_mismatch | The license belongs to another product. This applies to an open product too. |
suspended | The license is suspended. |
expired | The license expired, and its policy uses the Expire rule. |
release_not_covered | The license expired under Perpetual fallback, and the release was published after its expiry date. |
With Keep access, an expired license gets every release. See After expiry.
A request does not claim the license. It does not use a seat or a device.
The status of a refusal depends on the endpoint:
| Endpoint | Refusal |
|---|---|
| List releases, Get a release and Check for an update | The status 200, with valid set to false and the reason. |
| Download an artifact, the stable download link and the updater feeds | The status 403, with valid set to false and the reason. |
Get a product does not check the license. It answers for every known key.
Errors
| Status | Message | Description |
|---|---|---|
| 401 | A license key is required. | The product is licensed, and the request has no Seatify-License-Key header, or the header is empty. |
| 401 | The license key is not valid. | No license in your account has this key. This applies to an open product too. |
| 404 | The product was not found. | No product has this ID. |
Unsigned answers
A 401 answer has no signature. It never grants access. Your application trusts only a 200 answer with a valid signature. See Verify signed responses.
Example
Check that a license key is known with Get a product.
curl https://dist.seatify.dev/v1/products/$PRODUCT_ID \
-H "Seatify-License-Key: $LICENSE_KEY"A known key answers with the status 200:
{
"id": "<product id>",
"name": "Beacon Studio",
"code": "BEACON",
"distribution": "licensed"
}A request without the header answers with the status 401:
{
"message": "A license key is required."
}