Skip to content

Interface: WebhooksApi ​

The methods of Talkline.webhooks.

Methods ​

create() ​

ts
create(body): Promise<WebhookEndpointWithSecret>;

POST /v1/webhooks: the answer carries the signing secret, which nothing shows again.

Parameters ​

ParameterType
bodyCreateWebhookRequest

Returns ​

Promise<WebhookEndpointWithSecret>


deliveries() ​

ts
deliveries(id, query?): Promise<Page<Delivery>>;

GET /v1/webhooks/{id}/deliveries, one page.

Parameters ​

ParameterType
idstring
query?ListDeliveriesQuery

Returns ​

Promise<Page<Delivery>>


get() ​

ts
get(id): Promise<WebhookEndpoint>;

GET /v1/webhooks/{id}.

Parameters ​

ParameterType
idstring

Returns ​

Promise<WebhookEndpoint>


iterate() ​

ts
iterate(query?): AsyncIterable<WebhookEndpoint>;

GET /v1/webhooks, every page in turn.

Parameters ​

ParameterType
query?Pageless<PageQuery>

Returns ​

AsyncIterable<WebhookEndpoint>


iterateDeliveries() ​

ts
iterateDeliveries(id, query?): AsyncIterable<Delivery>;

GET /v1/webhooks/{id}/deliveries, every page in turn.

Parameters ​

ParameterType
idstring
query?Pageless<ListDeliveriesQuery>

Returns ​

AsyncIterable<Delivery>


list() ​

ts
list(query?): Promise<Page<WebhookEndpoint>>;

GET /v1/webhooks, one page.

Parameters ​

ParameterType
query?PageQuery

Returns ​

Promise<Page<WebhookEndpoint>>


remove() ​

ts
remove(id): Promise<void>;

DELETE /v1/webhooks/{id}.

Parameters ​

ParameterType
idstring

Returns ​

Promise<void>


rotateSecret() ​

ts
rotateSecret(id): Promise<WebhookEndpointWithSecret>;

POST /v1/webhooks/{id}/secret: every attempt from now on is signed with the new secret, retries included. The answer carries it, and nothing shows it again.

Parameters ​

ParameterType
idstring

Returns ​

Promise<WebhookEndpointWithSecret>


update() ​

ts
update(id, body): Promise<WebhookEndpoint>;

PATCH /v1/webhooks/{id}: status: 'active' resumes a paused or failing endpoint, and sends what it held.

Parameters ​

ParameterType
idstring
bodyUpdateWebhookRequest

Returns ​

Promise<WebhookEndpoint>

Talkline documentation