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

# Make an API key

> Answers the key's token once; store it. Needs a browser sign-in or a key with `canMint`; a key made by a key records it as `mintedBy`, expires no later than it, and stays in its workspace. `expiresAt` is a future day such as `2027-02-07` or a date and time with a zone; leave it out and the key works until it's revoked. `data.canMint` lets the new key make keys too, and only a sign-in that may make keys can give it. `data.workspace` keeps the new key to one workspace you're in; a workspace key or an agent can only name its own. Errors use the plugin's own `{ error }` shape: `401`, `403` ("session required") and `404`.



## OpenAPI

````yaml https://dojo.frogbot.ai/api/openapi.json post /api/api-keys/mint
openapi: 3.1.0
info:
  title: Dojo API
  version: '1'
  description: >-
    Everything Dojo's pages do, for scripts and agents. Sign in with an API key
    as `Authorization: Bearer fb_…`. Paying and accepting the terms happen at a
    link a route answers, for a person to open.
servers:
  - url: https://dojo.frogbot.ai
security:
  - apiKey: []
tags:
  - name: Sign-in
  - name: Workspaces
  - name: Projects
  - name: Apps
  - name: Templates
  - name: Sharing
  - name: Deployments
  - name: Environment variables
  - name: Domains
  - name: Data
  - name: Billing
  - name: API keys
paths:
  /api/api-keys/mint:
    post:
      tags:
        - API keys
      summary: Make an API key
      description: >-
        Answers the key's token once; store it. Needs a browser sign-in or a key
        with `canMint`; a key made by a key records it as `mintedBy`, expires no
        later than it, and stays in its workspace. `expiresAt` is a future day
        such as `2027-02-07` or a date and time with a zone; leave it out and
        the key works until it's revoked. `data.canMint` lets the new key make
        keys too, and only a sign-in that may make keys can give it.
        `data.workspace` keeps the new key to one workspace you're in; a
        workspace key or an agent can only name its own. Errors use the plugin's
        own `{ error }` shape: `401`, `403` ("session required") and `404`.
      operationId: post/api/api-keys/mint
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                expiresAt:
                  type: string
                data:
                  type: object
                  properties:
                    canMint:
                      type: boolean
                      description: Whether the new key can make keys too.
                    workspace:
                      type: string
                      description: >-
                        The one workspace the new key works in: the workspace's
                        id.
                  required: []
              required:
                - name
            example:
              name: GitHub Actions deploy
              expiresAt: '2027-02-07'
              data:
                workspace: 6650f1c2a4b5c6d7e8f90123
      responses:
        '201':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    description: A document id.
                  name:
                    type: string
                  prefix:
                    type: string
                  token:
                    type: string
                required:
                  - id
                  - prefix
                  - token
components:
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
      description: >-
        An API key from `frogbot deploy`'s sign-in, `/api/cli/device/token`, or
        the API keys page.

````

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