KyPanelDocs

API reference

Webhooks

Outgoing webhooks and the event feed.

Account event feed

GET/api/v1/accounts/{id}/events

GET /events?after=<seq>&type=a,b&limit=n — the outbox as a feed, for integrations that poll.

Who
root, reseller (ACL: create-user-session); customer
API tokens
admin token area: accounts; account token area: events
Feature
api_tokens
Operation
listEventsForAccount · ky call listEventsForAccount

Parameters

NameIn
idpath
afterquery
limitquery
typequery

Responses

  • 200 OK
    Body
    FieldType
    itemsarray of StoreEvent
    nextinteger
  • 401 Unauthorized: no session, or an invalid or expired token
  • 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
  • 500 Internal Server Error: internal

List the account's webhooks

GET/api/v1/accounts/{id}/webhooks

Who
root, reseller (ACL: create-user-session); customer
API tokens
admin token area: accounts; account token area: webhooks
Feature
api_tokens
Operation
listWebhooksForAccount · ky call listWebhooksForAccount

Parameters

NameIn
idpath

Responses

  • 200 OK
    Body
    FieldType
    itemsarray of StoreWebhookEndpoint
  • 401 Unauthorized: no session, or an invalid or expired token
  • 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
  • 500 Internal Server Error: internal

Add an account webhook

POST/api/v1/accounts/{id}/webhooks

Who
root, reseller (ACL: create-user-session); customer
API tokens
admin token area: accounts; account token area: webhooks
Feature
api_tokens
Operation
createWebhookForAccount · ky call createWebhookForAccount

Parameters

NameIn
idpath

Request body

FieldType
descriptionstring
enabledboolean
eventsarray of string
urlstring

Responses

  • 201 Created
    Body
    FieldType
    secretstring
    webhookStoreWebhookEndpoint
  • 401 Unauthorized: no session, or an invalid or expired token
  • 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
  • 409 Conflict: too-many
  • 422 Unprocessable Entity: invalid-description, invalid-events, invalid-url
  • 500 Internal Server Error: internal

Delete an account webhook

DELETE/api/v1/accounts/{id}/webhooks/{wid}

Who
root, reseller (ACL: create-user-session); customer
API tokens
admin token area: accounts; account token area: webhooks
Feature
api_tokens
Operation
deleteWebhookForAccount · ky call deleteWebhookForAccount

Parameters

NameIn
idpath
widpath

Responses

  • 204 Done, no content
  • 401 Unauthorized: no session, or an invalid or expired token
  • 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
  • 404 Not Found: not-found
  • 500 Internal Server Error: internal

Get an account webhook

GET/api/v1/accounts/{id}/webhooks/{wid}

Who
root, reseller (ACL: create-user-session); customer
API tokens
admin token area: accounts; account token area: webhooks
Feature
api_tokens
Operation
getWebhookForAccount · ky call getWebhookForAccount

Parameters

NameIn
idpath
widpath

Responses

  • 200 OK
    Body
    FieldType
    account_idstring
    consecutive_failures alwaysinteger
    created_at alwaysinteger
    description alwaysstring
    disabled_reasonstring
    enabled alwaysboolean
    events alwaysarray of string
    id alwaysstring
    owner_type alwaysstring
    updated_at alwaysinteger
    url alwaysstring
  • 401 Unauthorized: no session, or an invalid or expired token
  • 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
  • 404 Not Found: not-found
  • 500 Internal Server Error: internal

Update an account webhook

PATCH/api/v1/accounts/{id}/webhooks/{wid}

Who
root, reseller (ACL: create-user-session); customer
API tokens
admin token area: accounts; account token area: webhooks
Feature
api_tokens
Operation
updateWebhookForAccount · ky call updateWebhookForAccount

Parameters

NameIn
idpath
widpath

Request body

FieldType
descriptionstring
enabledboolean
eventsarray of string
urlstring

Responses

  • 200 OK
    Body
    FieldType
    account_idstring
    consecutive_failures alwaysinteger
    created_at alwaysinteger
    description alwaysstring
    disabled_reasonstring
    enabled alwaysboolean
    events alwaysarray of string
    id alwaysstring
    owner_type alwaysstring
    updated_at alwaysinteger
    url alwaysstring
  • 401 Unauthorized: no session, or an invalid or expired token
  • 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
  • 404 Not Found: not-found
  • 422 Unprocessable Entity: invalid-description, invalid-events, invalid-url
  • 500 Internal Server Error: internal

List an account webhook's deliveries

GET/api/v1/accounts/{id}/webhooks/{wid}/deliveries

Who
root, reseller (ACL: create-user-session); customer
API tokens
admin token area: accounts; account token area: webhooks
Feature
api_tokens
Operation
webhookDeliveriesForAccount · ky call webhookDeliveriesForAccount

Parameters

NameIn
idpath
widpath
limitquery

Responses

  • 200 OK
    Body
    FieldType
    itemsarray of StoreWebhookDelivery
  • 401 Unauthorized: no session, or an invalid or expired token
  • 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
  • 404 Not Found: not-found
  • 500 Internal Server Error: internal

Redeliver an account webhook delivery

POST/api/v1/accounts/{id}/webhooks/{wid}/deliveries/{did}/redeliver

Who
root, reseller (ACL: create-user-session); customer
API tokens
admin token area: accounts; account token area: webhooks
Feature
api_tokens
Operation
redeliverWebhookForAccount · ky call redeliverWebhookForAccount

Parameters

NameIn
idpath
widpath
didpath

Responses

  • 202 Accepted (runs in the background)
  • 401 Unauthorized: no session, or an invalid or expired token
  • 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
  • 404 Not Found: not-found
  • 500 Internal Server Error: internal

Rotate an account webhook's secret

POST/api/v1/accounts/{id}/webhooks/{wid}/rotate-secret

Who
root, reseller (ACL: create-user-session); customer
API tokens
admin token area: accounts; account token area: webhooks
Feature
api_tokens
Operation
rotateWebhookSecretForAccount · ky call rotateWebhookSecretForAccount

Parameters

NameIn
idpath
widpath

Responses

  • 200 OK
    Body
    FieldType
    secretstring
  • 401 Unauthorized: no session, or an invalid or expired token
  • 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
  • 404 Not Found: not-found
  • 500 Internal Server Error: internal

Send a test event to an account webhook

POST/api/v1/accounts/{id}/webhooks/{wid}/test

Queues a webhook.ping to this endpoint only, whatever its event list.

Who
root, reseller (ACL: create-user-session); customer
API tokens
admin token area: accounts; account token area: webhooks
Feature
api_tokens
Operation
testWebhookForAccount · ky call testWebhookForAccount

Parameters

NameIn
idpath
widpath

Responses

  • 202 Accepted (runs in the background)
    Body
    FieldType
    event_idstring
  • 401 Unauthorized: no session, or an invalid or expired token
  • 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
  • 404 Not Found: not-found
  • 500 Internal Server Error: internal

Events an account webhook can receive

GET/api/v1/accounts/{id}/webhooks/events

Who
root, reseller (ACL: create-user-session); customer
API tokens
admin token area: accounts; account token area: webhooks
Feature
api_tokens
Operation
webhookCatalogForAccount · ky call webhookCatalogForAccount

Parameters

NameIn
idpath

Responses

  • 200 OK
    Body
    FieldType
    itemsarray of WebhooksEventType
  • 401 Unauthorized: no session, or an invalid or expired token
  • 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)

Server event feed

GET/api/v1/events

GET /events?after=<seq>&type=a,b&limit=n — the outbox as a feed, for integrations that poll.

Who
root
API tokens
admin token area: server
Operation
listEvents · ky call listEvents

Parameters

NameIn
afterquery
limitquery
typequery

Responses

  • 200 OK
    Body
    FieldType
    itemsarray of StoreEvent
    nextinteger
  • 401 Unauthorized: no session, or an invalid or expired token
  • 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
  • 500 Internal Server Error: internal

List server webhooks

GET/api/v1/webhooks

Who
root
API tokens
admin token area: server
Operation
listWebhooks · ky call listWebhooks

Responses

  • 200 OK
    Body
    FieldType
    itemsarray of StoreWebhookEndpoint
  • 401 Unauthorized: no session, or an invalid or expired token
  • 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
  • 500 Internal Server Error: internal

Add a server webhook

POST/api/v1/webhooks

Who
root
API tokens
admin token area: server
Operation
createWebhook · ky call createWebhook

Request body

FieldType
descriptionstring
enabledboolean
eventsarray of string
urlstring

Responses

  • 201 Created
    Body
    FieldType
    secretstring
    webhookStoreWebhookEndpoint
  • 401 Unauthorized: no session, or an invalid or expired token
  • 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
  • 409 Conflict: too-many
  • 422 Unprocessable Entity: invalid-description, invalid-events, invalid-url
  • 500 Internal Server Error: internal

Delete a server webhook

DELETE/api/v1/webhooks/{wid}

Who
root
API tokens
admin token area: server
Operation
deleteWebhook · ky call deleteWebhook

Parameters

NameIn
widpath

Responses

  • 204 Done, no content
  • 401 Unauthorized: no session, or an invalid or expired token
  • 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
  • 404 Not Found: not-found
  • 500 Internal Server Error: internal

Get a server webhook

GET/api/v1/webhooks/{wid}

Who
root
API tokens
admin token area: server
Operation
getWebhook · ky call getWebhook

Parameters

NameIn
widpath

Responses

  • 200 OK
    Body
    FieldType
    account_idstring
    consecutive_failures alwaysinteger
    created_at alwaysinteger
    description alwaysstring
    disabled_reasonstring
    enabled alwaysboolean
    events alwaysarray of string
    id alwaysstring
    owner_type alwaysstring
    updated_at alwaysinteger
    url alwaysstring
  • 401 Unauthorized: no session, or an invalid or expired token
  • 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
  • 404 Not Found: not-found
  • 500 Internal Server Error: internal

Update a server webhook

PATCH/api/v1/webhooks/{wid}

Who
root
API tokens
admin token area: server
Operation
updateWebhook · ky call updateWebhook

Parameters

NameIn
widpath

Request body

FieldType
descriptionstring
enabledboolean
eventsarray of string
urlstring

Responses

  • 200 OK
    Body
    FieldType
    account_idstring
    consecutive_failures alwaysinteger
    created_at alwaysinteger
    description alwaysstring
    disabled_reasonstring
    enabled alwaysboolean
    events alwaysarray of string
    id alwaysstring
    owner_type alwaysstring
    updated_at alwaysinteger
    url alwaysstring
  • 401 Unauthorized: no session, or an invalid or expired token
  • 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
  • 404 Not Found: not-found
  • 422 Unprocessable Entity: invalid-description, invalid-events, invalid-url
  • 500 Internal Server Error: internal

List a server webhook's deliveries

GET/api/v1/webhooks/{wid}/deliveries

Who
root
API tokens
admin token area: server
Operation
webhookDeliveries · ky call webhookDeliveries

Parameters

NameIn
widpath
limitquery

Responses

  • 200 OK
    Body
    FieldType
    itemsarray of StoreWebhookDelivery
  • 401 Unauthorized: no session, or an invalid or expired token
  • 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
  • 404 Not Found: not-found
  • 500 Internal Server Error: internal

Redeliver a server webhook delivery

POST/api/v1/webhooks/{wid}/deliveries/{did}/redeliver

Who
root
API tokens
admin token area: server
Operation
redeliverWebhook · ky call redeliverWebhook

Parameters

NameIn
widpath
didpath

Responses

  • 202 Accepted (runs in the background)
  • 401 Unauthorized: no session, or an invalid or expired token
  • 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
  • 404 Not Found: not-found
  • 500 Internal Server Error: internal

Rotate a server webhook's secret

POST/api/v1/webhooks/{wid}/rotate-secret

Who
root
API tokens
admin token area: server
Operation
rotateWebhookSecret · ky call rotateWebhookSecret

Parameters

NameIn
widpath

Responses

  • 200 OK
    Body
    FieldType
    secretstring
  • 401 Unauthorized: no session, or an invalid or expired token
  • 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
  • 404 Not Found: not-found
  • 500 Internal Server Error: internal

Send a test event to a server webhook

POST/api/v1/webhooks/{wid}/test

Queues a webhook.ping to this endpoint only, whatever its event list.

Who
root
API tokens
admin token area: server
Operation
testWebhook · ky call testWebhook

Parameters

NameIn
widpath

Responses

  • 202 Accepted (runs in the background)
    Body
    FieldType
    event_idstring
  • 401 Unauthorized: no session, or an invalid or expired token
  • 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
  • 404 Not Found: not-found
  • 500 Internal Server Error: internal

Event catalog

GET/api/v1/webhooks/events

Who
root
API tokens
admin token area: server
Operation
webhookCatalog · ky call webhookCatalog

Responses

  • 200 OK
    Body
    FieldType
    itemsarray of WebhooksEventType
  • 401 Unauthorized: no session, or an invalid or expired token
  • 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)