---
title: "One service account."
method: GET
path: "/v1/organizations/current/service-accounts/{id}"
tags: ["organizations"]
---

# One service account.

`GET /v1/organizations/current/service-accounts/{id}`

## Request

- Base URL: `https://api.50heads.com`
- URL: `https://api.50heads.com/v1/organizations/current/service-accounts/{id}`
- Auth: one of:
  - HTTP bearer
  - OAuth 2 (authorization code, authorization URL `https://auth.50heads.com/authorize`, token URL `https://auth.50heads.com/token`; client credentials, token URL `https://auth.50heads.com/token`, scopes: `organization:read`)

As the list. Behind the `machineIdentities` sub-flag: 404 `not_found` while it is off. A service account gets tokens from https://auth.50heads.com/token with `grant_type=client_credentials` and its client id and secret (HTTP Basic or the body) or a private_key_jwt assertion; no refresh token, ask again when it expires.

## Path parameters

- `id` string, required

## Response `200`

OK

- OrganizationServiceAccountGetResponse
  - `serviceAccount` object, required
    - `id` string, required
    - `name` string, required
    - `organizationId` string, required
    - `workspaceId` string, required
    - `workspaceName` string, required
    - `status` 'active' | 'disabled', required
    - `scopes` string[], required
    - `capDailyPence` integer, required
    - `capPerQuestionPence` integer, nullable, required
    - `spentTodayPence` integer, required
    - `clientId` string, required
    - `authMethod` 'client_secret' | 'private_key_jwt', required
    - `secrets` object[], required
      - `id` string, required
      - `hint` string, required
      - `createdAt` string, required
      - `expiresAt` string, nullable, required
      - `lastUsedAt` string, nullable, required
    - `jwks` object, nullable, required
      - `keys` object[], required
        - `kty` 'EC' | 'RSA', required
        - `kid` string
        - `alg` 'ES256' | 'RS256'
        - `use` 'sig'
        - `crv` string
        - `x` string
        - `y` string
        - `n` string
        - `e` string
    - `createdAt` string, required
    - `createdBy` object, nullable, required
      - `id` string, required
      - `name` string, nullable, required
    - `lastUsedAt` string, nullable, required
    - `disabledAt` string, nullable, required

## Other responses

- `401`: No key or token, or it expired or was revoked.
- `403`: The key or token lacks the scope (`insufficient_scope`), or the action is not allowed.
- `404`: No such question, endpoint or delivery on this account.
- `429`: Too many requests; wait for Retry-After.

---

[API](https://skmtc.dev/50heads/apis/50heads-api.md) · [All operations](https://skmtc.dev/50heads/apis/50heads-api/llms.txt) · [OpenAPI document](https://skmtc.dev/50heads/apis/50heads-api/revisions/edbfecb1e360?raw)
