BotDistrikt Platform (9.0.1)

BotDistrikt is a chatbot platform to build great user experiences without any coding required.

API Reference

The BotDistrikt API is organized around JSONAPI. Our API has predictable resource-oriented URLs, accepts form-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

Cross-Origin Resource Sharing

This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with W3C spec. And that allows cross-domain communication from the browser. All responses have a wildcard same-origin which makes them completely public and accessible to everyone, including any code on any site.

Authentication

BotDistrikt offers two forms of authentication:

  • Authorization
  • access_token

Please see https://loopback.io/doc/en/lb3/Making-authenticated-requests.html#making-authenticated-requests-with-access-tokens for more information on how to use them

Authorization

Security Scheme Type API Key
Header parameter name: Authorization

access_token

Security Scheme Type API Key
Query parameter name: access_token

bot

A chatbot instance

Create a new instance of the model and persist it into the data source.

Request Body schema:

Model instance data

about
string
name
string
profile_pic
string
cover_photo
string
session_ttl
number <double>
Default: 10

The maximum number of minutes a session can be inactive before it expires. Used to calculate the length and frequency of chat sessions with end-users.

traits
object
personality_rules
object
global_defaults
object
id
number <double>
created_at
string <date-time>
updated_at
string <date-time>
profile_image_id
number <double>

Responses

200

Request was successful

post /bots

Default Server

https://flow.botdistrikt.com/api/bots
/api/bots

Request samples

Content type
Copy
Expand all Collapse all
{
  • "about": "string",
  • "name": "string",
  • "profile_pic": "string",
  • "cover_photo": "string",
  • "session_ttl": 10,
  • "traits": { },
  • "personality_rules": { },
  • "global_defaults": { },
  • "id": 0,
  • "created_at": "2020-02-28T06:59:50Z",
  • "updated_at": "2020-02-28T06:59:50Z",
  • "profile_image_id": 0
}

Response samples

Content type
Copy
Expand all Collapse all
{
  • "about": "string",
  • "name": "string",
  • "profile_pic": "string",
  • "cover_photo": "string",
  • "session_ttl": 10,
  • "traits": { },
  • "personality_rules": { },
  • "global_defaults": { },
  • "id": 0,
  • "created_at": "2020-02-28T06:59:50Z",
  • "updated_at": "2020-02-28T06:59:50Z",
  • "profile_image_id": 0
}

Find all instances of the model matched by filter from the data source.

query Parameters
filter
string <JSON>

Filter defining fields, where, include, order, offset, and limit - must be a JSON-encoded string ({"where":{"something":"value"}}). See https://loopback.io/doc/en/lb3/Querying-data.html#using-stringified-json-in-rest-queries for more details.

Responses

200

Request was successful

get /bots

Default Server

https://flow.botdistrikt.com/api/bots
/api/bots

Response samples

Content type
Copy
Expand all Collapse all
[
  • {
    }
]

Find a model instance by {{id}} from the data source.

path Parameters
id
required
string <JSON>

Model id

query Parameters
filter
string <JSON>

Filter defining fields and include - must be a JSON-encoded string ({"something":"value"})

Responses

200

Request was successful

get /bots/{id}

Default Server

https://flow.botdistrikt.com/api/bots/{id}
/api/bots/{id}

Response samples

Content type
Copy
Expand all Collapse all
{
  • "about": "string",
  • "name": "string",
  • "profile_pic": "string",
  • "cover_photo": "string",
  • "session_ttl": 10,
  • "traits": { },
  • "personality_rules": { },
  • "global_defaults": { },
  • "id": 0,
  • "created_at": "2020-02-28T06:59:51Z",
  • "updated_at": "2020-02-28T06:59:51Z",
  • "profile_image_id": 0
}

Delete a model instance by {{id}} from the data source.

path Parameters
id
required
string <JSON>

Model id

Responses

200