Get the current user
GET
/users/me
const url = 'https://docs.ywork.dev/api/v1/users/me';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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.
Authorizations
Section titled “Authorizations”Responses
Section titled “Responses”The authenticated user.
Media typeapplication/json
object
id
required
string
object
required
string
email
required
string format: email
name
required
string
role
required
string
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"}Headers
Section titled “Headers”X-RateLimit-Limit
integer
Example
600The maximum number of requests permitted in the current window.
X-RateLimit-Remaining
integer
Example
597The number of requests remaining in the current window.
X-RateLimit-Reset
integer
Example
1730541600Unix 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
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" }}