ARCNM

API reference

Whoami

The Whoami API answers who is calling: the organization, the credential and its scopes, the plan, and the costing environment a part is priced in by default.

The Whoami API answers who is calling: the organization, the credential and its scopes, the plan, and the costing environment a part is priced in by default.

Auto-generated from the public OpenAPI spec — this page never drifts from the running API. Base URL https://api.arcnm.io. Authenticate with the X-API-Key header (see Authentication).

Who is calling

GET /api/v1/whoami

The calling credential: its organization, its kind (an API key's name and prefix, never its secret), its scopes and what they imply, the plan, and the costing environment a calculation that names none is priced in, with where it comes from. Any credential may call it, whatever its scopes. Read-only and free.

Request

curl -X GET https://api.arcnm.io/api/v1/whoami \
  -H "X-API-Key: $ARCNM_API_KEY"
import requests

resp = requests.get(
    "https://api.arcnm.io/api/v1/whoami",
    headers={"X-API-Key": "YOUR_API_KEY"},
)
resp.raise_for_status()
print(resp.json())
const resp = await fetch("https://api.arcnm.io/api/v1/whoami", {
  method: "GET",
  headers: {
    "X-API-Key": process.env.ARCNM_API_KEY!,
  },
})
const data = await resp.json()

Responses

Status Description
200 Successful Response
422 Validation Error
default Error — the error envelope; branch on error.code.

Errors

Standard error responses — see the Errors catalog for the full envelope, request_id, and retry-safety table.

Status Code When
401 invalid_api_key Missing, malformed, or revoked API key.
403 insufficient_scope The key is valid but lacks a scope this endpoint requires.
429 rate_limited Per-key or per-org rate limit exceeded — back off with jitter and retry.

Response body 200

Field Type Description
credential WhoamiCredential
default_costing_environment_id string The costing environment a calculation that names none is priced in.
default_costing_environment_source organization | baseline Where that environment comes from: organization (set with PUT /environments/{env_id}/default) or baseline (the auto-provisioned one).
effective_scopes string[] scopes plus every scope they imply (parts:write also covers setup:write and calibration:write): what the routes check. Null for a signed-in session.
organization WhoamiOrganization
plan string The organization's plan.
scopes string[] The scopes the credential carries now. Null for a signed-in session, which its role limits instead.

Example response

{
  "credential": {
    "kind": "api_key",
    "name": "string",
    "prefix": "string"
  },
  "default_costing_environment_id": "string",
  "default_costing_environment_source": "organization",
  "effective_scopes": [
    "string"
  ],
  "organization": {
    "id": "string",
    "name": "string",
    "slug": "string"
  },
  "plan": "string",
  "scopes": [
    "string"
  ]
}