# Webhooks

> Webhook endpoints and events.

Source: https://docs.clouduxe.com/api/reference/webhooks/

Base URL: `https://api.clouduxe.com/v1`. Generated from the API contract, version 2026-12-01.

## The WebhookEndpoint object

A URL that receives events.

### Attributes

- `object` (string, required): The object's type. Always "webhook_endpoint".
- `id` (string (uuid), required): The endpoint's id.
- `url` (string (uri), required): The https URL events are POSTed to.
- `description` (string or null, required): Your description.
- `enabledEvents` (array of string, required): The event types sent here, or ["*"] for all.
- `status` (string, required): enabled, or disabled (by you, or after 3 days of failed deliveries). One of `enabled`, `disabled`.
- `apiVersion` (string, required): The API version event payloads are rendered in.
- `secret` (string or null, required): The signing secret, cxwhsec_ followed by 43 characters. Returned only in the first answer when the endpoint is created and when its secret is rotated. A replay of the same Idempotency-Key answers null: if you lost the secret, rotate it.
- `createdByTokenId` (string (uuid) or null, required): The API token that created the endpoint, or null when it was made in the panel.
- `updatedByTokenId` (string (uuid) or null, required): The API token that last changed the URL, events or secret, or null when the panel did.
- `createdAt` (string (date-time), required): When it was created.
- `livemode` (boolean, required): True for objects of your live account.

### Example

```json
{
  "object": "webhook_endpoint",
  "id": "1f4b8e2d-6a9c-4d3f-a7e5-2c0b9d6f3a8e",
  "url": "https://billing.acme.example/clouduxe/webhooks",
  "description": "WHMCS production",
  "enabledEvents": [
    "service.provisioned",
    "service.suspended",
    "service.terminated",
    "action.completed",
    "invoice.created",
    "invoice.overdue"
  ],
  "status": "enabled",
  "apiVersion": "2026-12-01",
  "secret": "cxwhsec_4fT9qLm2Xv7Rk3Np8Wd1Zs6Hc0Yb5Ue2Ja9Gt4Qx7Lp",
  "createdByTokenId": "0b7f3c2a-9e4d-4f1a-8c6b-5d2e7a9f1c3b",
  "updatedByTokenId": "0b7f3c2a-9e4d-4f1a-8c6b-5d2e7a9f1c3b",
  "createdAt": "2026-12-01T08:20:00Z",
  "livemode": true
}
```

## List webhook endpoints

`GET /webhook-endpoints`

Use this to see where events are sent.

Token scope: `webhooks:read`.

### Query parameters

- `limit` (integer): How many objects to return, 1 to 100. Default 20. Default `20`. min 1, max 100.
- `cursor` (string): The nextCursor of the previous page. Valid for 24 hours, with the same filters. max length 512.

### Headers

- `Clouduxe-Version` (string): The API version to use, such as 2026-12-01. Omit it to use your token's version. pattern ^[0-9]{4}-[0-9]{2}-[0-9]{2}$.

### Responses

- `200`: The endpoints.
- `400`: The request is not valid. Codes: cursor_invalid, version_invalid, parameter_invalid.
- `401`: Authentication failed. Codes: token_missing, token_invalid, token_expired, token_revoked.
- `403`: The token is not allowed to do this. Codes: forbidden, ip_not_allowed, api_access_disabled, scope_missing.
- `429`: A rate limit was reached. Codes: rate_limited.
- `500`: Unexpected error. Codes: internal_error.
- `503`: Temporarily unavailable. Codes: unavailable.

### Request

curl:
```bash
curl https://api.clouduxe.com/v1/webhook-endpoints \
  -H "Authorization: Bearer $CLOUDUXE_API_KEY"
```

Node SDK:
```javascript
import { Clouduxe } from "@clouduxe/sdk";

const cx = new Clouduxe({ apiKey: process.env.CLOUDUXE_API_KEY });

for await (const webhookEndpoint of cx.webhookEndpoints.list()) {
  console.log(webhookEndpoint.id);
}
```

Python:
```python
import os
import requests

res = requests.get(
    "https://api.clouduxe.com/v1/webhook-endpoints",
    headers={
        "Authorization": f"Bearer {os.environ['CLOUDUXE_API_KEY']}",
    },
)
page = res.json()
```

PHP SDK:
```php
<?php
require 'vendor/autoload.php';

$cx = new \Clouduxe\Clouduxe(['apiKey' => getenv('CLOUDUXE_API_KEY')]);

foreach ($cx->webhookEndpoints->list() as $webhookEndpoint) {
    echo $webhookEndpoint->id, PHP_EOL;
}
```

fetch:
```javascript
const res = await fetch("https://api.clouduxe.com/v1/webhook-endpoints", {
  headers: {
    Authorization: `Bearer ${process.env.CLOUDUXE_API_KEY}`,
  },
});
const page = await res.json();
```

### Response (`200`)

```json
{
  "object": "list",
  "data": [
    {
      "object": "webhook_endpoint",
      "id": "1f4b8e2d-6a9c-4d3f-a7e5-2c0b9d6f3a8e",
      "url": "https://billing.acme.example/clouduxe/webhooks",
      "description": "WHMCS production",
      "enabledEvents": [
        "service.provisioned",
        "service.suspended",
        "service.terminated",
        "action.completed",
        "invoice.created",
        "invoice.overdue"
      ],
      "status": "enabled",
      "apiVersion": "2026-12-01",
      "secret": null,
      "createdByTokenId": "0b7f3c2a-9e4d-4f1a-8c6b-5d2e7a9f1c3b",
      "updatedByTokenId": "0b7f3c2a-9e4d-4f1a-8c6b-5d2e7a9f1c3b",
      "createdAt": "2026-12-01T08:20:00Z",
      "livemode": true
    }
  ],
  "hasMore": false,
  "nextCursor": null
}
```


## Create a webhook endpoint

`POST /webhook-endpoints`

Use this to receive events at your URL. The first answer holds the signing secret: store it to verify Clouduxe-Signature. A replay of the same Idempotency-Key answers secret null; if you lost it, rotate it. The account owner is emailed. At most 10 endpoints.

Token scope: `webhooks:write`.

### Headers

- `Clouduxe-Version` (string): The API version to use, such as 2026-12-01. Omit it to use your token's version. pattern ^[0-9]{4}-[0-9]{2}-[0-9]{2}$.
- `Idempotency-Key` (string, required): A unique key for this logical request, 1 to 128 characters of letters, digits, underscore, dot, colon or hyphen; a UUID is best. Retrying with the same key is safe: the change happens once and the retry gets the same answer. Keys are kept 48 hours. pattern ^[A-Za-z0-9_.:-]{1,128}$.

### Body (required)

- `url` (string (uri), required): An https URL on port 443 or 8443, with a public DNS name. max length 2048.
- `description` (string): Your description. max length 200.
- `enabledEvents` (array of string, required): Event types to send, or ["*"] for all. min items 1.
- `apiVersion` (string): The API version to render payloads in. Default: the token's version.

### Responses

- `201`: The endpoint, with its secret.
- `400`: The request is not valid. Codes: version_invalid, idempotency_key_required, idempotency_key_invalid, invalid_json, parameter_missing, parameter_invalid, parameter_unknown.
- `401`: Authentication failed. Codes: token_missing, token_invalid, token_expired, token_revoked.
- `403`: The token is not allowed to do this. Codes: forbidden, ip_not_allowed, api_access_disabled, scope_missing.
- `409`: The request conflicts with the object's current state. Codes: webhook_endpoint_limit, idempotency_in_progress.
- `413`: The request body is too large. Codes: request_too_large.
- `415`: Unsupported media type. Codes: unsupported_media_type.
- `422`: The request is well formed but cannot be carried out. Codes: webhook_url_refused, idempotency_mismatch.
- `429`: A rate limit was reached. Codes: rate_limited.
- `500`: Unexpected error. Codes: internal_error.
- `503`: Temporarily unavailable. Codes: unavailable, outcome_unknown, limits_unavailable.

### Request

curl:
```bash
curl -X POST https://api.clouduxe.com/v1/webhook-endpoints \
  -H "Authorization: Bearer $CLOUDUXE_API_KEY" \
  -H "Idempotency-Key: 6f1c2e9a-4b7d-4e3a-9c8f-1a2b3c4d5e6f" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://billing.acme.example/clouduxe/webhooks","description":"WHMCS production","enabledEvents":["service.provisioned","service.suspended","service.terminated","action.completed","invoice.created","invoice.overdue"]}'
```

Node SDK:
```javascript
import { Clouduxe } from "@clouduxe/sdk";

const cx = new Clouduxe({ apiKey: process.env.CLOUDUXE_API_KEY });

const webhookEndpoint = await cx.webhookEndpoints.create({ url: "https://billing.acme.example/clouduxe/webhooks", description: "WHMCS production", enabledEvents: [ "service.provisioned", "service.suspended", "service.terminated", "action.completed", "invoice.created", "invoice.overdue" ] });
```

Python:
```python
import os
import requests

res = requests.post(
    "https://api.clouduxe.com/v1/webhook-endpoints",
    headers={
        "Authorization": f"Bearer {os.environ['CLOUDUXE_API_KEY']}",
        "Idempotency-Key": "6f1c2e9a-4b7d-4e3a-9c8f-1a2b3c4d5e6f",
    },
    json={
        "url": "https://billing.acme.example/clouduxe/webhooks",
        "description": "WHMCS production",
        "enabledEvents": [
            "service.provisioned",
            "service.suspended",
            "service.terminated",
            "action.completed",
            "invoice.created",
            "invoice.overdue",
        ],
    },
)
webhookEndpoint = res.json()
```

PHP SDK:
```php
<?php
require 'vendor/autoload.php';

$cx = new \Clouduxe\Clouduxe(['apiKey' => getenv('CLOUDUXE_API_KEY')]);

$webhookEndpoint = $cx->webhookEndpoints->create(['url' => 'https://billing.acme.example/clouduxe/webhooks', 'description' => 'WHMCS production', 'enabledEvents' => ['service.provisioned', 'service.suspended', 'service.terminated', 'action.completed', 'invoice.created', 'invoice.overdue']]);
```

fetch:
```javascript
const res = await fetch("https://api.clouduxe.com/v1/webhook-endpoints", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.CLOUDUXE_API_KEY}`,
    "Idempotency-Key": "6f1c2e9a-4b7d-4e3a-9c8f-1a2b3c4d5e6f",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    url: "https://billing.acme.example/clouduxe/webhooks",
    description: "WHMCS production",
    enabledEvents: [
      "service.provisioned",
      "service.suspended",
      "service.terminated",
      "action.completed",
      "invoice.created",
      "invoice.overdue"
    ]
  }),
});
const webhookEndpoint = await res.json();
```

### Response (`201`)

```json
{
  "object": "webhook_endpoint",
  "id": "1f4b8e2d-6a9c-4d3f-a7e5-2c0b9d6f3a8e",
  "url": "https://billing.acme.example/clouduxe/webhooks",
  "description": "WHMCS production",
  "enabledEvents": [
    "service.provisioned",
    "service.suspended",
    "service.terminated",
    "action.completed",
    "invoice.created",
    "invoice.overdue"
  ],
  "status": "enabled",
  "apiVersion": "2026-12-01",
  "secret": "cxwhsec_4fT9qLm2Xv7Rk3Np8Wd1Zs6Hc0Yb5Ue2Ja9Gt4Qx7Lp",
  "createdByTokenId": "0b7f3c2a-9e4d-4f1a-8c6b-5d2e7a9f1c3b",
  "updatedByTokenId": "0b7f3c2a-9e4d-4f1a-8c6b-5d2e7a9f1c3b",
  "createdAt": "2026-12-01T08:20:00Z",
  "livemode": true
}
```


## Get a webhook endpoint

`GET /webhook-endpoints/{endpointId}`

Use this to read one endpoint. The secret is not returned.

Token scope: `webhooks:read`.

### Path parameters

- `endpointId` (string (uuid), required): The endpoint's id.

### Headers

- `Clouduxe-Version` (string): The API version to use, such as 2026-12-01. Omit it to use your token's version. pattern ^[0-9]{4}-[0-9]{2}-[0-9]{2}$.

### Responses

- `200`: The endpoint.
- `400`: The request is not valid. Codes: version_invalid.
- `401`: Authentication failed. Codes: token_missing, token_invalid, token_expired, token_revoked.
- `403`: The token is not allowed to do this. Codes: forbidden, ip_not_allowed, api_access_disabled, scope_missing.
- `404`: Not found. Codes: not_found.
- `429`: A rate limit was reached. Codes: rate_limited.
- `500`: Unexpected error. Codes: internal_error.
- `503`: Temporarily unavailable. Codes: unavailable.

### Request

curl:
```bash
curl https://api.clouduxe.com/v1/webhook-endpoints/1f4b8e2d-6a9c-4d3f-a7e5-2c0b9d6f3a8e \
  -H "Authorization: Bearer $CLOUDUXE_API_KEY"
```

Node SDK:
```javascript
import { Clouduxe } from "@clouduxe/sdk";

const cx = new Clouduxe({ apiKey: process.env.CLOUDUXE_API_KEY });

const webhookEndpoint = await cx.webhookEndpoints.get("1f4b8e2d-6a9c-4d3f-a7e5-2c0b9d6f3a8e");
```

Python:
```python
import os
import requests

res = requests.get(
    "https://api.clouduxe.com/v1/webhook-endpoints/1f4b8e2d-6a9c-4d3f-a7e5-2c0b9d6f3a8e",
    headers={
        "Authorization": f"Bearer {os.environ['CLOUDUXE_API_KEY']}",
    },
)
webhookEndpoint = res.json()
```

PHP SDK:
```php
<?php
require 'vendor/autoload.php';

$cx = new \Clouduxe\Clouduxe(['apiKey' => getenv('CLOUDUXE_API_KEY')]);

$webhookEndpoint = $cx->webhookEndpoints->get('1f4b8e2d-6a9c-4d3f-a7e5-2c0b9d6f3a8e');
```

fetch:
```javascript
const res = await fetch("https://api.clouduxe.com/v1/webhook-endpoints/1f4b8e2d-6a9c-4d3f-a7e5-2c0b9d6f3a8e", {
  headers: {
    Authorization: `Bearer ${process.env.CLOUDUXE_API_KEY}`,
  },
});
const webhookEndpoint = await res.json();
```

### Response (`200`)

```json
{
  "object": "webhook_endpoint",
  "id": "1f4b8e2d-6a9c-4d3f-a7e5-2c0b9d6f3a8e",
  "url": "https://billing.acme.example/clouduxe/webhooks",
  "description": "WHMCS production",
  "enabledEvents": [
    "service.provisioned",
    "service.suspended",
    "service.terminated",
    "action.completed",
    "invoice.created",
    "invoice.overdue"
  ],
  "status": "enabled",
  "apiVersion": "2026-12-01",
  "secret": null,
  "createdByTokenId": "0b7f3c2a-9e4d-4f1a-8c6b-5d2e7a9f1c3b",
  "updatedByTokenId": "0b7f3c2a-9e4d-4f1a-8c6b-5d2e7a9f1c3b",
  "createdAt": "2026-12-01T08:20:00Z",
  "livemode": true
}
```


## Update a webhook endpoint

`PATCH /webhook-endpoints/{endpointId}`

Use this to change an endpoint's URL or events, or to disable or re-enable it.

Token scope: `webhooks:write`.

### Path parameters

- `endpointId` (string (uuid), required): The endpoint's id.

### Headers

- `Clouduxe-Version` (string): The API version to use, such as 2026-12-01. Omit it to use your token's version. pattern ^[0-9]{4}-[0-9]{2}-[0-9]{2}$.
- `Idempotency-Key` (string, required): A unique key for this logical request, 1 to 128 characters of letters, digits, underscore, dot, colon or hyphen; a UUID is best. Retrying with the same key is safe: the change happens once and the retry gets the same answer. Keys are kept 48 hours. pattern ^[A-Za-z0-9_.:-]{1,128}$.

### Body (required)

- `url` (string (uri)): The new URL. max length 2048.
- `description` (string or null): Your description. max length 200.
- `enabledEvents` (array of string): Event types to send. min items 1.
- `status` (string): enabled or disabled. One of `enabled`, `disabled`.

### Responses

- `200`: The endpoint.
- `400`: The request is not valid. Codes: version_invalid, idempotency_key_required, idempotency_key_invalid, invalid_json, parameter_missing, parameter_invalid, parameter_unknown.
- `401`: Authentication failed. Codes: token_missing, token_invalid, token_expired, token_revoked.
- `403`: The token is not allowed to do this. Codes: forbidden, ip_not_allowed, api_access_disabled, scope_missing.
- `404`: Not found. Codes: not_found.
- `409`: The request conflicts with the object's current state. Codes: idempotency_in_progress.
- `413`: The request body is too large. Codes: request_too_large.
- `415`: Unsupported media type. Codes: unsupported_media_type.
- `422`: The request is well formed but cannot be carried out. Codes: webhook_url_refused, idempotency_mismatch.
- `429`: A rate limit was reached. Codes: rate_limited.
- `500`: Unexpected error. Codes: internal_error.
- `503`: Temporarily unavailable. Codes: unavailable, outcome_unknown, limits_unavailable.

### Request

curl:
```bash
curl -X PATCH https://api.clouduxe.com/v1/webhook-endpoints/1f4b8e2d-6a9c-4d3f-a7e5-2c0b9d6f3a8e \
  -H "Authorization: Bearer $CLOUDUXE_API_KEY" \
  -H "Idempotency-Key: 6f1c2e9a-4b7d-4e3a-9c8f-1a2b3c4d5e6f" \
  -H "Content-Type: application/json" \
  -d '{"status":"enabled"}'
```

Node SDK:
```javascript
import { Clouduxe } from "@clouduxe/sdk";

const cx = new Clouduxe({ apiKey: process.env.CLOUDUXE_API_KEY });

const webhookEndpoint = await cx.webhookEndpoints.update("1f4b8e2d-6a9c-4d3f-a7e5-2c0b9d6f3a8e", { status: "enabled" });
```

Python:
```python
import os
import requests

res = requests.patch(
    "https://api.clouduxe.com/v1/webhook-endpoints/1f4b8e2d-6a9c-4d3f-a7e5-2c0b9d6f3a8e",
    headers={
        "Authorization": f"Bearer {os.environ['CLOUDUXE_API_KEY']}",
        "Idempotency-Key": "6f1c2e9a-4b7d-4e3a-9c8f-1a2b3c4d5e6f",
    },
    json={
        "status": "enabled",
    },
)
webhookEndpoint = res.json()
```

PHP SDK:
```php
<?php
require 'vendor/autoload.php';

$cx = new \Clouduxe\Clouduxe(['apiKey' => getenv('CLOUDUXE_API_KEY')]);

$webhookEndpoint = $cx->webhookEndpoints->update('1f4b8e2d-6a9c-4d3f-a7e5-2c0b9d6f3a8e', ['status' => 'enabled']);
```

fetch:
```javascript
const res = await fetch("https://api.clouduxe.com/v1/webhook-endpoints/1f4b8e2d-6a9c-4d3f-a7e5-2c0b9d6f3a8e", {
  method: "PATCH",
  headers: {
    Authorization: `Bearer ${process.env.CLOUDUXE_API_KEY}`,
    "Idempotency-Key": "6f1c2e9a-4b7d-4e3a-9c8f-1a2b3c4d5e6f",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    status: "enabled"
  }),
});
const webhookEndpoint = await res.json();
```

### Response (`200`)

```json
{
  "object": "webhook_endpoint",
  "id": "1f4b8e2d-6a9c-4d3f-a7e5-2c0b9d6f3a8e",
  "url": "https://billing.acme.example/clouduxe/webhooks",
  "description": "WHMCS production",
  "enabledEvents": [
    "service.provisioned",
    "service.suspended",
    "service.terminated",
    "action.completed",
    "invoice.created",
    "invoice.overdue"
  ],
  "status": "enabled",
  "apiVersion": "2026-12-01",
  "secret": null,
  "createdByTokenId": "0b7f3c2a-9e4d-4f1a-8c6b-5d2e7a9f1c3b",
  "updatedByTokenId": "0b7f3c2a-9e4d-4f1a-8c6b-5d2e7a9f1c3b",
  "createdAt": "2026-12-01T08:20:00Z",
  "livemode": true
}
```


## Delete a webhook endpoint

`DELETE /webhook-endpoints/{endpointId}`

Use this to stop sending events to a URL.

Token scope: `webhooks:write`.

### Path parameters

- `endpointId` (string (uuid), required): The endpoint's id.

### Headers

- `Clouduxe-Version` (string): The API version to use, such as 2026-12-01. Omit it to use your token's version. pattern ^[0-9]{4}-[0-9]{2}-[0-9]{2}$.
- `Idempotency-Key` (string, required): A unique key for this logical request, 1 to 128 characters of letters, digits, underscore, dot, colon or hyphen; a UUID is best. Retrying with the same key is safe: the change happens once and the retry gets the same answer. Keys are kept 48 hours. pattern ^[A-Za-z0-9_.:-]{1,128}$.

### Responses

- `200`: The deleted endpoint.
- `400`: The request is not valid. Codes: version_invalid, idempotency_key_required, idempotency_key_invalid.
- `401`: Authentication failed. Codes: token_missing, token_invalid, token_expired, token_revoked.
- `403`: The token is not allowed to do this. Codes: forbidden, ip_not_allowed, api_access_disabled, scope_missing.
- `404`: Not found. Codes: not_found.
- `409`: The request conflicts with the object's current state. Codes: idempotency_in_progress.
- `422`: The request is well formed but cannot be carried out. Codes: idempotency_mismatch.
- `429`: A rate limit was reached. Codes: rate_limited.
- `500`: Unexpected error. Codes: internal_error.
- `503`: Temporarily unavailable. Codes: unavailable, outcome_unknown, limits_unavailable.

### Request

curl:
```bash
curl -X DELETE https://api.clouduxe.com/v1/webhook-endpoints/1f4b8e2d-6a9c-4d3f-a7e5-2c0b9d6f3a8e \
  -H "Authorization: Bearer $CLOUDUXE_API_KEY" \
  -H "Idempotency-Key: 6f1c2e9a-4b7d-4e3a-9c8f-1a2b3c4d5e6f"
```

Node SDK:
```javascript
import { Clouduxe } from "@clouduxe/sdk";

const cx = new Clouduxe({ apiKey: process.env.CLOUDUXE_API_KEY });

const webhookEndpoint = await cx.webhookEndpoints.delete("1f4b8e2d-6a9c-4d3f-a7e5-2c0b9d6f3a8e");
```

Python:
```python
import os
import requests

res = requests.delete(
    "https://api.clouduxe.com/v1/webhook-endpoints/1f4b8e2d-6a9c-4d3f-a7e5-2c0b9d6f3a8e",
    headers={
        "Authorization": f"Bearer {os.environ['CLOUDUXE_API_KEY']}",
        "Idempotency-Key": "6f1c2e9a-4b7d-4e3a-9c8f-1a2b3c4d5e6f",
    },
)
webhookEndpoint = res.json()
```

PHP SDK:
```php
<?php
require 'vendor/autoload.php';

$cx = new \Clouduxe\Clouduxe(['apiKey' => getenv('CLOUDUXE_API_KEY')]);

$webhookEndpoint = $cx->webhookEndpoints->delete('1f4b8e2d-6a9c-4d3f-a7e5-2c0b9d6f3a8e');
```

fetch:
```javascript
const res = await fetch("https://api.clouduxe.com/v1/webhook-endpoints/1f4b8e2d-6a9c-4d3f-a7e5-2c0b9d6f3a8e", {
  method: "DELETE",
  headers: {
    Authorization: `Bearer ${process.env.CLOUDUXE_API_KEY}`,
    "Idempotency-Key": "6f1c2e9a-4b7d-4e3a-9c8f-1a2b3c4d5e6f",
  },
});
const webhookEndpoint = await res.json();
```

### Response (`200`)

```json
{
  "object": "webhook_endpoint",
  "id": "1f4b8e2d-6a9c-4d3f-a7e5-2c0b9d6f3a8e",
  "url": "https://billing.acme.example/clouduxe/webhooks",
  "description": "WHMCS production",
  "enabledEvents": [
    "service.provisioned",
    "service.suspended",
    "service.terminated",
    "action.completed",
    "invoice.created",
    "invoice.overdue"
  ],
  "status": "disabled",
  "apiVersion": "2026-12-01",
  "secret": null,
  "createdByTokenId": "0b7f3c2a-9e4d-4f1a-8c6b-5d2e7a9f1c3b",
  "updatedByTokenId": "0b7f3c2a-9e4d-4f1a-8c6b-5d2e7a9f1c3b",
  "createdAt": "2026-12-01T08:20:00Z",
  "livemode": true
}
```


## Rotate a webhook secret

`POST /webhook-endpoints/{endpointId}/rotate-secret`

Use this if a secret may have leaked. The first answer holds the new secret; a replay answers secret null. The old secret keeps working for oldSecretExpiresInSeconds (default 24 hours, 0 to stop it at once), and both signatures are sent meanwhile.

Token scope: `webhooks:write`.

### Path parameters

- `endpointId` (string (uuid), required): The endpoint's id.

### Headers

- `Clouduxe-Version` (string): The API version to use, such as 2026-12-01. Omit it to use your token's version. pattern ^[0-9]{4}-[0-9]{2}-[0-9]{2}$.
- `Idempotency-Key` (string, required): A unique key for this logical request, 1 to 128 characters of letters, digits, underscore, dot, colon or hyphen; a UUID is best. Retrying with the same key is safe: the change happens once and the retry gets the same answer. Keys are kept 48 hours. pattern ^[A-Za-z0-9_.:-]{1,128}$.

### Body (required)

- `oldSecretExpiresInSeconds` (integer): Seconds the old secret stays valid, 0 to 86,400. Default 86,400. Send 0 after a leak to stop it at once. min 0, max 86400.

### Responses

- `200`: The endpoint, with its new secret.
- `400`: The request is not valid. Codes: version_invalid, idempotency_key_required, idempotency_key_invalid, invalid_json, parameter_missing, parameter_invalid, parameter_unknown.
- `401`: Authentication failed. Codes: token_missing, token_invalid, token_expired, token_revoked.
- `403`: The token is not allowed to do this. Codes: forbidden, ip_not_allowed, api_access_disabled, scope_missing.
- `404`: Not found. Codes: not_found.
- `409`: The request conflicts with the object's current state. Codes: idempotency_in_progress.
- `413`: The request body is too large. Codes: request_too_large.
- `415`: Unsupported media type. Codes: unsupported_media_type.
- `422`: The request is well formed but cannot be carried out. Codes: idempotency_mismatch.
- `429`: A rate limit was reached. Codes: rate_limited.
- `500`: Unexpected error. Codes: internal_error.
- `503`: Temporarily unavailable. Codes: unavailable, outcome_unknown, limits_unavailable.

### Request

curl:
```bash
curl -X POST https://api.clouduxe.com/v1/webhook-endpoints/1f4b8e2d-6a9c-4d3f-a7e5-2c0b9d6f3a8e/rotate-secret \
  -H "Authorization: Bearer $CLOUDUXE_API_KEY" \
  -H "Idempotency-Key: 6f1c2e9a-4b7d-4e3a-9c8f-1a2b3c4d5e6f" \
  -H "Content-Type: application/json" \
  -d '{"oldSecretExpiresInSeconds":0}'
```

Node SDK:
```javascript
import { Clouduxe } from "@clouduxe/sdk";

const cx = new Clouduxe({ apiKey: process.env.CLOUDUXE_API_KEY });

const webhookEndpoint = await cx.webhookEndpoints.rotateSecret("1f4b8e2d-6a9c-4d3f-a7e5-2c0b9d6f3a8e", { oldSecretExpiresInSeconds: 0 });
```

Python:
```python
import os
import requests

res = requests.post(
    "https://api.clouduxe.com/v1/webhook-endpoints/1f4b8e2d-6a9c-4d3f-a7e5-2c0b9d6f3a8e/rotate-secret",
    headers={
        "Authorization": f"Bearer {os.environ['CLOUDUXE_API_KEY']}",
        "Idempotency-Key": "6f1c2e9a-4b7d-4e3a-9c8f-1a2b3c4d5e6f",
    },
    json={
        "oldSecretExpiresInSeconds": 0,
    },
)
webhookEndpoint = res.json()
```

PHP SDK:
```php
<?php
require 'vendor/autoload.php';

$cx = new \Clouduxe\Clouduxe(['apiKey' => getenv('CLOUDUXE_API_KEY')]);

$webhookEndpoint = $cx->webhookEndpoints->rotateSecret('1f4b8e2d-6a9c-4d3f-a7e5-2c0b9d6f3a8e', ['oldSecretExpiresInSeconds' => 0]);
```

fetch:
```javascript
const res = await fetch("https://api.clouduxe.com/v1/webhook-endpoints/1f4b8e2d-6a9c-4d3f-a7e5-2c0b9d6f3a8e/rotate-secret", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.CLOUDUXE_API_KEY}`,
    "Idempotency-Key": "6f1c2e9a-4b7d-4e3a-9c8f-1a2b3c4d5e6f",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    oldSecretExpiresInSeconds: 0
  }),
});
const webhookEndpoint = await res.json();
```

### Response (`200`)

```json
{
  "object": "webhook_endpoint",
  "id": "1f4b8e2d-6a9c-4d3f-a7e5-2c0b9d6f3a8e",
  "url": "https://billing.acme.example/clouduxe/webhooks",
  "description": "WHMCS production",
  "enabledEvents": [
    "service.provisioned",
    "service.suspended",
    "service.terminated",
    "action.completed",
    "invoice.created",
    "invoice.overdue"
  ],
  "status": "enabled",
  "apiVersion": "2026-12-01",
  "secret": "cxwhsec_4fT9qLm2Xv7Rk3Np8Wd1Zs6Hc0Yb5Ue2Ja9Gt4Qx7Lp",
  "createdByTokenId": "0b7f3c2a-9e4d-4f1a-8c6b-5d2e7a9f1c3b",
  "updatedByTokenId": "0b7f3c2a-9e4d-4f1a-8c6b-5d2e7a9f1c3b",
  "createdAt": "2026-12-01T08:20:00Z",
  "livemode": true
}
```


## Send a test event

`POST /webhook-endpoints/{endpointId}/test`

Use this to check that your endpoint receives and verifies events. It queues one webhook_endpoint.test event, signed like any other, and answers the pending delivery: read its result with getWebhookDelivery a few seconds later.

Token scope: `webhooks:write`.

### Path parameters

- `endpointId` (string (uuid), required): The endpoint's id.

### Headers

- `Clouduxe-Version` (string): The API version to use, such as 2026-12-01. Omit it to use your token's version. pattern ^[0-9]{4}-[0-9]{2}-[0-9]{2}$.
- `Idempotency-Key` (string, required): A unique key for this logical request, 1 to 128 characters of letters, digits, underscore, dot, colon or hyphen; a UUID is best. Retrying with the same key is safe: the change happens once and the retry gets the same answer. Keys are kept 48 hours. pattern ^[A-Za-z0-9_.:-]{1,128}$.

### Responses

- `202`: The delivery, queued.
- `400`: The request is not valid. Codes: version_invalid, idempotency_key_required, idempotency_key_invalid.
- `401`: Authentication failed. Codes: token_missing, token_invalid, token_expired, token_revoked.
- `403`: The token is not allowed to do this. Codes: forbidden, ip_not_allowed, api_access_disabled, scope_missing.
- `404`: Not found. Codes: not_found.
- `409`: The request conflicts with the object's current state. Codes: idempotency_in_progress.
- `422`: The request is well formed but cannot be carried out. Codes: webhook_url_refused, idempotency_mismatch.
- `429`: A rate limit was reached. Codes: rate_limited.
- `500`: Unexpected error. Codes: internal_error.
- `503`: Temporarily unavailable. Codes: unavailable, outcome_unknown, limits_unavailable.

### Request

curl:
```bash
curl -X POST https://api.clouduxe.com/v1/webhook-endpoints/1f4b8e2d-6a9c-4d3f-a7e5-2c0b9d6f3a8e/test \
  -H "Authorization: Bearer $CLOUDUXE_API_KEY" \
  -H "Idempotency-Key: 6f1c2e9a-4b7d-4e3a-9c8f-1a2b3c4d5e6f"
```

Node SDK:
```javascript
import { Clouduxe } from "@clouduxe/sdk";

const cx = new Clouduxe({ apiKey: process.env.CLOUDUXE_API_KEY });

const webhookDelivery = await cx.webhookEndpoints.test("1f4b8e2d-6a9c-4d3f-a7e5-2c0b9d6f3a8e");
```

Python:
```python
import os
import requests

res = requests.post(
    "https://api.clouduxe.com/v1/webhook-endpoints/1f4b8e2d-6a9c-4d3f-a7e5-2c0b9d6f3a8e/test",
    headers={
        "Authorization": f"Bearer {os.environ['CLOUDUXE_API_KEY']}",
        "Idempotency-Key": "6f1c2e9a-4b7d-4e3a-9c8f-1a2b3c4d5e6f",
    },
)
webhookDelivery = res.json()
```

PHP SDK:
```php
<?php
require 'vendor/autoload.php';

$cx = new \Clouduxe\Clouduxe(['apiKey' => getenv('CLOUDUXE_API_KEY')]);

$webhookDelivery = $cx->webhookEndpoints->test('1f4b8e2d-6a9c-4d3f-a7e5-2c0b9d6f3a8e');
```

fetch:
```javascript
const res = await fetch("https://api.clouduxe.com/v1/webhook-endpoints/1f4b8e2d-6a9c-4d3f-a7e5-2c0b9d6f3a8e/test", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.CLOUDUXE_API_KEY}`,
    "Idempotency-Key": "6f1c2e9a-4b7d-4e3a-9c8f-1a2b3c4d5e6f",
  },
});
const webhookDelivery = await res.json();
```

### Response (`202`)

```json
{
  "object": "webhook_delivery",
  "id": "5b9e2c7a-3d1f-4a8e-b6c2-9f0d4e7a1c3b",
  "eventId": "32ad3352-4e07-56f8-9b40-e8c32b942662",
  "endpointId": "1f4b8e2d-6a9c-4d3f-a7e5-2c0b9d6f3a8e",
  "status": "pending",
  "responseStatus": null,
  "durationMs": null,
  "attemptedAt": null,
  "createdAt": "2026-12-04T10:06:00Z"
}
```


## Redeliver an event

`POST /events/{eventId}/redeliver`

Use this to resend an event of the last 30 days to one of your enabled endpoints, for example after your endpoint was down for more than 3 days. It carries the same event id. The delivery is queued; read its result with getWebhookDelivery.

Token scope: `webhooks:write`.

### Path parameters

- `eventId` (string (uuid), required): The event's id.

### Headers

- `Clouduxe-Version` (string): The API version to use, such as 2026-12-01. Omit it to use your token's version. pattern ^[0-9]{4}-[0-9]{2}-[0-9]{2}$.
- `Idempotency-Key` (string, required): A unique key for this logical request, 1 to 128 characters of letters, digits, underscore, dot, colon or hyphen; a UUID is best. Retrying with the same key is safe: the change happens once and the retry gets the same answer. Keys are kept 48 hours. pattern ^[A-Za-z0-9_.:-]{1,128}$.

### Body (required)

- `endpointId` (string (uuid), required): The endpoint to deliver to. It must be enabled.

### Responses

- `202`: The delivery, queued.
- `400`: The request is not valid. Codes: version_invalid, idempotency_key_required, idempotency_key_invalid, invalid_json, parameter_missing, parameter_invalid, parameter_unknown.
- `401`: Authentication failed. Codes: token_missing, token_invalid, token_expired, token_revoked.
- `403`: The token is not allowed to do this. Codes: forbidden, ip_not_allowed, api_access_disabled, scope_missing.
- `404`: Not found. Codes: not_found.
- `409`: The request conflicts with the object's current state. Codes: idempotency_in_progress.
- `413`: The request body is too large. Codes: request_too_large.
- `415`: Unsupported media type. Codes: unsupported_media_type.
- `422`: The request is well formed but cannot be carried out. Codes: webhook_url_refused, idempotency_mismatch.
- `429`: A rate limit was reached. Codes: rate_limited.
- `500`: Unexpected error. Codes: internal_error.
- `503`: Temporarily unavailable. Codes: unavailable, outcome_unknown, limits_unavailable.

### Request

curl:
```bash
curl -X POST https://api.clouduxe.com/v1/events/3a8c5f2e-0d9b-4e7a-b6c1-7f4e2a9d0c5b/redeliver \
  -H "Authorization: Bearer $CLOUDUXE_API_KEY" \
  -H "Idempotency-Key: 6f1c2e9a-4b7d-4e3a-9c8f-1a2b3c4d5e6f" \
  -H "Content-Type: application/json" \
  -d '{"endpointId":"1f4b8e2d-6a9c-4d3f-a7e5-2c0b9d6f3a8e"}'
```

Node SDK:
```javascript
import { Clouduxe } from "@clouduxe/sdk";

const cx = new Clouduxe({ apiKey: process.env.CLOUDUXE_API_KEY });

const webhookDelivery = await cx.events.redeliver("3a8c5f2e-0d9b-4e7a-b6c1-7f4e2a9d0c5b", { endpointId: "1f4b8e2d-6a9c-4d3f-a7e5-2c0b9d6f3a8e" });
```

Python:
```python
import os
import requests

res = requests.post(
    "https://api.clouduxe.com/v1/events/3a8c5f2e-0d9b-4e7a-b6c1-7f4e2a9d0c5b/redeliver",
    headers={
        "Authorization": f"Bearer {os.environ['CLOUDUXE_API_KEY']}",
        "Idempotency-Key": "6f1c2e9a-4b7d-4e3a-9c8f-1a2b3c4d5e6f",
    },
    json={
        "endpointId": "1f4b8e2d-6a9c-4d3f-a7e5-2c0b9d6f3a8e",
    },
)
webhookDelivery = res.json()
```

PHP SDK:
```php
<?php
require 'vendor/autoload.php';

$cx = new \Clouduxe\Clouduxe(['apiKey' => getenv('CLOUDUXE_API_KEY')]);

$webhookDelivery = $cx->events->redeliver('3a8c5f2e-0d9b-4e7a-b6c1-7f4e2a9d0c5b', ['endpointId' => '1f4b8e2d-6a9c-4d3f-a7e5-2c0b9d6f3a8e']);
```

fetch:
```javascript
const res = await fetch("https://api.clouduxe.com/v1/events/3a8c5f2e-0d9b-4e7a-b6c1-7f4e2a9d0c5b/redeliver", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.CLOUDUXE_API_KEY}`,
    "Idempotency-Key": "6f1c2e9a-4b7d-4e3a-9c8f-1a2b3c4d5e6f",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    endpointId: "1f4b8e2d-6a9c-4d3f-a7e5-2c0b9d6f3a8e"
  }),
});
const webhookDelivery = await res.json();
```

### Response (`202`)

```json
{
  "object": "webhook_delivery",
  "id": "5b9e2c7a-3d1f-4a8e-b6c2-9f0d4e7a1c3b",
  "eventId": "3a8c5f2e-0d9b-4e7a-b6c1-7f4e2a9d0c5b",
  "endpointId": "1f4b8e2d-6a9c-4d3f-a7e5-2c0b9d6f3a8e",
  "status": "pending",
  "responseStatus": null,
  "durationMs": null,
  "attemptedAt": null,
  "createdAt": "2026-12-04T10:06:00Z"
}
```


## Get a webhook delivery

`GET /webhook-deliveries/{deliveryId}`

Use this to read how a test send or a redelivery went: pending, delivered or failed, with your endpoint's status and timing.

Token scope: `webhooks:read`.

### Path parameters

- `deliveryId` (string (uuid), required): The delivery's id.

### Headers

- `Clouduxe-Version` (string): The API version to use, such as 2026-12-01. Omit it to use your token's version. pattern ^[0-9]{4}-[0-9]{2}-[0-9]{2}$.

### Responses

- `200`: The delivery.
- `400`: The request is not valid. Codes: version_invalid.
- `401`: Authentication failed. Codes: token_missing, token_invalid, token_expired, token_revoked.
- `403`: The token is not allowed to do this. Codes: forbidden, ip_not_allowed, api_access_disabled, scope_missing.
- `404`: Not found. Codes: not_found.
- `429`: A rate limit was reached. Codes: rate_limited.
- `500`: Unexpected error. Codes: internal_error.
- `503`: Temporarily unavailable. Codes: unavailable.

### Request

curl:
```bash
curl https://api.clouduxe.com/v1/webhook-deliveries/5b9e2c7a-3d1f-4a8e-b6c2-9f0d4e7a1c3b \
  -H "Authorization: Bearer $CLOUDUXE_API_KEY"
```

Node SDK:
```javascript
import { Clouduxe } from "@clouduxe/sdk";

const cx = new Clouduxe({ apiKey: process.env.CLOUDUXE_API_KEY });

const webhookDelivery = await cx.webhookDeliveries.get("5b9e2c7a-3d1f-4a8e-b6c2-9f0d4e7a1c3b");
```

Python:
```python
import os
import requests

res = requests.get(
    "https://api.clouduxe.com/v1/webhook-deliveries/5b9e2c7a-3d1f-4a8e-b6c2-9f0d4e7a1c3b",
    headers={
        "Authorization": f"Bearer {os.environ['CLOUDUXE_API_KEY']}",
    },
)
webhookDelivery = res.json()
```

PHP SDK:
```php
<?php
require 'vendor/autoload.php';

$cx = new \Clouduxe\Clouduxe(['apiKey' => getenv('CLOUDUXE_API_KEY')]);

$webhookDelivery = $cx->webhookDeliveries->get('5b9e2c7a-3d1f-4a8e-b6c2-9f0d4e7a1c3b');
```

fetch:
```javascript
const res = await fetch("https://api.clouduxe.com/v1/webhook-deliveries/5b9e2c7a-3d1f-4a8e-b6c2-9f0d4e7a1c3b", {
  headers: {
    Authorization: `Bearer ${process.env.CLOUDUXE_API_KEY}`,
  },
});
const webhookDelivery = await res.json();
```

### Response (`200`)

```json
{
  "object": "webhook_delivery",
  "id": "5b9e2c7a-3d1f-4a8e-b6c2-9f0d4e7a1c3b",
  "eventId": "c8a0b2f6-1e4d-5a3b-9c7f-2d6e8a1b4f0c",
  "endpointId": "1f4b8e2d-6a9c-4d3f-a7e5-2c0b9d6f3a8e",
  "status": "delivered",
  "responseStatus": 200,
  "durationMs": 184,
  "attemptedAt": "2026-12-04T10:06:01Z",
  "createdAt": "2026-12-04T10:06:00Z"
}
```


## List events

`GET /events`

Use this to catch up on events from the last 30 days, newest first, for example after downtime on your side.

Token scope: `webhooks:read`.

### Query parameters

- `limit` (integer): How many objects to return, 1 to 100. Default 20. Default `20`. min 1, max 100.
- `cursor` (string): The nextCursor of the previous page. Valid for 24 hours, with the same filters. max length 512.
- `type` (string): Only events of this type. One of `order.paid`, `order.held`, `order.completed`, `order.cancelled`, `service.created`, `service.provisioned`, `service.provisioning_failed`, `service.suspended`, `service.unsuspended`, `service.plan_changed`, `service.cancellation_scheduled`, `service.cancellation_removed`, `service.renewed`, `service.terminating`, `service.terminated`, `action.completed`, `invoice.created`, `invoice.paid`, `invoice.overdue`, `invoice.cancelled`, `wallet.credited`, `ticket.replied`, `ticket.closed`, `api_token.revoked`, `protection.attack_started`, `protection.attack_ended`.
- `createdAfter` (string (date-time)): Only events created after this time.
- `createdBefore` (string (date-time)): Only events created before this time.

### Headers

- `Clouduxe-Version` (string): The API version to use, such as 2026-12-01. Omit it to use your token's version. pattern ^[0-9]{4}-[0-9]{2}-[0-9]{2}$.

### Responses

- `200`: A page of events.
- `400`: The request is not valid. Codes: cursor_invalid, version_invalid, parameter_invalid.
- `401`: Authentication failed. Codes: token_missing, token_invalid, token_expired, token_revoked.
- `403`: The token is not allowed to do this. Codes: forbidden, ip_not_allowed, api_access_disabled, scope_missing.
- `429`: A rate limit was reached. Codes: rate_limited.
- `500`: Unexpected error. Codes: internal_error.
- `503`: Temporarily unavailable. Codes: unavailable.

### Request

curl:
```bash
curl https://api.clouduxe.com/v1/events \
  -H "Authorization: Bearer $CLOUDUXE_API_KEY"
```

Node SDK:
```javascript
import { Clouduxe } from "@clouduxe/sdk";

const cx = new Clouduxe({ apiKey: process.env.CLOUDUXE_API_KEY });

for await (const eventItem of cx.events.list()) {
  console.log(eventItem.id);
}
```

Python:
```python
import os
import requests

res = requests.get(
    "https://api.clouduxe.com/v1/events",
    headers={
        "Authorization": f"Bearer {os.environ['CLOUDUXE_API_KEY']}",
    },
)
page = res.json()
```

PHP SDK:
```php
<?php
require 'vendor/autoload.php';

$cx = new \Clouduxe\Clouduxe(['apiKey' => getenv('CLOUDUXE_API_KEY')]);

foreach ($cx->events->list() as $eventItem) {
    echo $eventItem->id, PHP_EOL;
}
```

fetch:
```javascript
const res = await fetch("https://api.clouduxe.com/v1/events", {
  headers: {
    Authorization: `Bearer ${process.env.CLOUDUXE_API_KEY}`,
  },
});
const page = await res.json();
```

### Response (`200`)

```json
{
  "object": "list",
  "data": [
    {
      "object": "event",
      "id": "3a8c5f2e-0d9b-4e7a-b6c1-7f4e2a9d0c5b",
      "type": "service.provisioned",
      "apiVersion": "2026-12-01",
      "createdAt": "2026-12-04T09:17:51Z",
      "data": {
        "object": {
          "object": "service",
          "id": "c3a1f6d2-8b4e-4a9c-b7d5-2e1f0a3c6b8d",
          "type": "vps",
          "status": "active",
          "suspensionReason": null,
          "deletesAt": null,
          "planId": "vps-nvme-4-mumbai",
          "planName": "NVMe VPS 4 GB",
          "region": "mumbai",
          "label": "node1",
          "reference": "client-4471",
          "metadata": {
            "whmcsServiceId": "18342",
            "plan": "starter"
          },
          "firewallAvailable": true,
          "billing": {
            "cycleMonths": 1,
            "price": {
              "amount": 129900,
              "currency": "INR"
            },
            "currentPeriodStart": "2026-12-04",
            "paidThrough": "2027-01-03",
            "cancelAtPeriodEnd": false,
            "endsOn": null
          },
          "server": {
            "powerState": "running",
            "hostname": "node1.acme.example",
            "ipv4": [
              "203.0.113.24"
            ],
            "ipv6": [
              "2001:db8:4f2a::24"
            ],
            "image": {
              "object": "image",
              "id": "ubuntu-24.04",
              "name": "Ubuntu 24.04 LTS",
              "family": "linux"
            },
            "resources": {
              "cpuCores": 2,
              "memoryMb": 4096,
              "diskGb": 80,
              "trafficGb": 4000
            },
            "statusUpdatedAt": "2026-12-04T10:02:41Z",
            "stale": false
          },
          "proxy": null,
          "createdAt": "2026-12-04T09:15:24Z",
          "livemode": true
        },
        "previousAttributes": {
          "status": "provisioning"
        }
      },
      "livemode": true
    }
  ],
  "hasMore": false,
  "nextCursor": null
}
```


## Get an event

`GET /events/{eventId}`

Use this to fetch one event by its id.

Token scope: `webhooks:read`.

### Path parameters

- `eventId` (string (uuid), required): The event's id.

### Headers

- `Clouduxe-Version` (string): The API version to use, such as 2026-12-01. Omit it to use your token's version. pattern ^[0-9]{4}-[0-9]{2}-[0-9]{2}$.

### Responses

- `200`: The event.
- `400`: The request is not valid. Codes: version_invalid.
- `401`: Authentication failed. Codes: token_missing, token_invalid, token_expired, token_revoked.
- `403`: The token is not allowed to do this. Codes: forbidden, ip_not_allowed, api_access_disabled, scope_missing.
- `404`: Not found. Codes: not_found.
- `429`: A rate limit was reached. Codes: rate_limited.
- `500`: Unexpected error. Codes: internal_error.
- `503`: Temporarily unavailable. Codes: unavailable.

### Request

curl:
```bash
curl https://api.clouduxe.com/v1/events/3a8c5f2e-0d9b-4e7a-b6c1-7f4e2a9d0c5b \
  -H "Authorization: Bearer $CLOUDUXE_API_KEY"
```

Node SDK:
```javascript
import { Clouduxe } from "@clouduxe/sdk";

const cx = new Clouduxe({ apiKey: process.env.CLOUDUXE_API_KEY });

const eventResult = await cx.events.get("3a8c5f2e-0d9b-4e7a-b6c1-7f4e2a9d0c5b");
```

Python:
```python
import os
import requests

res = requests.get(
    "https://api.clouduxe.com/v1/events/3a8c5f2e-0d9b-4e7a-b6c1-7f4e2a9d0c5b",
    headers={
        "Authorization": f"Bearer {os.environ['CLOUDUXE_API_KEY']}",
    },
)
eventResult = res.json()
```

PHP SDK:
```php
<?php
require 'vendor/autoload.php';

$cx = new \Clouduxe\Clouduxe(['apiKey' => getenv('CLOUDUXE_API_KEY')]);

$eventResult = $cx->events->get('3a8c5f2e-0d9b-4e7a-b6c1-7f4e2a9d0c5b');
```

fetch:
```javascript
const res = await fetch("https://api.clouduxe.com/v1/events/3a8c5f2e-0d9b-4e7a-b6c1-7f4e2a9d0c5b", {
  headers: {
    Authorization: `Bearer ${process.env.CLOUDUXE_API_KEY}`,
  },
});
const eventResult = await res.json();
```

### Response (`200`)

```json
{
  "object": "event",
  "id": "3a8c5f2e-0d9b-4e7a-b6c1-7f4e2a9d0c5b",
  "type": "service.provisioned",
  "apiVersion": "2026-12-01",
  "createdAt": "2026-12-04T09:17:51Z",
  "data": {
    "object": {
      "object": "service",
      "id": "c3a1f6d2-8b4e-4a9c-b7d5-2e1f0a3c6b8d",
      "type": "vps",
      "status": "active",
      "suspensionReason": null,
      "deletesAt": null,
      "planId": "vps-nvme-4-mumbai",
      "planName": "NVMe VPS 4 GB",
      "region": "mumbai",
      "label": "node1",
      "reference": "client-4471",
      "metadata": {
        "whmcsServiceId": "18342",
        "plan": "starter"
      },
      "firewallAvailable": true,
      "billing": {
        "cycleMonths": 1,
        "price": {
          "amount": 129900,
          "currency": "INR"
        },
        "currentPeriodStart": "2026-12-04",
        "paidThrough": "2027-01-03",
        "cancelAtPeriodEnd": false,
        "endsOn": null
      },
      "server": {
        "powerState": "running",
        "hostname": "node1.acme.example",
        "ipv4": [
          "203.0.113.24"
        ],
        "ipv6": [
          "2001:db8:4f2a::24"
        ],
        "image": {
          "object": "image",
          "id": "ubuntu-24.04",
          "name": "Ubuntu 24.04 LTS",
          "family": "linux"
        },
        "resources": {
          "cpuCores": 2,
          "memoryMb": 4096,
          "diskGb": 80,
          "trafficGb": 4000
        },
        "statusUpdatedAt": "2026-12-04T10:02:41Z",
        "stale": false
      },
      "proxy": null,
      "createdAt": "2026-12-04T09:15:24Z",
      "livemode": true
    },
    "previousAttributes": {
      "status": "provisioning"
    }
  },
  "livemode": true
}
```
