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
- REST API enabled – WooCommerce → Settings → Keys → Features → “Enable REST API”.
- WooCommerce API key owned by a user with the manage_woocommerce capability.
- Request over HTTPS.
Endpoints
| Method | URL | Operation |
|---|---|---|
GET | /wp-json/wc/v1/activations | List/filter activations |
POST | /wp-json/wc/v1/activations | Create 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
| Param | Type | Default | Description |
|---|---|---|---|
key_id | integer | — | Filter by key id |
status | string | — | Activation status |
search | string | — | LIKE search |
include | csv/array | — | Specific activation ids, e.g. ?include=1,2,3 |
page | integer | 1 | Page number |
limit | integer | 20 | Page size (max 100). ⚠️ per_page is not supported |
order | string | desc | asc / desc |
orderby | string | date_created | Sort column |
context | string | view | view / 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
| Parameter | Type | Description |
|---|---|---|
key_id | integer | The key to activate |
instance | string | Instance/identifier for this activation |
ip_address | string | IP address |
user_agent | string | User agent string |
status | string | Activation 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 (instance, key_id, ip_address, user_agent, status).
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
| Field | Description |
|---|---|
id | Unique identifier for the activation |
instance | Instance identifier |
key_id | The key id this activation belongs to |
key | The key string (read-only) |
ip_address | IP address |
user_agent | User agent |
status | Activation status |
created_at | Creation datetime |
updated_at | Last-updated datetime |
Errors
| Status | Code | Cause |
|---|---|---|
401 | woocommerce_api_authentication_required | Missing/invalid credentials, or plain HTTP |
403 | rest_forbidden_context | Key owner lacks manage_woocommerce |
404 | rest_no_route | REST API disabled, or trailing slash on the URL |
404 | rest_not_found | No activation with that {id} |