Skip to main content
API reference

Whoami

Generated HTTP reference for the 1 operation the published OpenAPI document describes under whoami.

1 min read
View MarkdownEdit on GitHub

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

StatusBodyDescription
200WhoamiOK

Response 200

FieldTypeRequiredDescription
keyobjectyes
organizationobjectyes
projectobjectyes
userobjectnoDisplay 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"
Whoami | CodeSpar