Tiledesk Developer Hub
WebsiteCommunityTutorialsGet started
  • Introduction
  • Community
  • Ask for Support
  • Public Roadmap and Changelog
  • Tutorials
  • Widget
    • Widget SDK
    • Javascript API: Methods
    • Javascript API: Attributes
    • Javascript API: Listeners/Events
    • Widget Authentication
    • Widget Angular integration
    • Widget React integration
    • Widget for Android with WebView
    • Widget for iOS with WKWebView
    • Widget for Flutter with WebView
    • Widget for React with WebView
    • Widget for Wix Website platform
    • Tutorials
      • Hide widget
      • Show/Hide widget programmatically
      • Force widget loading without user interaction
      • Mobile positioning
      • Custom size (width/height)
      • Installing widget on selected pages
    • Conversation Embedded Apps
      • Payment App Tutorial
      • Prechat form App Tutorial
    • Advanced
      • Preset the Widget on a specific Department
      • Authentication Flow
      • Widget protocol specs
      • Prechat Form JSON specs
      • Prevent multiple conversations
      • Old versions
        • Web SDK v4
  • External Chatbot
    • Introduction
    • Hello World tutorial
    • Chatbot to Human handoff
    • Send Text Buttons
    • Advanced Tutorials
      • Introduction
      • Tutorial 1 - Dialogflow as external chatbot
      • Tutorial 2 - Buttons and images
      • Tutorial 3 - Automatic human handoff with fallback intent
      • Tutorial 4 - Explicit Human handoff with user intent
      • Tutorial 5 - Gracefully handling operating hours during handoff
      • Generate Dialogflow Google Credentials file
    • Rasa tutorials
      • Rasa Tutorial 1 - Rasa as external chatbot
  • Resolution bot
    • Introduction
    • Quickstart
    • Webhook service
    • Rich messages
    • Tutorials
      • Chatbot chooser (multilanguage)
      • Department chooser
      • Order info (webhook)
  • APIs
    • REST APIs
      • Introduction
      • Authentication
      • Requests
      • Leads
      • Messages
      • Activities
      • Projects
      • Team
      • User
      • Analytics
      • Canned responses
      • Tags
      • Events
      • Jwt
      • Labels
      • Images
      • Files
      • Segments
      • Chatbots
      • Knowledge Bases
        • Knowledge Base
        • Contents
        • Question & Answer
      • Management Api
        • Departments
        • Groups
    • NodeJS SDK
    • Webhooks
      • Subscriptions
    • Conversation Messages APIs tips
    • Realtime API
    • JWT Authentication
      • JWT Custom authentication Tutorial
    • Tutorials
      • REST API
        • Sending and receiving messages with Tiledesk APIs
        • PHP Tiledesk REST API example
        • Import multiple messages into Tiledesk using REST APIs from third party app
      • Webhooks
        • Custom Request assignment
        • Request transcript on close
  • Apps
    • Build Custom App - Quick start
    • External Channels integration flow diagram
    • Telegram integration tutorial
  • Dashboard & AgentChat SDK
    • Dashboard SDK
    • Agent Chat SDK
  • Architecture
    • Architecture overview
    • Components list
    • Bot Design diagram
    • Multi Channel Message Flow
  • Installation
    • Installation
    • Running Tiledesk using Docker Compose
    • Running Tiledesk with Kubernetes using Helm
    • Choosing Hardware
  • Configuration
    • Chat21 channel configuration
    • Email parameters and templates configuration
    • Configure the logging system
Powered by GitBook
On this page
  • Create a new subscription
  • This endpoint retrieves all subscriptions
  • Get a subscription by id
  • This endpoint deletes a subscription by id
  • Update a subscription
  • Get the subscriptions logs

Was this helpful?

  1. APIs
  2. Webhooks

Subscriptions

Create a new subscription

POST https://api.tiledesk.com/v3/:project_id/subscriptions

This endpoint allows to add more subscriptions.

Path Parameters

Name
Type
Description

project_id

string

The project_id is a unique code assigned to your project when you create it in Tiledesk

Headers

Name
Type
Description

Authorization

string

authorization token. Basic Auth or JWT

Content-Type

string

use "application/json" value

Request Body

Name
Type
Description

event

string

the event method

target

string

the target url

{
   {
   "__v":0,
   "updatedAt":"2019-03-12T12:01:56.462Z",
   "createdAt":"2019-03-12T12:01:56.462Z",
   "target":"https://webhook.site/c312005b-5042-49e9-a769-0f3ba4245b51",
   "event":"request.create",
   "id_project":"5b55e806c93dde00143163dd",
   "createdBy":"5ab11c6b83dc240014d46095",
   "_id":"5c879fb4f1ae6600173b8c75",
   "secret":"56c189c8-33ae-4930-bd98-410a12aa45ce"
}

Example

curl -v -X POST -H 'Content-Type:application/json' -u andrea.leo@f21.it:123456 -d '{"event":"request.create", "target":"https://webhook.site/c312005b-5042-49e9-a769-0f3ba4245b51"}' https://api.tiledesk.com/v3/5b55e806c93dde00143163dd/subscriptions

This endpoint retrieves all subscriptions

GET https://api.tiledesk.com/v3/:project_id/subscriptions

This endpoint retrieves all active subscriptions.

Path Parameters

Name
Type
Description

project_id

string

the Project Id is a unique code assigned to your project when you create it in Tiledesk.

Headers

Name
Type
Description

Authorization

string

authorization token. Basic Auth or JWT

[
{
   {
   "__v":0,
   "updatedAt":"2019-03-12T12:01:56.462Z",
   "createdAt":"2019-03-12T12:01:56.462Z",
   "target":"https://webhook.site/c312005b-5042-49e9-a769-0f3ba4245b51",
   "event":"request.create",
   "id_project":"5b55e806c93dde00143163dd",
   "createdBy":"5ab11c6b83dc240014d46095",
   "_id":"5c879fb4f1ae6600173b8c75"
},
...
]

Get a subscription by id

GET https://api.tiledesk.com/v3/:project_id/subscriptions/:id

This endpoint retrieves a subscription by ID

Path Parameters

Name
Type
Description

id

string

the subscription identifier

project_id

string

The project_id is a unique code assigned to your project when you create it in Tiledesk

Headers

Name
Type
Description

Authorization

string

authorization token. Basic Auth or JWT

{
   {
   "__v":0,
   "updatedAt":"2019-03-12T12:01:56.462Z",
   "createdAt":"2019-03-12T12:01:56.462Z",
   "target":"https://webhook.site/c312005b-5042-49e9-a769-0f3ba4245b51",
   "event":"request.create",
   "id_project":"5b55e806c93dde00143163dd",
   "createdBy":"5ab11c6b83dc240014d46095",
   "_id":"5c879fb4f1ae6600173b8c75"
}

This endpoint deletes a subscription by id

DELETE https://api.tiledesk.com/v3/:project_id/subscriptions/:id

This endpoint delete a subscription by ID

Path Parameters

Name
Type
Description

id

string

the subscription identifier

project_id

string

The project_id is a unique code assigned to your project when you create it in Tiledesk

Headers

Name
Type
Description

Authorization

string

authorization token. Basic Auth or JWT

{  
         "_id":"5c81593adf767b0017d1aa66",
         "updatedAt":"2019-03-07T17:47:38.393Z",
         "createdAt":"2019-03-07T17:47:38.393Z",
         "lead_id":"SRbb2PfbSFcgICv9VQBcURZeloh1",
         "fullname":"Guest",
         "attributes":{ ... },
         "id_project":"5b55e806c93dde00143163dd",
         "createdBy":"system",
         "__v":0
}

Update a subscription

PUT https://api.tiledesk.com/v3/:project_id/subscriptions/:id

This endpoint updates a subscription.

Path Parameters

Name
Type
Description

project_id

string

The project_id is a unique code assigned to your project when you create it in Tiledesk

id

string

the subscription identifier

Headers

Name
Type
Description

Authorization

string

authorization token. Basic Auth or JWT

Content-Type

string

use "application/json" value

Request Body

Name
Type
Description

event

string

the event method

target

string

the target url

{
   {
   "__v":0,
   "updatedAt":"2019-03-12T12:01:56.462Z",
   "createdAt":"2019-03-12T12:01:56.462Z",
   "target":"https://webhook.site/c312005b-5042-49e9-a769-0f3ba4245b51",
   "event":"request.create",
   "id_project":"5b55e806c93dde00143163dd",
   "createdBy":"5ab11c6b83dc240014d46095",
   "_id":"5c879fb4f1ae6600173b8c75"   
}

Example

curl -v -X PUT -H 'Content-Type:application/json' -u andrea.leo@f21.it:123456 -d '{"event":"request.create", "target":"https://webhook.site/c312005b-5042-49e9-a769-0f3ba4245b51"}' https://api.tiledesk.com/v3/5b55e806c93dde00143163dd/subscriptions/5c879fb4f1ae6600173b8c75

Get the subscriptions logs

GET https://api.tiledesk.com/v3/:project_id/subscriptions/history

The endpoint receives subscription call logs.

\

Experimental

Path Parameters

Name
Type
Description

project_id

string

the Project Id is a unique code assigned to your project when you create it in Tiledesk.

Query Parameters

Name
Type
Description

page

number

what page of results to fetch. default to first page.

Headers

Name
Type
Description

Authorization

string

authorization token. Basic Auth or JWT

[
    { 
      "_id":"5e3ae8309ae7ee0017d91609",
      "event":"message.create",
      "target":"https://tiledesk.requestcatcher.com/test",
      "response":"{\"statusCode\":200,\"body\":\"request caught\",\"headers\":{\"date\":\"Wed, 05 Feb 2020 16:07:11 GMT\",\"content-length\":\"14\",\"content-type\":\"text/plain; charset=utf-8\",\"connection\":\"close\"},\"request\":{\"uri\":{\"protocol\":\"https:\",\"slashes\":true,\"auth\":null,\"host\":\"tiledesk.requestcatcher.com\",\"port\":443,\"hostname\":\"tiledesk.requestcatcher.com\",\"hash\":null,\"search\":null,\"query\":null,\"pathname\":\"/test\",\"path\":\"/test\",\"href\":\"https://tiledesk.requestcatcher.com/test\"},\"method\":\"POST\",\"headers\":{\"Content-Type\":\"application/json\",\"x-hook-secret\":\"0060287d-9486-4f00-a4db-a254f998dbd1\",\"accept\":\"application/json\",\"content-length\":6005}}}",
      "body":"\"request caught\"",
      "err":null,
      "id_project":"5e37f45c4d82de00178b96ad",
      "createdAt":"2020-02-05T16:07:12.089Z",
      "updatedAt":"2020-02-05T16:07:12.089Z",
      "__v":0
    }
    .....
]

Example:

curl -v -X GET -u andrea.leo@f21.it:123 https://api.tiledesk.com/v3/5e37f45c4d82de00178b96ad/subscriptions/history
PreviousWebhooksNextConversation Messages APIs tips

Last updated 1 year ago

Was this helpful?