comecerodocs

Update a license service

POST
/license_services/{license_service_id}

Changes a license service. Send only the fields you want to change. Inside configuration, only the fields you send change, but licenses replaces the whole key list, and for a generated service null clears prefix, activation_limit or duration. Changing type drops the settings of the old type. Without type, configuration is checked against the service's current type, so a generated service answers 400 (invalid_input) for a setting outside its limits, such as an activation_limit over 100. A service can become generated only when Comecero has turned license keys on for your account (otherwise 409 with code feature_not_enabled); one that already is stays editable. prefix, activation_limit, duration and subscription_grace_days apply to keys sold from then on: a key keeps the activation limit per unit and grace days it was sold with. revoke_on_refund and revoke_on_chargeback apply to every refund and chargeback handled after the change, on existing keys too. Secret and trusted tokens may call it.

Authorization

headerAuthorizationBearer <token>

A secret, trusted or limited token. See Authentication.

Path Parameters

license_service_id*string

The license service id.

Query Parameters

show?string

Comma-separated fields to return; all others are left out. Use dot notation for child fields (customer.email). You cannot send show and hide together (400). See Customizing output.

hide?string

Comma-separated fields to leave out of the response. Use dot notation for child fields (customer.email). You cannot send show and hide together (400). See Customizing output.

formatted?boolean

When true, the object also has a formatted child with amounts and dates as display text in the shopper's language and currency (for example $19.99 or November 7, 2026). The default is false. See Localized formatting.

Defaultfalse

Request Body

The fields to change.

application/json
  1. body

The fields you can set on a license service. On create, name, label and type are required, and configuration too for a list (with at least one key) or a remote_url service. On update, send only the fields you want to change; inside configuration, only the fields you send change.

name?string

Your name for the service.

Lengthlength <= 75
label?string

What the key is called when shown to the customer, for example License Code or Registration Code.

Lengthlength <= 75
description?|

Your notes about the service.

Lengthlength <= 256
instructions?|

How to use the key, shown to the customer with it. Basic HTML is kept; anything else is stripped.

Lengthlength <= 1024
type?string

Where keys come from: remote_url asks your license server, list hands out keys you uploaded, generated has Comecero make each key and lets your app activate it on a limited number of devices. A service can become generated only when Comecero has turned license keys on for your account (otherwise 409 with code feature_not_enabled).

Value in"remote_url""list""generated"
expand?|

For remote_url: the child objects to expand in the order sent to your server, as in the expand query parameter. customer is always expanded.

show?|

For remote_url: the only order fields to send to your server. Cannot be used with hide.

hide?|

For remote_url: order fields to leave out of what is sent to your server. Cannot be used with show.

configuration?|||

The settings for the service's type. Optional for generated: on create, or when an update changes type to generated, leaving it out (or null) takes every default; on any other update it keeps the saved settings. On an update that does not send type, it is checked against the service's current type (for generated: prefix up to 8 letters or digits, activation_limit 1 to 100 or null, duration value 1 to 1000, subscription_grace_days 0 to 30), and a value outside those answers 400 with code invalid_input.

Response Body

The updated license service.

application/json
  1. response

The source of license keys for a product: a list of keys you upload, your own license server that Comecero calls after each sale, or keys Comecero makes for you (generated).

object*"license_service"

The object type. Always license_service.

Value in"license_service"
url*string

The URL of this license service in the API.

Formaturi
license_service_id*string

The id of the license service.

date_created*string

When the service was created.

Formatdate-time
date_modified*string

When the service was last changed.

Formatdate-time
test*boolean

True for a test-mode service.

account_id*string

The account the service belongs to.

name*string

Your name for the service.

Lengthlength <= 75
label*string

What the key is called when shown to the customer, for example License Code or Registration Code.

Lengthlength <= 75
description*|

Your notes about the service.

Lengthlength <= 256
instructions*|

How to use the key, shown to the customer with it. Basic HTML is kept; anything else is stripped.

Lengthlength <= 1024
type*string

Where keys come from: remote_url asks your license server, list hands out keys you uploaded, generated has Comecero make each key and lets your app activate it on a limited number of devices. A service can become generated only when Comecero has turned license keys on for your account (otherwise 409 with code feature_not_enabled).

Value in"remote_url""list""generated"
expand*|

For remote_url: the child objects to expand in the order sent to your server, as in the expand query parameter. customer is always expanded.

show*|

For remote_url: the only order fields to send to your server. Cannot be used with hide.

hide*|

For remote_url: order fields to leave out of what is sent to your server. Cannot be used with show.

configuration*||

The settings for the service's type.

formatted?

Present only when you send formatted=true.

Example Request
curl -X POST 'https://api.comecero.com/api/v1/license_services/string' \  -H 'Content-Type: application/json' \  -d '{  "configuration": {    "remove_after_use": false  }}'
Example Response
{  "object": "license_service",  "url": "https://api.comecero.com/api/v1/license_services/0095012789659LsuOeAWLC",  "license_service_id": "0095012789659LsuOeAWLC",  "date_created": "2026-11-02T16:26:29Z",  "date_modified": "2026-11-02T16:45:25Z",  "test": true,  "account_id": "AB1234",  "name": "Widget Pro keys",  "label": "License Code",  "description": null,  "instructions": "Open Widget Pro, choose Help, then Enter License, and paste the code.",  "type": "remote_url",  "expand": null,  "show": null,  "hide": null,  "configuration": {    "url": "https://licenses.example.com/issue",    "format": "json",    "http_authorization_username": null,    "custom_header_name": null,    "custom_header_value": null  }}