Skip to content

Who the token acts as

GET
/api/v1/me
curl --request GET \
--url https://app.lyra-docs.com/api/v1/me \
--header 'Authorization: Bearer <token>'

Returns the person the token belongs to and the organization it works in. Use it to check a token works.

OK

Media typeapplication/json

The person a token acts as, and the organization it works in.

object
id
required
string format: uuid
name
required
string
email
required
string
organization
required

The organization the token works in. A token only ever sees this one.

object
id
required
string format: uuid
name
required
string
role
required
string
Allowed values: admin member guest
token
required
object
id
required
string format: uuid
expiresAt
required

When the token stops working, or null if it never does

Any of:
string format: date-time

Example

{
"id": "0193a7c0-1a2b-7c3d-8e4f-5a6b7c8d9e0f",
"name": "Sam Lee",
"email": "sam@example.com",
"organization": {
"id": "0193a7bf-0000-7000-8000-00000000aa01",
"name": "Example Inc",
"role": "member"
},
"token": {
"id": "0193a7c7-5555-7aaa-8bbb-000000000006",
"expiresAt": "2027-03-02T09:30:00.000Z"
}
}
X-RateLimit-Limit
integer

How many requests the token can send in a minute

X-RateLimit-Remaining
integer

How many it has left this minute

X-RateLimit-Reset
integer

Seconds until the count starts again

X-Request-Id
string

The id of this request. Send it to support if something goes wrong.

The token is missing, wrong, revoked or expired.

Media typeapplication/json

What went wrong.

object
error
required
object
code
required

A stable code to check in your code, such as page_not_found

string
message
required

A sentence for people, which can change

string
issues

For invalid_request, each part of the request that was wrong

Array

Example

{
"error": {
"code": "unauthorized",
"message": "Please sign in."
}
}

Too many requests. Each token can send 120 requests a minute. Wait for the seconds in Retry-After.

Media typeapplication/json

What went wrong.

object
error
required
object
code
required

A stable code to check in your code, such as page_not_found

string
message
required

A sentence for people, which can change

string
issues

For invalid_request, each part of the request that was wrong

Array

Example

{
"error": {
"code": "rate_limited",
"message": "Too many requests. Try again in 21 seconds."
}
}
Retry-After
integer

Seconds to wait before sending again