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
  • The Team Model
  • The Presence model
  • Agent availability
  • Get the team
  • Get a teammate by id
  • Get a teammate by user id
  • Invite an agent
  • Update the current logged teammate
  • Update a teammate by id
  • Leave a project

Was this helpful?

  1. APIs
  2. REST APIs

Team

PreviousProjectsNextUser

Last updated 1 year ago

Was this helpful?

A teammate is a special user who represents a Tiledesk user invited to a project with a specific role. When you work with teammates very often you will not use the user_id of the Tiledesk user but rather the specific id of your teammate in the project. In the Tiledesk API the temamate is named project_user. For example, if you want to know your project_user in a specific project, all you have to do is call this API: .

The Team Model

Key
Type
Description

id

String

The unique identifier for the teammate which is given by Tiledesk.

role

String

The teammate role. Values: owner, agent, admin, user, guest

user_available

Boolean

Dermine if the teammate is available or unavailable to accept requests

id_user

Object

The user object referenced by the teammate

max_served_chat

Number

Number of chats that agent is allowed to take at one time (Only Enterprise)

number_assigned_requests

Number

Number of active request for the teammate (Only Enterprise)

isBusy

Boolean

Determine if the teammate is busy (Only Enterprise)

attributes

Object

The custom attributes which are set for the teammate.

tags

Array

A list of tags objects associated with the teammate.

settings

Object

The setting configurations of the teammate.

presence

Object

The presence info of the teammate.

isAuthenticated

Boolean

Returns true if is strongly authenticated (custom-auth or email/password), false otherwise (anonymous).

isBusy

Boolean

Returns true if is teammate is busy, false otherwise. See Tiledesk Smart Assignment for more info.

createdAt

String

The time (ISO-8601 date string) when the teammate was created.

updatedAt

String

The time (ISO-8601 date string) when the teammate was updated.

createdBy

String

The unique identifier of the row creator

id_project

String

The unique identifier of the project

The Presence model

Agent availability

The field user_available determines if the teammate is available or unavailable to accept requests. Attention: Agent availability changes only when the agent explicitly changes from the UI from available to unavailable. If an agent is available and logs out, the agent remains available as he may have decided to serve chats from another channel (eg. Tiledesk mobile app).

Get the team

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

Return the team members and availability

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. Minumun role: agent

[
   {
      "_id":"5df2240cecd41b00173a06bc",
      "id_project":"5df2240cecd41b00173a06bb",
      "id_user":{
         "_id":"5aaa99024c3b110014b478f0",
         "email":"andrea.leo@frontiere21.it",
         "firstname":"Andrea",
         "lastname":"Leo",
         "emailverified":true,
         "__v":0,
         "resetpswrequestid":""
      },
      "role":"owner",
      "user_available":true,
      "createdBy":"5aaa99024c3b110014b478f0",
      "createdAt":"2019-12-12T11:27:08.581Z",
      "updatedAt":"2019-12-12T11:27:08.581Z",
      "__v":0
   },
   {
      "_id":"5df34ab80bc923001792e274",
      "id_project":"5df2240cecd41b00173a06bb",
      "id_user":{
         "_id":"5de9200d6722370017731969",
         "email":"nuovopre@f21test.it",
         "firstname":"Nuovopre",
         "lastname":"Pre",
         "emailverified":false,
         "createdAt":"2019-12-05T15:19:41.296Z",
         "updatedAt":"2019-12-05T15:19:41.296Z",
         "__v":0
      },
      "role":"admin",
      "user_available":true,
      "createdBy":"5aaa99024c3b110014b478f0",
      "createdAt":"2019-12-13T08:24:24.586Z",
      "updatedAt":"2020-01-04T09:45:26.331Z",
      "__v":0
   },
   {
      "_id":"5e09e36d3030640017718ee2",
      "id_project":"5df2240cecd41b00173a06bb",
      "id_user":{
         "_id":"5e09e36d3030640017718edf",
         "email":"magnegerki@enayu.com",
         "firstname":"magnegerki",
         "lastname":"magnegerki",
         "emailverified":false,
         "createdAt":"2019-12-30T11:45:49.123Z",
         "updatedAt":"2019-12-30T11:45:49.123Z",
         "__v":0
      },
      "role":"agent",
      "user_available":false,
      "createdBy":"5aaa99024c3b110014b478f0",
      "createdAt":"2019-12-30T11:45:49.419Z",
      "updatedAt":"2020-01-04T09:45:27.207Z",
      "__v":0
   }
]

Get a teammate by id

GET https://api.tiledesk.com/v3/:project_id/project_users/:project_user_id

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.

project_user_id

string

The teammate identifier.

Headers

Name
Type
Description

Authorization

string

Authorization token. Basic Auth or JWT. Minumun role: agent

   {
      "_id":"5df2240cecd41b00173a06bc",
      "id_project":"5df2240cecd41b00173a06bb",
      "id_user":{
         "_id":"5aaa99024c3b110014b478f0",
         "email":"andrea.leo@frontiere21.it",
         "firstname":"Andrea",
         "lastname":"Leo",
         "emailverified":true,
         "__v":0,
         "resetpswrequestid":""
      },
      "role":"owner",
      "user_available":true,
      "createdBy":"5aaa99024c3b110014b478f0",
      "createdAt":"2019-12-12T11:27:08.581Z",
      "updatedAt":"2019-12-12T11:27:08.581Z",
      "__v":0
   }

Get a teammate by user id

GET https://api.tiledesk.com/v3/:project_id/project_users/users/:user_id

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.

user_id

string

The user identifier.

Headers

Name
Type
Description

Authorization

string

Authorization token. Basic Auth or JWT. Minumun role: agent

   {
      "_id":"5df2240cecd41b00173a06bc",
      "id_project":"5df2240cecd41b00173a06bb",
      "id_user":{
         "_id":"5aaa99024c3b110014b478f0",
         "email":"andrea.leo@frontiere21.it",
         "firstname":"Andrea",
         "lastname":"Leo",
         "emailverified":true,
         "__v":0,
         "resetpswrequestid":""
      },
      "role":"owner",
      "user_available":true,
      "createdBy":"5aaa99024c3b110014b478f0",
      "createdAt":"2019-12-12T11:27:08.581Z",
      "updatedAt":"2019-12-12T11:27:08.581Z",
      "__v":0
   }

Invite an agent

POST https://api.tiledesk.com/v3/:project_id/project_users/invite

Invite an agent to a project.

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. Minumun role: admin

Content-Type

string

use "application/json" value

Request Body

Name
Type
Description

email

string

the agent email address

role

string

the agent role. Accepted values: agent, admin

firstname

string

the firstname of the agent

lastname

string

the lastname of the agent

user_available

boolean

the initial agent status. Available (true) or unavailable (false).

{  
        ...
}

Update the current logged teammate

PUT https://api.tiledesk.com/v3/:project_id/project_users/

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. Minumun role: agent

Content-Type

string

use "application/json" value

Request Body

Name
Type
Description

role

string

The teammate role. Permitted values: admin, agent.

user_available

boolean

The teammate availability. True for available, false for unavailable.

Default is true

max_served_chat

number

The number of concurrent chats the teammate can take at once.

attributes

object

The teammate custom attributes

settings

object

The teammate settings object

{  
         ..
}

Update a teammate by id

PUT https://api.tiledesk.com/v3/:project_id/project_users/:project_user_id

It requires admin role

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

project_user_id

string

The teammate identifier.

Headers

Name
Type
Description

Authorization

string

Authorization token. Basic Auth or JWT. Minumun role: admin

Content-Type

string

use "application/json" value

Request Body

Name
Type
Description

role

string

The teammate role. Permitted values: admin, agent.

user_available

boolean

The teammate availability. True for available, false for unavailable.

Default is true

max_served_chat

number

The number of concurrent chats the teammate can take at once.

attributes

object

The teammate custom attributes

settings

object

The teammate settings object

{  
         ..
}

Leave a project

DELETE https://api.tiledesk.com/v3/:project_id/project_users/:project_user_id

Leave an agent from a project.

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

project_user_id

string

The teammate identifier.

Headers

Name
Type
Description

Authorization

string

Authorization token. Basic Auth or JWT. Minumun role: admin

{  
        ...
}

Presence lets you track the online and offline status of the teammates in real-time (if you use Tiledesk or ) and store the information state. Possible values: online, offline. Attention: an agent passes from online to offline only when he closed all Tiledesk messaging apps (eg Agent web chat in all tabs and mobile apps).

Websocket
Webhook
Get a teammate by id