Activations


An activation is a record of a key being used on a device or instance.

Same id rule as Keys: the {id} in /activations/{id} is the activation’s primary-key id, not a key id or product id. Put it in the path, never as ?id=.

Prerequisites

  1. REST API enabled – WooCommerce → Settings → Keys → Features → “Enable REST API”.
  2. WooCommerce API key owned by a user with the manage_woocommerce capability.
  3. Request over HTTPS.

Endpoints

MethodURLOperation
GET/wp-json/wc/v1/activationsList/filter activations
POST/wp-json/wc/v1/activationsCreate an activation
GET/wp-json/wc/v1/activations/{id}Get a single activation
PUT / PATCH/wp-json/wc/v1/activations/{id}Update an activation
DELETE/wp-json/wc/v1/activations/{id}Delete an activation

Authentication

Create a WooCommerce API key at WooCommerce → Settings → Advanced → REST API (the owner must have the manage_woocommerce capability).

⚠️ Query-string credentials (?consumer_key=&consumer_secret=) also work but are insecure, they leak the secret into server logs and history. Send credentials in the Basic Auth header instead. See Authentication for the full strategy and all methods. HTTPS is required.

List Activations – GET /wp-json/wc/v1/activations

Query Parameters

ParamTypeDefaultDescription
key_idintegerFilter by key id
statusstringActivation status
searchstringLIKE search
includecsv/arraySpecific activation ids, e.g. ?include=1,2,3
pageinteger1Page number
limitinteger20Page size (max 100). ⚠️ per_page is not supported
orderstringdescasc / desc
orderbystringdate_createdSort column
contextstringviewview / embed

The total match count is returned in the X-WP-Total response header.

curl "https://example.com/wp-json/wc/v1/activations?key_id=1" -u "ck_xxx:cs_xxx"

Example Response (array)

[
  {
    "id": 1,
    "instance": "site-1",
    "key_id": 1,
    "key": "13DO-67Z1-YZ4E-MTJT",
    "ip_address": "127.0.0.1",
    "user_agent": "MyApp/1.0",
    "status": "activated",
    "created_at": "2026-08-06 10:00:00",
    "updated_at": "2026-08-06 10:00:00"
  }
]

Create Activation – POST /wp-json/wc/v1/activations

Body Parameters

ParameterTypeDescription
key_idintegerThe key to activate
instancestringInstance/identifier for this activation
ip_addressstringIP address
user_agentstringUser agent string
statusstringActivation status
curl -X POST "https://example.com/wp-json/wc/v1/activations" \
  -u "ck_xxxxxxxx:cs_xxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{"key_id":1,"instance":"site-1","ip_address":"127.0.0.1","status":"activated"}'

Returns 201 Created with the activation object and a Location header.

Get Activation – GET /wp-json/wc/v1/activations/{id}

curl "https://example.com/wp-json/wc/v1/activations/1" -u "ck_xxx:cs_xxx"

{id} = activation primary id. Returns 404 rest_not_found if it doesn’t exist.

Update Activation – PUT /wp-json/wc/v1/activations/{id}

Accepts the same writable fields as Create (instancekey_idip_addressuser_agentstatus).

curl -X PUT "https://example.com/wp-json/wc/v1/activations/1" \
  -u "ck_xxx:cs_xxx" \
  -H "Content-Type: application/json" \
  -d '{"status":"deactivated"}'

Delete Activation – DELETE /wp-json/wc/v1/activations/{id}

Permanent deletion (no trash). Response:

{
  "deleted": true,
  "previous": { "id": 1, "instance": "site-1", "...": "..." }
}

Response Fields

FieldDescription
idUnique identifier for the activation
instanceInstance identifier
key_idThe key id this activation belongs to
keyThe key string (read-only)
ip_addressIP address
user_agentUser agent
statusActivation status
created_atCreation datetime
updated_atLast-updated datetime

Errors

StatusCodeCause
401woocommerce_api_authentication_requiredMissing/invalid credentials, or plain HTTP
403rest_forbidden_contextKey owner lacks manage_woocommerce
404rest_no_routeREST API disabled, or trailing slash on the URL
404rest_not_foundNo activation with that {id}


← Previous