Skip to content

List people who are not in the conversation

GET
/chats/{chat}/nonmembers
curl --request GET \
--url 'https://chat.work.optidata.cloud/api/chats/36/nonmembers?page=1' \
--header 'Authorization: Bearer <token>'

The company users who could still be added to this conversation, paginated. Feed the ids straight into POST /chats/{chat}/users.

chat
required
integer format: int64

Numeric id of the conversation.

page
integer
default: 1 >= 1

1-based page number.

Users who are not participants.

Media typeapplication/json
object
current_page
integer
current_page_url
string format: uri
data
Array
first_page_url
string | null format: uri
from
integer | null
next_page_url
string | null format: uri
path
string format: uri
per_page
integer
prev_page_url
string | null format: uri
to
integer | null
data
Array<object>

A person in the tenant.

object
id
required

Numeric id, used on the conversation and participant routes.

integer format: int64
uuid
required

Stable identifier of the user across the Optiwork suite.

string format: uuid
cuid

Identifier of the company the user belongs to.

string
username
string | null
email
required
string format: email
name
required
string
company_name
string | null
type

null for a person. 0 marks the Optiwork AI assistant, 1 a bot and 2 a contact reached over an external messaging integration.

integer | null
dark_mode
boolean
messenger_color

The colour used for this user’s name in the interface.

string
avatar_url
string | null format: uri
created_at
string format: date-time
updated_at
string format: date-time
deleted_at

Set when the user has been removed from the company.

string | null format: date-time
whatsapp_info

Details of the linked external-messaging contact, present when the user is reached over an external messaging integration (type 2); null for an ordinary person. Its keys depend on the integration, so treat it as an open object.

object | null
Example
{
"current_page": 1,
"data": [
{
"messenger_color": "#2180f3"
}
]
}

Missing, malformed or expired authentication key.

Media typeapplication/json

Authentication failures — and a few permission denials — use an error key rather than message.

object
error
required
string
Examples
Examplemissing

No bearer token sent

{
"error": "JWT passport exception: Missing bearer token in request"
}

The caller is not a participant of the conversation, or lacks the role the operation requires.

Media typeapplication/json

Generic error envelope used by policy, binding and framework failures.

object
message
required

Human-readable description of the failure.

string
Examples
Exampledenied
{
"message": "This action is unauthorized."
}

The resource does not exist, or does not belong to the given conversation.

Media typeapplication/json

Generic error envelope used by policy, binding and framework failures.

object
message
required

Human-readable description of the failure.

string
Examples
Examplemissing
{
"message": "No query results for model [App\\Models\\Chat\\Chat] 99999999"
}

Rate limit exceeded. Retry after the window resets.

Media typeapplication/json

Generic error envelope used by policy, binding and framework failures.

object
message
required

Human-readable description of the failure.

string
Examples
Examplethrottled
{
"message": "Too Many Attempts."
}