POST
/
v2
/
workspaces
/
{workspace_id}
/
webhooks
JavaScript
import Honcho from '@honcho-ai/core';

const client = new Honcho({
  apiKey: 'My API Key',
});

const webhookEndpoint = await client.workspaces.webhooks.getOrCreate('workspace_id', { url: 'url' });

console.log(webhookEndpoint.id);
{
  "id": "<string>",
  "workspace_id": "<string>",
  "url": "<string>",
  "created_at": "2023-11-07T05:31:56Z"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

workspace_id
string
required

Workspace ID

Body

application/json

Webhook endpoint parameters

Response

200
application/json

Successful Response

The response is of type object.