API reference
Whoami
Generated HTTP reference for the 1 operation the published OpenAPI document describes under whoami.
1 min read
Whoami
This page is generated from the published OpenAPI document. It is complete with respect to that document and says nothing about surfaces the document does not describe yet. See what is generated here for what that means.
Base URL: https://api.codespar.dev
Every operation below requires a Bearer token. See Authentication.
GET /v1/whoami
What this credential is
Responses
| Status | Body | Description |
|---|---|---|
200 | Whoami | OK |
Response 200
| Field | Type | Required | Description |
|---|---|---|---|
key | object | yes | — |
organization | object | yes | — |
project | object | yes | — |
user | object | no | Display only. An API key is scoped to an org and a project, not to a user; this is a representative org member (owner first) for a 'logged in as' line, and it is absent when no member has an email. |
Example response
{
"user": {
"email": "person@example.com",
"name": "Example"
},
"organization": {
"id": "whoami_0000000000000000"
},
"project": {
"id": "whoami_0000000000000000"
},
"key": {
"id": "whoami_0000000000000000",
"environment": "string",
"scopes": [
"string"
]
}
}Example request
curl -X GET https://api.codespar.dev/v1/whoami \
-H "Authorization: Bearer $CODESPAR_API_KEY"