Notifications

List all email notification channels for an organisation

get
Authorizations
Responses
200

OK

application/json
get
GET /notifications/v1/channels/emails HTTP/1.1
Host: api.skysql.com/
X-API-Key: YOUR_API_KEY
Accept: */*
[
  {
    "categories": [
      "text"
    ],
    "channel_name": "text",
    "id": "text",
    "org_id": "text",
    "receivers": [
      {
        "email": "text",
        "name": "text"
      }
    ],
    "subscriber_id": "text"
  }
]

Create email notification channel for an organisation

post
Authorizations
Body
categoriesstring[]Optional
channel_namestringOptional
Responses
201

Created

application/json
post
POST /notifications/v1/channels/emails HTTP/1.1
Host: api.skysql.com/
X-API-Key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 90

{
  "categories": [
    "text"
  ],
  "channel_name": "text",
  "receivers": [
    {
      "email": "text",
      "name": "text"
    }
  ]
}
{
  "categories": [
    "text"
  ],
  "channel_name": "text",
  "id": "text",
  "org_id": "text",
  "receivers": [
    {
      "email": "text",
      "name": "text"
    }
  ],
  "subscriber_id": "text"
}

Get email notification channel

get
Authorizations
Path parameters
channel_idstringRequired

channel id

Responses
200

OK

application/json
get
GET /notifications/v1/channels/emails/{channel_id} HTTP/1.1
Host: api.skysql.com/
X-API-Key: YOUR_API_KEY
Accept: */*
{
  "categories": [
    "text"
  ],
  "channel_name": "text",
  "id": "text",
  "org_id": "text",
  "receivers": [
    {
      "email": "text",
      "name": "text"
    }
  ],
  "subscriber_id": "text"
}

Delete email notification channel

delete
Path parameters
channel_idstringRequired

channel id

Responses
200

OK

No content

delete
DELETE /notifications/v1/channels/emails/{channel_id} HTTP/1.1
Host: api.skysql.com/
Accept: */*

No content

Update email notification channel

patch
Authorizations
Path parameters
channel_idstringRequired

channel id

Body
categoriesstring[]Optional
channel_namestringOptional
Responses
200

OK

No content

patch
PATCH /notifications/v1/channels/emails/{channel_id} HTTP/1.1
Host: api.skysql.com/
X-API-Key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 90

{
  "categories": [
    "text"
  ],
  "channel_name": "text",
  "receivers": [
    {
      "email": "text",
      "name": "text"
    }
  ]
}

No content

Get notifications of organisation

get
Authorizations
Query parameters
page_sizeintegerOptional

Number of records per page.

page_tokenstringOptional

Page token to fetch next or previous page.

categorystringOptional

comma separated list of categories to filter

service_namestringOptional

service name filter

created_beforestringOptional

timestamp(epoch). return rows where created_on < created_before

created_afterstringOptional

timestamp(epoch). return rows where created_on > created_after

Responses
200

OK

application/json
get
GET /notifications/v1/notifications HTTP/1.1
Host: api.skysql.com/
X-API-Key: YOUR_API_KEY
Accept: */*
[
  {
    "category": "text",
    "created_by": "text",
    "created_on": 1,
    "display_string": "text",
    "event_type": "text",
    "id": "text",
    "level": "text",
    "marked_read": true,
    "org_id": "text",
    "subscriber_id": "text"
  }
]

mark notifications as read

put
Authorizations
Body
last_read_onintegerOptional
Responses
200

OK

No content

put
PUT /notifications/v1/notifications/read HTTP/1.1
Host: api.skysql.com/
X-API-Key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 18

{
  "last_read_on": 1
}

No content

Get notification preference/subscription of a subscriber

get
Authorizations
Responses
200

OK

application/json
get
GET /notifications/v1/preferences HTTP/1.1
Host: api.skysql.com/
X-API-Key: YOUR_API_KEY
Accept: */*
{
  "categories": {
    "ANY_ADDITIONAL_PROPERTY": true
  },
  "org_id": "text",
  "subscriber_id": "text"
}

update notification preference/subscription of a subscriber

put
Authorizations
Body
Responses
200

OK

No content

put
PUT /notifications/v1/preferences HTTP/1.1
Host: api.skysql.com/
X-API-Key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 47

{
  "categories": {
    "ANY_ADDITIONAL_PROPERTY": true
  }
}

No content

Was this helpful?