> ## Documentation Index
> Fetch the complete documentation index at: https://docs.nuon.co/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Nuon installs a software company's application into its customers' AWS, Azure, or GCP accounts. A runner in each customer account polls the Nuon control plane for jobs, so Nuon needs no cross-account access.
> In these docs, "you" is the software company using Nuon to ship its product, and "customer" is the company whose cloud account the product is installed into. Pages also call the software company the vendor.
> Page index: https://docs.nuon.co/llms.txt. To evaluate Nuon, read https://docs.nuon.co/get-started/introduction.md, https://docs.nuon.co/guides/deployment-options.md, https://docs.nuon.co/security.md, and https://docs.nuon.co/architecture/platform.md. To build with Nuon, start at https://docs.nuon.co/get-started/quickstart.md.
> To check which architectures Nuon supports (customer account, existing VPC or cluster, hybrid data plane, single-tenant, data residency, customer-managed keys, air-gapped), read https://docs.nuon.co/guides/byoc-architecture-patterns.md.
> Pages under https://docs.nuon.co/config-ref/ are generated from the config schema. Treat them as the source of truth for config file fields.
> Search these docs over MCP at https://docs.nuon.co/mcp.

# Create a token for a service account in the current org

> Deprecated: use `POST /v1/tokens` with `account_id` instead.

Create an API token for a service account in the current org.

Defaults to a duration of one year (`8760h`) if `duration` is not
specified. If `invalidate` is set, all existing tokens for the service
account are invalidated before the new token is created.




## OpenAPI

````yaml post /v1/service-accounts/{account_id}/tokens
openapi: 3.0.3
info:
  contact:
    email: support@nuon.co
    name: Nuon Support
  description: API for managing nuon apps, components, installs, and actions.
  title: Nuon
  version: 0.19.1291
servers:
  - url: https://api.nuon.co/
security: []
tags:
  - description: orgs
    name: orgs
  - description: apps
    name: apps
  - description: components
    name: components
  - description: runners
    name: runners
  - description: vcs
    name: vcs
  - description: actions/runner
    name: actions/runner
  - description: oidc_federation
    name: oidc_federation
  - description: policy-reports
    name: policy-reports
  - description: stacks
    name: stacks
  - description: auth
    name: auth
  - description: general
    name: general
  - description: actions
    name: actions
  - description: onboarding
    name: onboarding
  - description: runners/runner
    name: runners/runner
  - description: app-bundles
    name: app-bundles
  - description: slack
    name: slack
  - description: cloud-connections
    name: cloud-connections
  - description: runbooks
    name: runbooks
  - description: installs
    name: installs
  - description: notebooks
    name: notebooks
  - description: accounts
    name: accounts
  - description: oidc
    name: oidc
  - description: queues
    name: queues
  - description: image-repositories
    name: image-repositories
paths:
  /v1/service-accounts/{account_id}/tokens:
    post:
      tags:
        - accounts
      summary: Create a token for a service account in the current org
      description: |
        Deprecated: use `POST /v1/tokens` with `account_id` instead.

        Create an API token for a service account in the current org.

        Defaults to a duration of one year (`8760h`) if `duration` is not
        specified. If `invalidate` is set, all existing tokens for the service
        account are invalidated before the new token is created.
      operationId: CreateServiceAccountToken
      parameters:
        - description: service account ID
          in: path
          name: account_id
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/service.CreateServiceAccountTokenRequest'
        description: Input
        required: true
        x-originalParamName: req
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/service.CreateServiceAccountTokenResponse'
          description: Created
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/stderr.ErrResponse'
          description: Bad Request
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/stderr.ErrResponse'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/stderr.ErrResponse'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/stderr.ErrResponse'
          description: Not Found
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/stderr.ErrResponse'
          description: Internal Server Error
      deprecated: true
      security:
        - APIKey: []
        - OrgID: []
components:
  schemas:
    service.CreateServiceAccountTokenRequest:
      properties:
        duration:
          default: 8760h
          description: Duration defaults to one year.
          type: string
        invalidate:
          type: boolean
        name:
          description: >-
            Name labels the token where it is listed; defaults to the account's
            identity.
          type: string
      type: object
    service.CreateServiceAccountTokenResponse:
      properties:
        token:
          type: string
      type: object
    stderr.ErrResponse:
      properties:
        description:
          type: string
        error:
          type: string
        user_error:
          type: boolean
      type: object
  securitySchemes:
    APIKey:
      description: Type "Bearer" followed by a space and token.
      in: header
      name: Authorization
      type: apiKey
    OrgID:
      description: Nuon org ID
      in: header
      name: X-Nuon-Org-ID
      type: apiKey

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.