---
search:
  tags:
    - licenseKeys
    - POST
seo:
  description: >-
    Reference for the POST /v1/license-keys/{licenseKeyId}/lifecycle endpoint in
    the Vortex Payments API.
sidebar:
  label: POST /v1/license-keys/{licenseKeyId}/lifecycle
  badge: POST
title: POST /v1/license-keys/{licenseKeyId}/lifecycle
type: openapi-operation
---
`POST /v1/license-keys/{licenseKeyId}/lifecycle`

**curl**

```bash
curl "https://api.vortex.nyc/v1/license-keys/:licenseKeyId/lifecycle" \
  -X POST \
  -H "Authorization: Bearer $VORTEX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{...}'
```

**TypeScript**

```ts
import { runLicenseKeyLifecycle, createVortex } from "@vortex-api/vortex/2026-09";

const vortex = createVortex({ apiKey: process.env.VORTEX_API_KEY });
const { data } = await runLicenseKeyLifecycle({
  client: vortex,
  path: { licenseKeyId: "..." },
  body: {...},
});
```

**Request body** (`application/json`, required)

- `environment` (string | null)
- `merchantAccountId` (string | null)
- `action` (string, required)

Request body example:

```json
{
  "environment": "sandbox",
  "merchantAccountId": "string",
  "action": "enable"
}
```

**Responses**

- `200` — Success

Response example, 200:

```json
{
  "data": {
    "id": "string",
    "environment": "sandbox",
    "merchantAccountId": "string",
    "customerId": "string",
    "billingAccountId": "string",
    "productRef": "string",
    "serial": "string",
    "seatLimit": 0,
    "usesCount": 0,
    "status": "active",
    "disabledAt": "string",
    "sourceRef": "string",
    "metadata": {
      "property1": "string",
      "property2": "string"
    },
    "createdAt": "string",
    "updatedAt": "string"
  },
  "requestId": "string"
}
```
