POST
/v1/platform/webhooksPOST /v1/platform/webhooks
Scopes: platform:webhooks:write
Requires scope: platform:webhooks:write.
Request body
| Field | Type | Required | Description |
|---|---|---|---|
url | string | no | |
event_types | string[] | no | |
description | string | no |
Response (200)
| Field | Type | Required | Description |
|---|---|---|---|
id | string<uuid> | no | |
url | string | no | |
event_types | string[] | no | |
description | string | no | |
signing_secret | string | no | |
status | string | no | |
created_at | string<date-time> | no |
Examples
import { SolidCommerceClient } from '@solidcommerce/sdk';
const client = new SolidCommerceClient({
apiKey: process.env.SOLIDCOMMERCE_API_KEY!,
});
const { data, error } = await client.raw.POST('/v1/platform/webhooks', {
// params: { path: { id: '...' }, query: { limit: 25 } },
// body: { /* request body */ },
});
if (error) throw error;
console.log(data);