Skip to main content

Notification Channels

List notification channels

GET
/channels
AuthorizationBearer <token>

API key issued to a Sonzai project. Format: Bearer sk_....

In: header

Response Body

application/json

application/problem+json

curl -X GET "https://loading/api/v1/channels"
{
  "$schema": "/api/v1/schemas/ListChannelsOutputBody.json",
  "channels": [
    {
      "$schema": "/api/v1/schemas/ChannelDTO.json",
      "active": true,
      "channel_id": "string",
      "config": {
        "property1": null,
        "property2": null
      },
      "created_at": "2019-08-24T14:15:22Z",
      "events": [
        "string"
      ],
      "filter": {
        "property1": null,
        "property2": null
      },
      "name": "string",
      "project_id": "string",
      "type": "string",
      "updated_at": "2019-08-24T14:15:22Z"
    }
  ]
}
{
  "$schema": "/api/v1/schemas/ErrorModel.json",
  "detail": "Property foo is required but is missing.",
  "errors": [
    {
      "location": "string",
      "message": "string",
      "value": null
    }
  ],
  "instance": "https://example.com/error-log/abc123",
  "status": 400,
  "title": "Bad Request",
  "type": "https://example.com/errors/example"
}

Create a notification channel

POST
/channels
AuthorizationBearer <token>

API key issued to a Sonzai project. Format: Bearer sk_....

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/problem+json

curl -X POST "https://loading/api/v1/channels" \  -H "Content-Type: application/json" \  -d '{    "name": "string",    "type": "webhook"  }'
{
  "$schema": "/api/v1/schemas/ChannelDTO.json",
  "active": true,
  "channel_id": "string",
  "config": {
    "property1": null,
    "property2": null
  },
  "created_at": "2019-08-24T14:15:22Z",
  "events": [
    "string"
  ],
  "filter": {
    "property1": null,
    "property2": null
  },
  "name": "string",
  "project_id": "string",
  "type": "string",
  "updated_at": "2019-08-24T14:15:22Z"
}
{
  "$schema": "/api/v1/schemas/ErrorModel.json",
  "detail": "Property foo is required but is missing.",
  "errors": [
    {
      "location": "string",
      "message": "string",
      "value": null
    }
  ],
  "instance": "https://example.com/error-log/abc123",
  "status": 400,
  "title": "Bad Request",
  "type": "https://example.com/errors/example"
}

Get a notification channel

GET
/channels/{channelId}
AuthorizationBearer <token>

API key issued to a Sonzai project. Format: Bearer sk_....

In: header

Path Parameters

channelId*string

Channel UUID

Response Body

application/json

application/problem+json

curl -X GET "https://loading/api/v1/channels/string"
{
  "$schema": "/api/v1/schemas/ChannelDTO.json",
  "active": true,
  "channel_id": "string",
  "config": {
    "property1": null,
    "property2": null
  },
  "created_at": "2019-08-24T14:15:22Z",
  "events": [
    "string"
  ],
  "filter": {
    "property1": null,
    "property2": null
  },
  "name": "string",
  "project_id": "string",
  "type": "string",
  "updated_at": "2019-08-24T14:15:22Z"
}
{
  "$schema": "/api/v1/schemas/ErrorModel.json",
  "detail": "Property foo is required but is missing.",
  "errors": [
    {
      "location": "string",
      "message": "string",
      "value": null
    }
  ],
  "instance": "https://example.com/error-log/abc123",
  "status": 400,
  "title": "Bad Request",
  "type": "https://example.com/errors/example"
}

Delete a notification channel

DELETE
/channels/{channelId}
AuthorizationBearer <token>

API key issued to a Sonzai project. Format: Bearer sk_....

In: header

Path Parameters

channelId*string

Channel UUID

Response Body

application/problem+json

curl -X DELETE "https://loading/api/v1/channels/string"
Empty
{
  "$schema": "/api/v1/schemas/ErrorModel.json",
  "detail": "Property foo is required but is missing.",
  "errors": [
    {
      "location": "string",
      "message": "string",
      "value": null
    }
  ],
  "instance": "https://example.com/error-log/abc123",
  "status": 400,
  "title": "Bad Request",
  "type": "https://example.com/errors/example"
}

Update a notification channel

PUT
/channels/{channelId}
AuthorizationBearer <token>

API key issued to a Sonzai project. Format: Bearer sk_....

In: header

Path Parameters

channelId*string

Channel UUID

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/problem+json

curl -X PUT "https://loading/api/v1/channels/string" \  -H "Content-Type: application/json" \  -d '{    "name": "string",    "type": "webhook"  }'
{
  "$schema": "/api/v1/schemas/ChannelDTO.json",
  "active": true,
  "channel_id": "string",
  "config": {
    "property1": null,
    "property2": null
  },
  "created_at": "2019-08-24T14:15:22Z",
  "events": [
    "string"
  ],
  "filter": {
    "property1": null,
    "property2": null
  },
  "name": "string",
  "project_id": "string",
  "type": "string",
  "updated_at": "2019-08-24T14:15:22Z"
}
{
  "$schema": "/api/v1/schemas/ErrorModel.json",
  "detail": "Property foo is required but is missing.",
  "errors": [
    {
      "location": "string",
      "message": "string",
      "value": null
    }
  ],
  "instance": "https://example.com/error-log/abc123",
  "status": 400,
  "title": "Bad Request",
  "type": "https://example.com/errors/example"
}

List notification channels for a project

GET
/projects/{projectId}/channels
AuthorizationBearer <token>

API key issued to a Sonzai project. Format: Bearer sk_....

In: header

Path Parameters

projectId*string

Project UUID

Response Body

application/json

application/problem+json

curl -X GET "https://loading/api/v1/projects/string/channels"
{
  "$schema": "/api/v1/schemas/ListChannelsOutputBody.json",
  "channels": [
    {
      "$schema": "/api/v1/schemas/ChannelDTO.json",
      "active": true,
      "channel_id": "string",
      "config": {
        "property1": null,
        "property2": null
      },
      "created_at": "2019-08-24T14:15:22Z",
      "events": [
        "string"
      ],
      "filter": {
        "property1": null,
        "property2": null
      },
      "name": "string",
      "project_id": "string",
      "type": "string",
      "updated_at": "2019-08-24T14:15:22Z"
    }
  ]
}
{
  "$schema": "/api/v1/schemas/ErrorModel.json",
  "detail": "Property foo is required but is missing.",
  "errors": [
    {
      "location": "string",
      "message": "string",
      "value": null
    }
  ],
  "instance": "https://example.com/error-log/abc123",
  "status": 400,
  "title": "Bad Request",
  "type": "https://example.com/errors/example"
}

Create a notification channel for a project

POST
/projects/{projectId}/channels
AuthorizationBearer <token>

API key issued to a Sonzai project. Format: Bearer sk_....

In: header

Path Parameters

projectId*string

Project UUID

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/problem+json

curl -X POST "https://loading/api/v1/projects/string/channels" \  -H "Content-Type: application/json" \  -d '{    "name": "string",    "type": "webhook"  }'
{
  "$schema": "/api/v1/schemas/ChannelDTO.json",
  "active": true,
  "channel_id": "string",
  "config": {
    "property1": null,
    "property2": null
  },
  "created_at": "2019-08-24T14:15:22Z",
  "events": [
    "string"
  ],
  "filter": {
    "property1": null,
    "property2": null
  },
  "name": "string",
  "project_id": "string",
  "type": "string",
  "updated_at": "2019-08-24T14:15:22Z"
}
{
  "$schema": "/api/v1/schemas/ErrorModel.json",
  "detail": "Property foo is required but is missing.",
  "errors": [
    {
      "location": "string",
      "message": "string",
      "value": null
    }
  ],
  "instance": "https://example.com/error-log/abc123",
  "status": 400,
  "title": "Bad Request",
  "type": "https://example.com/errors/example"
}

Get a notification channel for a project

GET
/projects/{projectId}/channels/{channelId}
AuthorizationBearer <token>

API key issued to a Sonzai project. Format: Bearer sk_....

In: header

Path Parameters

projectId*string

Project UUID

channelId*string

Channel UUID

Response Body

application/json

application/problem+json

curl -X GET "https://loading/api/v1/projects/string/channels/string"
{
  "$schema": "/api/v1/schemas/ChannelDTO.json",
  "active": true,
  "channel_id": "string",
  "config": {
    "property1": null,
    "property2": null
  },
  "created_at": "2019-08-24T14:15:22Z",
  "events": [
    "string"
  ],
  "filter": {
    "property1": null,
    "property2": null
  },
  "name": "string",
  "project_id": "string",
  "type": "string",
  "updated_at": "2019-08-24T14:15:22Z"
}
{
  "$schema": "/api/v1/schemas/ErrorModel.json",
  "detail": "Property foo is required but is missing.",
  "errors": [
    {
      "location": "string",
      "message": "string",
      "value": null
    }
  ],
  "instance": "https://example.com/error-log/abc123",
  "status": 400,
  "title": "Bad Request",
  "type": "https://example.com/errors/example"
}

Delete a notification channel for a project

DELETE
/projects/{projectId}/channels/{channelId}
AuthorizationBearer <token>

API key issued to a Sonzai project. Format: Bearer sk_....

In: header

Path Parameters

projectId*string

Project UUID

channelId*string

Channel UUID

Response Body

application/problem+json

curl -X DELETE "https://loading/api/v1/projects/string/channels/string"
Empty
{
  "$schema": "/api/v1/schemas/ErrorModel.json",
  "detail": "Property foo is required but is missing.",
  "errors": [
    {
      "location": "string",
      "message": "string",
      "value": null
    }
  ],
  "instance": "https://example.com/error-log/abc123",
  "status": 400,
  "title": "Bad Request",
  "type": "https://example.com/errors/example"
}

Update a notification channel for a project

PUT
/projects/{projectId}/channels/{channelId}
AuthorizationBearer <token>

API key issued to a Sonzai project. Format: Bearer sk_....

In: header

Path Parameters

projectId*string

Project UUID

channelId*string

Channel UUID

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/problem+json

curl -X PUT "https://loading/api/v1/projects/string/channels/string" \  -H "Content-Type: application/json" \  -d '{    "name": "string",    "type": "webhook"  }'
{
  "$schema": "/api/v1/schemas/ChannelDTO.json",
  "active": true,
  "channel_id": "string",
  "config": {
    "property1": null,
    "property2": null
  },
  "created_at": "2019-08-24T14:15:22Z",
  "events": [
    "string"
  ],
  "filter": {
    "property1": null,
    "property2": null
  },
  "name": "string",
  "project_id": "string",
  "type": "string",
  "updated_at": "2019-08-24T14:15:22Z"
}
{
  "$schema": "/api/v1/schemas/ErrorModel.json",
  "detail": "Property foo is required but is missing.",
  "errors": [
    {
      "location": "string",
      "message": "string",
      "value": null
    }
  ],
  "instance": "https://example.com/error-log/abc123",
  "status": 400,
  "title": "Bad Request",
  "type": "https://example.com/errors/example"
}