Skip to content

Get the current user

GET
/users/me
curl --request GET \
--url https://docs.ywork.dev/api/v1/users/me \
--header 'Authorization: Bearer <token>'

Returns the user associated with the API token used for the request.

The authenticated user.

Media typeapplication/json
object
id
required
string
object
required
string
Allowed value: user
email
required
string format: email
name
required
string
role
required
string
Allowed values: admin member guest
created_at
required
string format: date-time
Example
{
"id": "usr_3Jk2mQ8zpL",
"object": "user",
"email": "ada@example.com",
"name": "Ada Lovelace",
"role": "admin",
"created_at": "2025-11-02T09:14:33Z"
}
X-RateLimit-Limit
integer
Example
600

The maximum number of requests permitted in the current window.

X-RateLimit-Remaining
integer
Example
597

The number of requests remaining in the current window.

X-RateLimit-Reset
integer
Example
1730541600

Unix time (seconds) at which the current window resets.

No valid API key was provided.

Media typeapplication/json
object
error
required
object
type
required

A broad category for the error.

string
Allowed values: authentication_error invalid_request_error rate_limit_error api_error
code
required

A short machine-readable code for the specific error.

string
message
required

A human-readable description of the error.

string
request_id

A unique identifier for the request, useful for support.

string
Example
{
"error": {
"type": "authentication_error",
"code": "missing_api_key",
"message": "No API key provided. Send your key as a bearer token in the Authorization header.",
"request_id": "req_9f2a1c7b4e"
}
}