Skip to content

Read the authenticated user

GET
/me
curl --request GET \
--url https://chat.work.optidata.cloud/api/me \
--header 'Authorization: Bearer <token>'

The record of the user the authentication key belongs to. Call this first: most other operations need either the caller’s numeric id (conversation preference routes) or their uuid (dashboard, direct messages), and this is the only endpoint that hands you both.

The authenticated user.

Media typeapplication/json
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
status

Presence information for a user.

object
id
integer format: int64
user_id
integer format: int64
last_seen_at

When the user was last active.

string | null format: date-time
created_at
string format: date-time
updated_at
string format: date-time
Examples
Exampleme
{
"id": 2,
"uuid": "3f1c9a52-4d7e-4b31-9c02-77a1b6e5d840",
"cuid": "a3f1c9a52-4d7e-4b31-9c02-77a1b6e5d840",
"username": null,
"email": "jane.doe@acme.example",
"name": "Jane Doe",
"company_name": "Acme",
"created_at": "2026-08-14T11:57:24.000000Z",
"updated_at": "2026-08-14T11:57:24.000000Z",
"deleted_at": null,
"dark_mode": false,
"messenger_color": "#2180f3",
"type": null,
"avatar_url": "https://cdn.example/avatars/jane.webp",
"status": {
"id": 14,
"user_id": 2,
"last_seen_at": "2026-08-19T12:37:34.000000Z",
"created_at": "2026-08-19T12:37:05.000000Z",
"updated_at": "2026-08-19T12:37:34.000000Z"
}
}

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"
}

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."
}