Skip to content

Bulk License Actions

Apply one action to many licenses in a single request.

POST /v1/licenses/bulk

Request Body

json
{
  "ids": ["lic_xxx", "lic_yyy"],
  "action": "extend",
  "extendDays": 30
}
FieldRequiredTypeDescription
idsYesstring[]License IDs to act on
actionYesstringOne of revoke, suspend, activate, extend
extendDaysFor extendnumberDays to push each expiry forward (must be positive)

Actions

  • revoke — set status to revoked
  • suspend — set status to suspended
  • activate — set status to active
  • extend — push expiresAt forward by extendDays; licenses without an expiry get NOW() + extendDays

Response

json
{
  "data": {
    "affected": 2
  }
}
FieldDescription
affectedHow many of the given licenses were actually updated.

Example

bash
curl -X POST "https://api.packedge.dev/v1/licenses/bulk" \
  -H "Authorization: Bearer pk_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "ids": ["lic_xxx", "lic_yyy"],
    "action": "revoke"
  }'

Notes

  • Every action busts the per-license edge cache so the change is served immediately
  • IDs that don't belong to your account are silently skipped (reflected in the affected count)