---
updatedAt: 2025-08-11T18:18:17.000Z
agentTools:
  projectIndex: https://docs.keycafe.com/llms.txt
---

# Update Unlock Codes

Update all unlock codes for a SmartBox and all its Bins with a PUT request to the rekey endpoint with the SmartBox ID.

# OpenAPI definition

```json
{
  "openapi": "3.0.3",
  "info": {
    "title": "Keycafe API",
    "version": "0"
  },
  "x-explorer-enabled": true,
  "x-proxy-enabled": true,
  "x-samples-languages": [
    "shell",
    "python",
    "go"
  ],
  "servers": [
    {
      "url": "https://www.keycafe.com/"
    }
  ],
  "components": {
    "securitySchemes": {
      "BasicAuth": {
        "type": "http",
        "scheme": "basic"
      }
    }
  },
  "security": [
    {
      "BasicAuth": []
    }
  ],
  "paths": {
    "/v0/box/{box_id}/rekey": {
      "put": {
        "tags": [
          "Smartbox"
        ],
        "summary": "Update Unlock Codes",
        "description": "Update all unlock codes for a SmartBox and all its Bins with a PUT request to the rekey endpoint with the SmartBox ID.",
        "operationId": "update-lock-codes",
        "parameters": [
          {
            "name": "box_id",
            "in": "path",
            "required": true,
            "description": "The unique identifier of box. </br> Example:123456",
            "schema": {
              "type": "integer",
              "format": "int64",
              "default": ""
            }
          }
        ],
        "deprecated": false,
        "responses": {
          "200": {
            "description": "Success"
          },
          "400": {
            "description": "Invalid ID supplied"
          },
          "404": {
            "description": "ID not found"
          }
        }
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true
}
```