---
updatedAt: 2026-04-28T21:07:34.000Z
agentTools:
  siteIndex: https://docs.readme.com/llms.txt
  siteSearch: https://docs.readme.com/agentSearch?query=term1%20term2
  projectIndex: https://docs.readme.com/main/llms.txt
  projectSearch: https://docs.readme.com/main/agentSearch?query=term1%20term2
---

# Get an API key

Get an API key for your ReadMe project.

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "description": "Create beautiful product and API documentation with our developer friendly platform.",
    "version": "2.0.0",
    "title": "ReadMe API",
    "x-readme-deploy": "5.953.0",
    "termsOfService": "https://readme.com/tos",
    "contact": {
      "name": "API Support",
      "url": "https://docs.readme.com/main/docs/need-more-support",
      "email": "support@readme.io"
    }
  },
  "components": {
    "securitySchemes": {
      "bearer": {
        "type": "http",
        "scheme": "bearer",
        "description": "A bearer token that will be supplied within an `Authentication` header as `bearer <token>`."
      },
      "oauth2": {
        "type": "oauth2",
        "description": "OAuth authorization code with PKCE. Access tokens are opaque and expire after 15 minutes. Validate OIDC ID tokens according to RFC8725.",
        "flows": {
          "authorizationCode": {
            "authorizationUrl": "https://dash.readme.com/oidc/auth",
            "tokenUrl": "https://dash.readme.com/oidc/token",
            "refreshUrl": "https://dash.readme.com/oidc/token",
            "scopes": {
              "openid": "Sign in with your ReadMe account.",
              "offline_access": "Keep access when you are not signed in."
            }
          }
        }
      }
    }
  },
  "paths": {
    "/projects/{subdomain}/apikeys/{api_key_id}": {
      "get": {
        "operationId": "getAPIKey",
        "summary": "Get an API key",
        "tags": [
          "API Keys"
        ],
        "description": "Get an API key for your ReadMe project.",
        "parameters": [
          {
            "schema": {
              "type": "string",
              "pattern": "[a-f\\d]{24}"
            },
            "in": "path",
            "name": "api_key_id",
            "required": true,
            "description": "The unique identifier for your API key."
          },
          {
            "schema": {
              "type": "string",
              "pattern": "(me|[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*)",
              "maxLength": 30
            },
            "in": "path",
            "name": "subdomain",
            "required": true,
            "description": "The subdomain of your project."
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "x-readme-subdomain",
            "required": false,
            "description": "The project subdomain. Required with an OAuth token. With an API key, must match the key’s project if supplied."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "token": {
                          "type": "string",
                          "pattern": "rdme_\\w+"
                        },
                        "label": {
                          "type": "string",
                          "nullable": true
                        },
                        "created_by": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "enum": [
                                    "user"
                                  ]
                                },
                                "email": {
                                  "type": "string",
                                  "format": "email",
                                  "description": "The creator's email address at key creation."
                                }
                              },
                              "required": [
                                "type",
                                "email"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "enum": [
                                    "api_key"
                                  ]
                                },
                                "key_id": {
                                  "type": "string",
                                  "pattern": "[a-f\\d]{24}",
                                  "description": "The ID of the API key used to create this key."
                                },
                                "key_suffix": {
                                  "type": "string",
                                  "minLength": 5,
                                  "maxLength": 5,
                                  "description": "The creating API key's final five characters at key creation."
                                }
                              },
                              "required": [
                                "type",
                                "key_id",
                                "key_suffix"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "enum": [
                                    "system"
                                  ]
                                },
                                "process": {
                                  "type": "string",
                                  "enum": [
                                    "ai-onboarding",
                                    "import-runner"
                                  ],
                                  "description": "The system process that created the key."
                                }
                              },
                              "required": [
                                "type",
                                "process"
                              ],
                              "additionalProperties": false
                            }
                          ],
                          "nullable": true,
                          "description": "Who or what created the key. Null when attribution is unknown."
                        },
                        "last_accessed_on": {
                          "type": "string",
                          "format": "date-time",
                          "nullable": true,
                          "description": "An ISO 8601 formatted date for when the API key was last accessed."
                        },
                        "created_at": {
                          "type": "string",
                          "format": "date-time",
                          "description": "An ISO 8601 formatted date for when the API key was created."
                        },
                        "uri": {
                          "type": "string",
                          "pattern": "\\/projects\\/(me|[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*)\\/apikeys\\/[a-f\\d]{24}"
                        }
                      },
                      "required": [
                        "token",
                        "label",
                        "created_by",
                        "last_accessed_on",
                        "created_at",
                        "uri"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        }
      }
    }
  },
  "servers": [
    {
      "url": "https://api.readme.com/v2",
      "description": "The ReadMe API"
    }
  ],
  "security": [
    {
      "bearer": []
    },
    {
      "oauth2": [
        "openid",
        "offline_access"
      ]
    }
  ],
  "x-readme": {
    "proxy-enabled": true
  },
  "tags": [
    {
      "name": "API Keys"
    }
  ]
}
```

# Sibling pages

* [Create an API key](https://docs.readme.com/main/reference/createapikey.md)
* [Get your API keys](https://docs.readme.com/main/reference/getapikeys.md)
* [Delete an API key](https://docs.readme.com/main/reference/deleteapikey.md)
* [Update an API key](https://docs.readme.com/main/reference/updateapikey.md)