---
updatedAt: 2026-09-11T18:34:39.000Z
---

# Revoke an API Key

Revokes an API Key.

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "contact": {
      "email": "support@getpinwheel.com",
      "name": "Support",
      "url": "https://getpinwheel.com"
    },
    "description": "Pinwheel is the API for direct deposit switching, bill switching, and income & employment verification.",
    "title": "Pinwheel",
    "version": "v2025-07-08"
  },
  "servers": [
    {
      "description": "production",
      "url": "https://api.getpinwheel.com/v1"
    },
    {
      "description": "sandbox",
      "url": "https://sandbox.getpinwheel.com/v1"
    },
    {
      "description": "development",
      "url": "https://development.getpinwheel.com/v1"
    }
  ],
  "paths": {
    "/admin/api_keys/{api_key}/revoke": {
      "post": {
        "description": "Revokes an API Key.",
        "operationId": "revoke_key_v1_admin_api_keys__api_key__revoke_post",
        "parameters": [
          {
            "description": "The public token that refers to your API key, as distinct from the API Secret.",
            "in": "path",
            "name": "api_key",
            "required": true,
            "schema": {
              "description": "The public token that refers to your API key, as distinct from the API Secret.",
              "type": "string"
            }
          },
          {
            "description": "Admin API bearer token.",
            "in": "header",
            "name": "authorization",
            "required": false,
            "schema": {
              "description": "Admin API bearer token.",
              "type": "string"
            }
          },
          {
            "description": "Version identifier specifying how the Pinwheel API should behave. See the Change Management page for more information.",
            "in": "header",
            "name": "Pinwheel-Version",
            "required": true,
            "schema": {
              "default": "2025-07-08",
              "enum": [
                "2022-03-02",
                "2022-06-22",
                "2022-09-09",
                "2023-04-18",
                "2023-07-18",
                "2023-11-22",
                "2025-07-08"
              ],
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "examples": {
                  "example": {
                    "value": {
                      "data": {
                        "created_at": "2023-03-20 13:02:21.987347+00:00",
                        "expires_at": null,
                        "key": "412cb238ff82788ae1678fbdb3623a75b44059aa07a6e915c3d99a750e7953b2",
                        "mode": "production",
                        "revoked_at": "2023-03-24 21:37:00.768426+00:00"
                      }
                    }
                  }
                },
                "schema": {
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/RevokeAPIKeyResponseData"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "type": "object",
                  "x-tags": [
                    "Schemas"
                  ]
                }
              }
            },
            "description": "OK"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "summary": "Revoke an API Key",
        "tags": [
          "API Keys"
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "RevokeAPIKeyResponseData": {
        "properties": {
          "created_at": {
            "description": "ISO 8601 timestamp of created time.",
            "format": "date-time",
            "title": "created_at",
            "type": "string"
          },
          "expires_at": {
            "description": "Timestamp used to set when this key automatically expires.",
            "format": "date-time",
            "title": "expires_at",
            "type": "string"
          },
          "key": {
            "description": "The public token that refers to your API key, as distinct from the API Secret.",
            "title": "key",
            "type": "string"
          },
          "mode": {
            "allOf": [
              {
                "enum": [
                  "development",
                  "production",
                  "sandbox"
                ],
                "type": "string"
              }
            ],
            "description": "The mode that the Admin API token is authorized for."
          },
          "revoked_at": {
            "description": "Timestamp of when this key was revoked.",
            "format": "date-time",
            "title": "revoked_at",
            "type": "string"
          }
        },
        "required": [
          "created_at",
          "key",
          "mode",
          "revoked_at"
        ],
        "title": "object",
        "type": "object",
        "x-tags": [
          "Schemas"
        ]
      }
    },
    "securitySchemes": {
      "apiSecret": {
        "description": "API Secret",
        "in": "header",
        "name": "X-API-SECRET",
        "type": "apiKey"
      },
      "bearerAuth": {
        "description": "Bearer token",
        "scheme": "bearer",
        "type": "http"
      }
    }
  },
  "tags": [
    {
      "name": "API Keys"
    }
  ],
  "security": [
    {
      "apiSecret": []
    }
  ]
}
```