Skip to content

Get Current User

GET
/user

Returns the details of the currently authenticated user. Use this to retrieve your user ID, which is required by other endpoints.

Send your API key in the x-api-key header. See Authentication.

Success

object
id
integer
5001
created_at
string format: date-time
updated_at
string format: date-time
uuid
string
first_name
string
Jane
last_name
string
Doe
email
string format: email
jane.doe@example.com
username
string
jane.doe@example.com
phone
string
15551234567
is_admin
boolean
true
admin_account_ids
Array<integer>
[
100,
200
]
Example
{
"id": 5001,
"admin_account_ids": [
100,
200
],
"created_at": "2024-01-10T08:00:00Z",
"email": "jane.doe@example.com",
"first_name": "Jane",
"is_admin": true,
"last_name": "Doe",
"phone": "15551234567",
"updated_at": "2024-06-01T12:00:00Z",
"username": "jane.doe@example.com"
}

The x-api-key header is missing or the key is not valid, or the caller can’t access an ID in the request. IDs that don’t exist return the same response as IDs the caller can’t access.

Error envelope returned with 4xx and 5xx responses.

object
error
object
code

Usually the HTTP status code. It can differ; a request to an unknown path returns HTTP 400 with code 500.

integer
401
message

Human-readable description of the error.

string
type

The kind of error, for example Authorization or REST.

string
REST
fields

Returned only with 422 responses. It may give more details about what failed validation, as lists of messages keyed by the name of the input.

object
key
additional properties
Array<string>
Examples
{
"error": {
"code": 401,
"message": "The request does not include a valid access token. Please provide a valid access token.",
"type": "Authorization"
}
}