FusionAuth Key API

The Key API from FusionAuth — 7 operation(s) for key.

GitHub OpenAPI
Business capability
Cybersecurity Management BC-620

Operations 9

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

GET /api/key List all keys · Retrieve keys with id #
Ask an LLM
“Which keys are stored in my FusionAuth instance?”
“Can I see every key at once?”
Tell an agent
List all keys.
Show every stored key.
POST /api/key/generate Generate a new key · Generate key #
Ask an LLM
“How do I generate a new RSA key pair for JWT signing?”
“Can I generate an HMAC secret instead of an RSA key?”
Tell an agent
Generate a new key pair.
Create a new HMAC secret.
POST /api/key/generate/{keyId} Generate a key with a given id · Generate key with id #
Ask an LLM
“Can I generate a key and give it my own id?”
“What happens if I supply a key id when generating a key?”
Tell an agent
Generate a key with id {keyId}.
Create a new key pair and assign it id {keyId}.
POST /api/key/import Import an existing key · Import key #
Ask an LLM
“How do I import my own RSA key into FusionAuth?”
“Can I import an EC key pair I already have?”
Tell an agent
Import an existing key.
Load my own RSA key into the key store.
POST /api/key/import/{keyId} Import an existing key with a given id · Import key with id #
Ask an LLM
“Can I import an existing key and set its id myself?”
“What does importing a key with a supplied id do?”
Tell an agent
Import an existing key with id {keyId}.
Load my own EC key pair and assign it id {keyId}.
POST /api/key/search Search keys · Search keys with id #
Ask an LLM
“How do I find keys that match certain criteria?”
“Can I page through keys matching a search?”
Tell an agent
Search keys using {search}.
Find keys matching {search}, paginated.
DELETE /api/key/{keyId} Delete a key · Delete key with id #
Ask an LLM
“How do I delete a key I no longer use?”
“Can I remove a key by its id?”
Tell an agent destructive · confirm first
Delete key {keyId}.
Remove the unused key {keyId}.
GET /api/key/{keyId} Get a key by id · Retrieve key with id #
Ask an LLM
“What are the details of one key?”
“Can I fetch a single key by its id?”
Tell an agent
Get key {keyId}.
Show the details of key {keyId}.
PUT /api/key/{keyId} Update a key · Update key with id #
Ask an LLM
“How do I rotate the domain on an existing key?”
“Can I change a key's settings?”
Tell an agent
Update key {keyId} with {key}.
Rotate the domain on existing key {keyId}.

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/fusionauth:fusionauth-key-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

fusionauth-key-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  version: 1.66.0
  title: FusionAuth Key API
  description: This is a FusionAuth server. Find out more at https://fusionauth.io. You need to set up an API key in the FusionAuth instance you are using to test out the API calls.
  license:
    name: Apache2
servers:
- url: http://localhost:9011
- url: https://sandbox.fusionauth.io
security:
- ApiKeyAuth: []
tags:
- name: Key
paths:
  /api/key:
    get:
      description: Retrieves all the keys.
      operationId: retrieveKeysWithId
      parameters: []
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/KeyResponse'
        default:
          description: Error
      tags:
      - Key
      summary: Retrieve keys with id
      x-summary-source: derived
  /api/key/generate:
    post:
      description: Generate a new RSA or EC key pair or an HMAC secret.
      operationId: generateKey
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/KeyRequest'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/KeyResponse'
        default:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
      tags:
      - Key
      summary: Generate key
      x-summary-source: derived
  /api/key/generate/{keyId}:
    post:
      description: Generate a new RSA or EC key pair or an HMAC secret.
      operationId: generateKeyWithId
      parameters:
      - name: keyId
        in: path
        schema:
          type: string
        required: true
        description: The Id for the key. If not provided a secure random UUID will be generated.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/KeyRequest'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/KeyResponse'
        default:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
      tags:
      - Key
      summary: Generate key with id
      x-summary-source: derived
  /api/key/import:
    post:
      description: Import an existing RSA or EC key pair or an HMAC secret.
      operationId: importKey
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/KeyRequest'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/KeyResponse'
        default:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
      tags:
      - Key
      summary: Import key
      x-summary-source: derived
  /api/key/import/{keyId}:
    post:
      description: Import an existing RSA or EC key pair or an HMAC secret.
      operationId: importKeyWithId
      parameters:
      - name: keyId
        in: path
        schema:
          type: string
        required: true
        description: The Id for the key. If not provided a secure random UUID will be generated.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/KeyRequest'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/KeyResponse'
        default:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
      tags:
      - Key
      summary: Import key with id
      x-summary-source: derived
  /api/key/search:
    post:
      description: Searches keys with the specified criteria and pagination.
      operationId: searchKeysWithId
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/KeySearchRequest'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/KeySearchResponse'
        default:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
      tags:
      - Key
      summary: Search keys with id
      x-summary-source: derived
  /api/key/{keyId}:
    delete:
      description: Deletes the key for the given Id.
      operationId: deleteKeyWithId
      parameters:
      - name: keyId
        in: path
        schema:
          type: string
        required: true
        description: The Id of the key to delete.
      responses:
        '200':
          description: Success
        default:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
      tags:
      - Key
      summary: Delete key with id
      x-summary-source: derived
    get:
      description: Retrieves the key for the given Id.
      operationId: retrieveKeyWithId
      parameters:
      - name: keyId
        in: path
        schema:
          type: string
        required: true
        description: The Id of the key.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/KeyResponse'
        default:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
      tags:
      - Key
      summary: Retrieve key with id
      x-summary-source: derived
    put:
      description: Updates the key with the given Id.
      operationId: updateKeyWithId
      parameters:
      - name: keyId
        in: path
        schema:
          type: string
        required: true
        description: The Id of the key to update.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/KeyRequest'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/KeyResponse'
        default:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
      tags:
      - Key
      summary: Update key with id
      x-summary-source: derived
components:
  schemas:
    KeySearchCriteria:
      description: Search criteria for Keys
      type: object
      properties:
        algorithm:
          $ref: '#/components/schemas/KeyAlgorithm'
        name:
          type: string
        type:
          $ref: '#/components/schemas/KeyType'
        numberOfResults:
          type: integer
        orderBy:
          type: string
        startRow:
          type: integer
    KeyType:
      type: string
      enum:
      - EC
      - RSA
      - HMAC
      - OKP
      - Secret
    ZonedDateTime:
      description: 'The number of milliseconds since the unix epoch: January 1, 1970 00:00:00 UTC. This value is always in UTC.'
      example: '1659380719000'
      type: integer
      format: int64
    Key:
      description: Domain for a public key, key pair or an HMAC secret. This is used by KeyMaster to manage keys for JWTs, SAML, etc.
      type: object
      properties:
        algorithm:
          $ref: '#/components/schemas/KeyAlgorithm'
        certificate:
          type: string
        certificateInformation:
          $ref: '#/components/schemas/CertificateInformation'
        expirationInstant:
          $ref: '#/components/schemas/ZonedDateTime'
        hasPrivateKey:
          type: boolean
        id:
          type: string
          format: uuid
        insertInstant:
          $ref: '#/components/schemas/ZonedDateTime'
        issuer:
          type: string
        kid:
          type: string
        lastUpdateInstant:
          $ref: '#/components/schemas/ZonedDateTime'
        length:
          type: integer
        name:
          type: string
        privateKey:
          type: string
        publicKey:
          type: string
        secret:
          type: string
        type:
          $ref: '#/components/schemas/KeyType'
    KeyResponse:
      description: Key API response object.
      type: object
      properties:
        key:
          $ref: '#/components/schemas/Key'
        keys:
          type: array
          items:
            $ref: '#/components/schemas/Key'
    KeySearchResponse:
      description: Key search response
      type: object
      properties:
        keys:
          type: array
          items:
            $ref: '#/components/schemas/Key'
        total:
          type: integer
          format: int64
    Error:
      description: Defines an error.
      type: object
      properties:
        code:
          type: string
        data:
          type: object
          additionalProperties:
            type: object
        message:
          type: string
    CertificateInformation:
      type: object
      properties:
        issuer:
          type: string
        md5Fingerprint:
          type: string
        serialNumber:
          type: string
        sha1Fingerprint:
          type: string
        sha1Thumbprint:
          type: string
        sha256Fingerprint:
          type: string
        sha256Thumbprint:
          type: string
        subject:
          type: string
        validFrom:
          $ref: '#/components/schemas/ZonedDateTime'
        validTo:
          $ref: '#/components/schemas/ZonedDateTime'
    Errors:
      description: Standard error domain object that can also be used as the response from an API call.
      type: object
      properties:
        fieldErrors:
          type: array
          items:
            $ref: '#/components/schemas/Error'
        generalErrors:
          type: array
          items:
            $ref: '#/components/schemas/Error'
    KeySearchRequest:
      description: Search request for Keys
      type: object
      properties:
        search:
          $ref: '#/components/schemas/KeySearchCriteria'
    KeyRequest:
      description: Key API request object.
      type: object
      properties:
        key:
          $ref: '#/components/schemas/Key'
    KeyAlgorithm:
      type: string
      enum:
      - ES256
      - ES384
      - ES512
      - HS256
      - HS384
      - HS512
      - RS256
      - RS384
      - RS512
      - Ed25519
      - None
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      name: Authorization
      in: header
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
x-provenance:
  method: harvested
  publisher: FusionAuth
  source: https://raw.githubusercontent.com/fusionauth/fusionauth-openapi/HEAD/openapi.yaml
  note: split by refine-openapis from the provider's own published document, verified by fetch (openapi/_original/*.fetch.json);
    stamped by stamp-openapi-provenance.py (roadmap#793)