KyPanelDocs

API reference

Notifications

Panel notifications and the contact channels (email, webhook) alerts go to.

List the account's notifications

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

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

Parameters

NameIn
idpath
limitquery

Responses

  • 200 OK
    Body
    FieldType
    itemsarray of StoreNotification
    unreadinteger
  • 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

Mark the account's notifications as read

POST/api/v1/accounts/{id}/notifications/read

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

Parameters

NameIn
idpath

Request body

FieldType
idstring

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)
  • 500 Internal Server Error: internal

List your notifications

GET/api/v1/notifications

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

Responses

  • 200 OK
    Body
    FieldType
    itemsarray of StoreNotification
    unreadinteger
  • 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

Mark notifications as read

POST/api/v1/notifications/read

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

Request body

FieldType
idstring

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)
  • 500 Internal Server Error: internal

Contact channels and alert priorities

GET/api/v1/server/contacts

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

Responses

  • 200 OK
    Body
    FieldType
    alertsarray of AlertView
    channelsarray of ChannelView
    contact_emailstring
    deliveriesarray of StoreDelivery
    webhook_timeout_secondsinteger
  • 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

Set alert priorities

PUT/api/v1/server/contacts/alerts

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

Request body

FieldType
prioritiesmap of string

Responses

  • 200 OK
    Body
    FieldType
    alertsarray of AlertView
    channelsarray of ChannelView
    contact_emailstring
    deliveriesarray of StoreDelivery
    webhook_timeout_secondsinteger
  • 400 Bad Request: validation
  • 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 contact channel (email or webhook)

POST/api/v1/server/contacts/channels

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

Request body

FieldType
enabledboolean
min_prioritystring
targetstring
typestring

Responses

  • 201 Created
    Body

    map of any

  • 400 Bad Request: validation
  • 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

Delete a contact channel

DELETE/api/v1/server/contacts/channels/{id}

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

Parameters

NameIn
idpath

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

Update a contact channel

PUT/api/v1/server/contacts/channels/{id}

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

Parameters

NameIn
idpath

Request body

FieldType
enabledboolean
min_prioritystring
targetstring
typestring

Responses

  • 200 OK
    Body
    FieldType
    created_atinteger
    enabledboolean
    has_secretboolean
    idstring
    min_prioritystring
    targetstring
    type alwaysstring
    updated_atinteger
  • 400 Bad Request: validation
  • 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 webhook channel's secret

POST/api/v1/server/contacts/channels/{id}/rotate-secret

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

Parameters

NameIn
idpath

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
  • 409 Conflict: not-webhook
  • 500 Internal Server Error: internal

Send a test notification

POST/api/v1/server/contacts/test

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

Request body

FieldType
channel_idstring

Responses

  • 200 OK
    Body
    FieldType
    resultsarray of Result
  • 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
  • 409 Conflict: no-channels
  • 500 Internal Server Error: internal