Skip to content
FacebookYouTubeX (Twitter)

Chatbots

FieldTypeDescription
idStringThe unique identifier for the bot which is given by Pingstreams.
nameStringThe bot name.
id_projectStringThe unique identifier of the project
typeStringThe bot type. Permitted values: internal, external.
secretStringThe bot secret token used for JWT authentication.
createdByStringThe unique identifier of the row creator
descriptionString(Optional) The bot description.
urlString(Optional) The bot external endpoint address
webhook_urlString(Optional)
webhook_enabledBoolean(Optional)
trashedBoolean(Optional) The bot status.
attributesObject(Optional) The custom attributes which are set for the bot.
languageString(Optional) The bot language.
createdAtString(Optional) The time when the bot was created.
publicBoolean(Optional) The sharing status of the bot. Default false.
updatedAtString(Optional) The time when the bot was updated.

GET https://api.pingstreams.com/v3/:project_id/bots

Allows an account to list all the bots of the project.

ParameterTypeDescription
project_idstringthe Project Id is a unique code assigned to your project when you create it in Pingstreams.
HeaderTypeDescription
Authorizationstringauthorization token. Basic Auth or JWT
[
{
"_id":"5be9b2ecc72a050015e14951",
"updatedAt":"2018-11-12T17:05:50.616Z",
"createdAt":"2018-11-12T17:05:48.544Z",
"name":"bot1",
"id_project":"5b55e806c93dde00143163dd",
"trashed":false,
"createdBy":"5ab0f3fa57066e0014bfd71e",
"__v":0,
"external":false
},
{
"_id":"5ce265596438e40017e3610d",
"updatedAt":"2019-05-20T08:29:14.524Z",
"createdAt":"2019-05-20T08:29:13.286Z",
"name":"bot2",
"id_project":"5b55e806c93dde00143163dd",
"trashed":false,
"createdBy":"5ab0f3fa57066e0014bfd71e",
"__v":0,
"external":false
}
]
curl -v -X GET -u user@example.com:123456 https://api.pingstreams.com/v3/5b55e806c93dde00143163dd/bots

GET https://api.pingstreams.com/v3/:project_id/bots/:id

Allows an account to get a bot of the project.

ParameterTypeDescription
project_idstringthe Project Id is a unique code assigned to your project when you create it in Pingstreams.
idstringThe bot identifier
HeaderTypeDescription
Authorizationstringauthorization token. Basic Auth or JWT
{
"_id":"5be9b2ecc72a050015e14951",
"updatedAt":"2018-11-12T17:05:50.616Z",
"createdAt":"2018-11-12T17:05:48.544Z",
"name":"bot1",
"id_project":"5b55e806c93dde00143163dd",
"trashed":false,
"createdBy":"5ab0f3fa57066e0014bfd71e",
"__v":0,
"external":false
}
curl -v -X GET -u user@example.com:123456 https://api.pingstreams.com/v3/5b55e806c93dde00143163dd/bots/5be9b2ecc72a050015e14951

GET https://api.pingstreams.com/v3/:project_id/bots/exportjson/:id

Allows an accont to export the bot in json format

ParameterTypeDescription
project_idstringThe Project Id is a unique code assigned to your project when you create it in Pingstreams
idstringThe bot identifier
ParameterTypeDescription
intentsOnlyboolean(Optional) if TRUE will be exported only the intents (faqs)
HeaderTypeDescription
AuthorizationstringAuthorization token. Basic Auth or JWT
Content-Typestringuse “application/json” value
{"webhook_enabled":false,"language":"en","name":"bot1","intents":[{"webhook_enabled":false,"enabled":true,"question":"\start","answer":"Hello","intent_display_name":"start","language":"en"}]}
curl -v -X GET -u user@example.com:123456 https://api.pingstreams.com/v3/5b55e806c93dde00143163dd/bots/exportjson/5be9b2ecc72a050015e14951

POST https://api.pingstreams.com/v3/:project_id/bots

Allows to add more bots.

ParameterTypeDescription
project_idstringThe project_id is a unique code assigned to your project when you create it in Pingstreams
HeaderTypeDescription
Authorizationstringauthorization token. Basic Auth or JWT
Content-Typestringuse “application/json” value
FieldTypeDescription
namestringThe bot name
descriptionstringThe bot description
languagestringThe bot language with two-letter ISO 639-1 code.
webhook_enabledstringEnable the webhook fullfillment endpoint
templatestringIf internal type is used you can specify the template used to create the faqs. Supported values : blank, handoff, example. Example is the default value. Blank is a basic chatbot with only start e defaultFallback intents. Handoff is like the basic chatbot with the Agent handoff intent. Example is a chatbot with a showcase of the main features.
typestringSupported type values are: “internal”, “external”. Default is “internal”. With internal value the standard pingstreams bot engine is used. With external you can create your own chatbot engine specifing the url parameter.
urlstringThe external chatbot endpoint
{
"_id":"5be9b2ecc72a050015e14951",
"updatedAt":"2018-11-12T17:05:50.616Z",
"createdAt":"2018-11-12T17:05:48.544Z",
"name":"bot1",
"id_project":"5b55e806c93dde00143163dd",
"trashed":false,
"createdBy":"5ab0f3fa57066e0014bfd71e",
"__v":0,
"external":false
}
curl -v -X POST -H 'Content-Type: application/json' -u user@example.com:123456 -d '{"name":"bot1"}' https://api.pingstreams.com/v3/5b55e806c93dde00143163dd/bots

POST https://api.pingstreams.com/v3/:project_id/bots/fork/:id

Allows to fork an existing bot.

ParameterTypeDescription
project_idstringThe project_id is a unique code assigned to your project when you create it in Pingstreams
idstringThe bot identifier
ParameterTypeDescription
publicstringThe sharing status of the bot. Permitted values: true | false
projectidstringThe id of the project where wants to fork the bot
HeaderTypeDescription
Authorizationstringauthorization token. Basic Auth or JWT
Content-Typestringuse “application/json” value
{
"message":"Chatbot forked successfully",
"bot_id":"5ab0f3fa57066e0014bf777e"
}
curl -v -X PUT -H 'Content-Type: application/json' -u user@example.com:123456 https://api.pingstreams.com/v3/5b55e806c93dde00143163dd/bots/fork/5be9b2ecc72a050015e14951?public=false&projectid=5b55e806c93dde0014316e33

POST https://api.pingstreams.com/v3/:project_id/bots/importjson/:id

Allows to import the bot informations and intents from a JSON file.

ParameterTypeDescription
project_idstringThe project_id is a unique code assigned to your project when you create it in Pingstreams
idstringthe bot identifier (on which perform import) (is null with create option)
ParameterTypeDescription
createstringAllows to create a chatbot before importing Permitted values: true | false | null
replacestring(BETA) Allows you to clean the chatbot (all its intents) before importing Permitted values: true | false | null
overwritestringChoose whether to replace intents with the same intent_display_name with the imported ones. If false or null Old intents with the same intent_display_name will not be overwritten. Permitted values: true | false | null
HeaderTypeDescription
Authorizationstringauthorization token. Basic Auth or JWT
Content-Typestringuse “application/json” value
FieldTypeDescription
uploadFilejsonThe JSON file that contains data.
{
"_id":"5be9b2ecc72a050015e14951",
"updatedAt":"2018-11-12T17:05:50.616Z",
"createdAt":"2018-11-12T17:05:48.544Z",
"name":"bot1",
"id_project":"5b55e806c93dde00143163dd",
"trashed":false,
"createdBy":"5ab0f3fa57066e0014bfd71e",
"__v":0,
"external":false
}
curl -v -X POST -H 'Content-Type: application/json' -u user@example.com:123456 -d "@path_to_file/bot.json" https://api.pingstreams.com/v3/5b55e806c93dde00143163dd/bots/importjson/5be9b2ecc72a050015e14951

PUT https://api.pingstreams.com/v3/:project_id/bots/:id

Allows to update a bot.

ParameterTypeDescription
project_idstringThe project_id is a unique code assigned to your project when you create it in Pingstreams
idstringThe bot identifier
HeaderTypeDescription
Authorizationstringauthorization token. Basic Auth or JWT
Content-Typestringuse “application/json” value
FieldTypeDescription
namestringThe bot name
urlstringThe bot external endpoint
descriptionstringThe bot description
languagestringThe bot language with two-letter ISO 639-1 code.
webhook_enabledstringEnable the webhook fullfillment endpoint
typestringSupported type values are: “internal”, “external”. Default is “internal”. With internal value the standard pingstreams bot engine is used. With external you can create your own chatbot engine specifing the url parameter.
{
"_id":"5be9b2ecc72a050015e14951",
"updatedAt":"2018-11-12T17:05:50.616Z",
"createdAt":"2018-11-12T17:05:48.544Z",
"name":"bot1",
"id_project":"5b55e806c93dde00143163dd",
"trashed":false,
"createdBy":"5ab0f3fa57066e0014bfd71e",
"__v":0,
"external":false
}
curl -v -X PUT -H 'Content-Type: application/json' -u user@example.com:123456 -d '{"name":"bot1"}' https://api.pingstreams.com/v3/5b55e806c93dde00143163dd/bots/5be9b2ecc72a050015e14951

DELETE https://api.pingstreams.com/v3/:project_id/bots/:id

Allows to delete a bot.

ParameterTypeDescription
project_idstringThe project_id is a unique code assigned to your project when you create it in Pingstreams
idstringThe bot identifier
HeaderTypeDescription
Authorizationstringauthorization token. Basic Auth or JWT
{
"_id":"5be9b2ecc72a050015e14951",
"updatedAt":"2018-11-12T17:05:50.616Z",
"createdAt":"2018-11-12T17:05:48.544Z",
"name":"bot1",
"id_project":"5b55e806c93dde00143163dd",
"trashed":false,
"createdBy":"5ab0f3fa57066e0014bfd71e",
"__v":0,
"external":false
}
curl -v -X DELETE -H 'Content-Type: application/json' -u user@example.com:123456 https://api.pingstreams.com/v3/5b55e806c93dde00143163dd/bots/5be9b2ecc72a050015e14951