comecerodocs

Create a feature

POST
/features

Creates one thing you sell access to. A feature grants nothing until a published feature set revision or an override grants it. An account has at most 200 features in each mode (400), including archived features. Archiving does not free a catalog slot. Reuse an existing feature. A metered feature needs usage billing turned on. Secret and trusted tokens may call it; a limited token may not (403).

Authorization

headerAuthorizationBearer <token>

A secret, trusted or limited token. See Authentication.

Request Body

A feature.

application/json
  1. body

A new feature.

key*string

The key your app checks. 1 to 64 of a-z 0-9 _ . -, unique in the account and mode (409 with code key_taken when another feature has it). Never changes.

Match^[a-z0-9_.-]{1,64}$
name*string

Up to 100 characters.

Lengthlength <= 100
type*string

boolean is on or off, number is a setting such as seats, metered is a limit on a usage metric.

Value in"boolean""number""metered"
metric_id?string

Required for a metered feature and refused on the others. A sum or latest metric of this account (404 when there is none, 400 for a gauge metric). Needs usage billing turned on (403 with code usage_billing_off).

unit_label?string

Up to 96 characters, for example seat.

Lengthlength <= 96
status?string

Defaults to active.

Value in"active""archived"

Response Body

Success.

application/json
  1. response

One thing you sell access to: on or off (boolean), a number setting such as seats (number), or a limit on something you count (metered). Your app asks for it by key.

object?string

Always feature.

feature_id?string

The id Comecero gives the feature, feat_ plus 32 characters.

key?string

The key your app checks. 1 to 64 of a-z 0-9 _ . -, unique in the account and mode. Never changes.

name?string

Up to 100 characters, shown in the dashboard.

type?string

How the feature is granted. Fixed once granted is true.

Value in"boolean""number""metered"
metric_id?string

Metered features only. The usage metric that counts it, a sum or latest metric. Left out on other types. Fixed once granted is true.

unit_label?string

Up to 96 characters, for example seat or request. Left out when not set.

status?string

An archived feature stays with every customer who has it, but no new feature set revision or override can grant it.

Value in"active""archived"
granted?boolean

True once a published feature set revision or an override grants the feature. From then on its type and metric_id never change.

test?boolean

Test or live.

date_created?string

When the feature was created.

Formatdate-time
date_modified?string

When the feature last changed.

Formatdate-time
Example Request
curl -X POST 'https://api.comecero.com/api/v1/features' \  -H 'Content-Type: application/json' \  -d '{  "key": "api_calls",  "name": "API calls",  "type": "metered",  "metric_id": "met_api_calls",  "unit_label": "request"}'
Example Response
{  "object": "feature",  "feature_id": "feat_4f1c2a9e0b7d4c3a8e6f5d2b1a0c9e8d",  "key": "api_calls",  "name": "API calls",  "type": "metered",  "metric_id": "met_api_calls",  "unit_label": "request",  "status": "active",  "granted": false,  "test": true,  "date_created": "2026-11-01T09:00:00Z",  "date_modified": "2026-11-01T09:00:00Z"}