---
agentTools:
  projectIndex: https://umbrella-network.readme.io/llms.txt
---

# Create an API Key

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "description": "Umbrella Network API",
    "version": "1.0.0",
    "title": "Umbrella Network API",
    "termsOfService": "https://umb.network",
    "contact": {
      "email": "nm@umb.network"
    }
  },
  "servers": [
    {
      "url": "api.umb.network",
      "description": "production"
    }
  ],
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "paths": {
    "/api-keys": {
      "post": {
        "summary": "Create an API Key",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/APIKeyRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Created API Key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIKey"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT"
      }
    },
    "schemas": {
      "APIKey": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "key": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "projectId": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "APIKeyRequest": {
        "type": "object",
        "required": [
          "projectId"
        ],
        "properties": {
          "projectId": {
            "type": "string",
            "description": "Project to create the API key for."
          },
          "description": {
            "type": "string",
            "description": "Description for the API key."
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time",
            "description": "Expiration for the API key."
          }
        }
      }
    }
  },
  "x-si-base": "./docs/api.yml",
  "x-github-repo": "umbrella-network/sanctuary",
  "x-github-sha": "526c40b632b005988995d6eefb1e0bcd51f4cf37",
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "_id": {
    "buffer": {
      "0": 99,
      "1": 226,
      "2": 160,
      "3": 67,
      "4": 168,
      "5": 118,
      "6": 62,
      "7": 0,
      "8": 18,
      "9": 5,
      "10": 128,
      "11": 44
    }
  }
}
```