Users
Inbox Users
List the Users of your Inbox.
A user token, sent as Token <token>. Create a user in the admin panel (group App integration) and get its token from POST /api/v1/auth/token/. The channel API key (D360-Api-Key) is not supported.
If true, includes the "assigned_wa_ids" field in the response.
Number of results to return per page.
The initial index from which to return the results.
123http://api.example.org/accounts/?offset=400&limit=100http://api.example.org/accounts/?offset=200&limit=100GET /api/v1/users/ HTTP/1.1
Host: your-stack.inbox.getchat.360dialog.io/
Authorization: Token YOUR_TOKEN
Accept: */*
{
"count": 123,
"next": "http://api.example.org/accounts/?offset=400&limit=100",
"previous": "http://api.example.org/accounts/?offset=200&limit=100",
"results": [
{
"url": "https://example.com",
"id": 1,
"username": "text",
"first_name": "text",
"last_name": "text",
"email": "name@gmail.com",
"profile": {
"role": "user",
"is_available": true
},
"groups": [
{
"id": 1,
"name": "text"
}
],
"permissions": {
"can_use_tags": true,
"can_read_chats": "all",
"can_write_to_chats": "all"
},
"assigned_wa_ids": [
"text"
]
}
]
}Creates a new User. Only admin Users can create new Users.
IMPORTANT: Heads up! This request response returns an activation_url field, which is returned this way only once!
When you create a new User using this API, you need to call returned activation_url in order to activate newly created account.
Activating app Users
If you created a new User with role "app", calling the activation_url will result with a JSON response equal to Token Authorization request response, for example:
{"token": "8aeb44f5a318542d32bb13019d68198467ee21f0"}You can then use this token with no need to set any password for this User.
Note that for "app" users, the activation code is no longer valid after the token is returned!
Activating regular and admin Users
When creating regular users, you might want to set password first and then activate the User afterwards. Use /users/{id}/password/change/ to set a password for this new User and then activate it.
If you integrate our API to an external system, you can integrate this URL so that users activate their accounts themselves either via email or any other solution you're using.
After activation URL is called, the account is ready to be used.
A user token, sent as Token <token>. Create a user in the admin panel (group App integration) and get its token from POST /api/v1/auth/token/. The channel API key (D360-Api-Key) is not supported.
Success! Your account is now created! Use this link to activate your account and set your password. You can open this link in any way while using this API. See this endpoint description to learn more on how activation URL works.
Whether an invitation carrying the activation_url was e-mailed to the address in the email field.
It is false when no address was given, when the User has the "app" role (their activation link answers with an API token, which is not sent by e-mail), when activation e-mails are switched off for this inbox, or when the delivery failed. The account is created either way, so hand the activation_url over yourself when this is false.
Username that is used in combination with password during login.
Only alphanumeric characters are allowed (A-Z, a-z, 0-9).
Success! Your account is now created! Use this link to activate your account and set your password. You can open this link in any way while using this API. See this endpoint description to learn more on how activation URL works.
Whether an invitation carrying the activation_url was e-mailed to the address in the email field.
It is false when no address was given, when the User has the "app" role (their activation link answers with an API token, which is not sent by e-mail), when activation e-mails are switched off for this inbox, or when the delivery failed. The account is created either way, so hand the activation_url over yourself when this is false.
Username that is used in combination with password during login.
Only alphanumeric characters are allowed (A-Z, a-z, 0-9).
POST /api/v1/users/ HTTP/1.1
Host: your-stack.inbox.getchat.360dialog.io/
Authorization: Token YOUR_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 129
{
"username": "text",
"first_name": "text",
"last_name": "text",
"email": "name@gmail.com",
"profile": {
"role": "user",
"is_available": true
}
}{
"url": "https://example.com",
"activation_url": "https://example.com",
"activation_email_sent": true,
"id": 1,
"username": "text",
"first_name": "text",
"last_name": "text",
"email": "name@gmail.com",
"profile": {
"role": "user",
"is_available": true
}
}Change password of somebody else (only available for admins)
A user token, sent as Token <token>. Create a user in the admin panel (group App integration) and get its token from POST /api/v1/auth/token/. The channel API key (D360-Api-Key) is not supported.
PUT /api/v1/users/{id}/password/change/ HTTP/1.1
Host: your-stack.inbox.getchat.360dialog.io/
Authorization: Token YOUR_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 19
{
"password": "text"
}{}Get a single User.
A user token, sent as Token <token>. Create a user in the admin panel (group App integration) and get its token from POST /api/v1/auth/token/. The channel API key (D360-Api-Key) is not supported.
A unique integer value identifying this user.
Username that is used in combination with password during login.
Only alphanumeric characters are allowed (A-Z, a-z, 0-9).
E-mail address of this new user.
List of group IDs to assign to the user (write-only)
GET /api/v1/users/{id}/ HTTP/1.1
Host: your-stack.inbox.getchat.360dialog.io/
Authorization: Token YOUR_TOKEN
Accept: */*
{
"url": "https://example.com",
"id": 1,
"username": "text",
"first_name": "text",
"last_name": "text",
"email": "name@gmail.com",
"profile": {
"role": "user",
"is_available": true
},
"groups": [
{
"id": 1,
"name": "text"
}
],
"permissions": {
"can_use_tags": true,
"can_read_chats": "all",
"can_write_to_chats": "all"
},
"assigned_wa_ids": [
"text"
]
}Update user data - all fields are required. Only admin Users can update all fields of other Users. Regular Users can update only the following fields, and only of their own User object: "username", "first_name", "last_name", "email".
A user token, sent as Token <token>. Create a user in the admin panel (group App integration) and get its token from POST /api/v1/auth/token/. The channel API key (D360-Api-Key) is not supported.
A unique integer value identifying this user.
Username that is used in combination with password during login.
Only alphanumeric characters are allowed (A-Z, a-z, 0-9).
E-mail address of this new user.
List of group IDs to assign to the user (write-only)
Username that is used in combination with password during login.
Only alphanumeric characters are allowed (A-Z, a-z, 0-9).
E-mail address of this new user.
List of group IDs to assign to the user (write-only)
PUT /api/v1/users/{id}/ HTTP/1.1
Host: your-stack.inbox.getchat.360dialog.io/
Authorization: Token YOUR_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 231
{
"username": "text",
"first_name": "text",
"last_name": "text",
"email": "name@gmail.com",
"profile": {
"role": "user",
"is_available": true
},
"group_ids": [
1
],
"permissions": {
"can_use_tags": true,
"can_read_chats": "all",
"can_write_to_chats": "all"
}
}{
"url": "https://example.com",
"id": 1,
"username": "text",
"first_name": "text",
"last_name": "text",
"email": "name@gmail.com",
"profile": {
"role": "user",
"is_available": true
},
"groups": [
{
"id": 1,
"name": "text"
}
],
"permissions": {
"can_use_tags": true,
"can_read_chats": "all",
"can_write_to_chats": "all"
},
"assigned_wa_ids": [
"text"
]
}Partially update user data - all fields are optional. Only admin Users can update all fields of other Users. Regular Users can update only the following fields, and only of their own User object: "username", "first_name", "last_name", "email".
A user token, sent as Token <token>. Create a user in the admin panel (group App integration) and get its token from POST /api/v1/auth/token/. The channel API key (D360-Api-Key) is not supported.
A unique integer value identifying this user.
Username that is used in combination with password during login.
Only alphanumeric characters are allowed (A-Z, a-z, 0-9).
E-mail address of this new user.
List of group IDs to assign to the user (write-only)
Username that is used in combination with password during login.
Only alphanumeric characters are allowed (A-Z, a-z, 0-9).
E-mail address of this new user.
List of group IDs to assign to the user (write-only)
PATCH /api/v1/users/{id}/ HTTP/1.1
Host: your-stack.inbox.getchat.360dialog.io/
Authorization: Token YOUR_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 231
{
"username": "text",
"first_name": "text",
"last_name": "text",
"email": "name@gmail.com",
"profile": {
"role": "user",
"is_available": true
},
"group_ids": [
1
],
"permissions": {
"can_use_tags": true,
"can_read_chats": "all",
"can_write_to_chats": "all"
}
}{
"url": "https://example.com",
"id": 1,
"username": "text",
"first_name": "text",
"last_name": "text",
"email": "name@gmail.com",
"profile": {
"role": "user",
"is_available": true
},
"groups": [
{
"id": 1,
"name": "text"
}
],
"permissions": {
"can_use_tags": true,
"can_read_chats": "all",
"can_write_to_chats": "all"
},
"assigned_wa_ids": [
"text"
]
}Allows users to set their 'is_available' status.
A user token, sent as Token <token>. Create a user in the admin panel (group App integration) and get its token from POST /api/v1/auth/token/. The channel API key (D360-Api-Key) is not supported.
A unique integer value identifying this user.
Manual status set by the user to indicate availability for communication.
Manual status set by the user to indicate availability for communication.
PATCH /api/v1/users/{id}/availability/ HTTP/1.1
Host: your-stack.inbox.getchat.360dialog.io/
Authorization: Token YOUR_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 21
{
"is_available": true
}{
"is_available": true
}Get object of currently logged in User
A user token, sent as Token <token>. Create a user in the admin panel (group App integration) and get its token from POST /api/v1/auth/token/. The channel API key (D360-Api-Key) is not supported.
Username that is used in combination with password during login.
Only alphanumeric characters are allowed (A-Z, a-z, 0-9).
E-mail address of this new user.
List of group IDs to assign to the user (write-only)
GET /api/v1/users/current/ HTTP/1.1
Host: your-stack.inbox.getchat.360dialog.io/
Authorization: Token YOUR_TOKEN
Accept: */*
{
"url": "https://example.com",
"id": 1,
"username": "text",
"first_name": "text",
"last_name": "text",
"email": "name@gmail.com",
"profile": {
"role": "user",
"is_available": true
},
"groups": [
{
"id": 1,
"name": "text"
}
],
"permissions": {
"can_use_tags": true,
"can_read_chats": "all",
"can_write_to_chats": "all"
},
"assigned_wa_ids": [
"text"
]
}Change your password (currently logged in User)
A user token, sent as Token <token>. Create a user in the admin panel (group App integration) and get its token from POST /api/v1/auth/token/. The channel API key (D360-Api-Key) is not supported.
Provide current password for security
Provide a new password that will be set to your account now
Provide current password for security
Provide a new password that will be set to your account now
PUT /api/v1/users/password/change/ HTTP/1.1
Host: your-stack.inbox.getchat.360dialog.io/
Authorization: Token YOUR_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 49
{
"current_password": "text",
"new_password": "text"
}{}Last updated
Was this helpful?