---
agentTools:
  projectIndex: https://kable.readme.io/llms.txt
---

# update dimension

Update a dimension.

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "paths": {
    "/api/v1/dimensions/{dimensionId}/update": {
      "post": {
        "operationId": "updateDimension",
        "summary": "update dimension",
        "description": "Update a dimension.",
        "parameters": [
          {
            "name": "Kable-Client-Id",
            "in": "header",
            "description": "Your Kable client ID, found in the dashboard of your Kable account.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Kable-Client-Secret",
            "in": "header",
            "description": "Your `LIVE` or `TEST` secret key.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "dimensionId",
            "required": true,
            "in": "path",
            "description": "The dimension ID",
            "example": "dim_c5f32b8cd8934356b5167a3b2c6c6314",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateDimensionRequestDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Dimension successfully updated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DimensionResponseDto"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage401"
                }
              }
            }
          },
          "500": {
            "description": "Something went wrong",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMessage500"
                }
              }
            }
          }
        },
        "tags": [
          "dimensions"
        ]
      }
    }
  },
  "info": {
    "title": "Kable API",
    "description": "The Kable API allows developers to manage customers, plans, and usage data for their API.\n\n## API Host and Environments\n\nKable is accessible in Live and Test environments for authentication and metering of client API requests. You will have separate API keys to access each environment.\n\nYou should only use Kable's Live environment for your own production data. All other configured environments should use Kable's Test environment.\n\n## API Protocols and Headers\n\nAll requests to the Kable API are made over HTTPS TLS v1.2+ to ensure security. Calls made over HTTP will fail. Any requests without proper authentication will also fail.\n\nThe Kable API uses standard JSON for requests and responses. Be sure to set both the `Content-Type` and `Accept` headers on each request to `application/json`.\n\nEach Kable API response includes a `requestId` as the `X-REQUEST-ID` response header. The `requestId` is included on most responses regardless whether the API request succeeded or failed. You can use this `requestId` to help with debugging or when contacting support regarding a specific API call.\n\n## API Versioning\n\nAll Kable endpoints are versioned. After the host, each API can be found at `/api/vX/...` where X is the API version.\n\nWe strive to ensure that changes to the Kable API are backward compatible. Sometimes, though, we must break from older design paradigms to make the product better. When this happens, a new version of the API is released.\n\nThe current version of the Kable API is `v1`.\n\n",
    "version": "1.0.0",
    "contact": {
      "name": "Kable",
      "url": "https://kable.io",
      "email": "contact@kable.io"
    }
  },
  "servers": [
    {
      "url": "https://live.kable.io",
      "description": "Kable Live"
    },
    {
      "url": "https://test.kable.io",
      "description": "Kable Test"
    }
  ],
  "components": {
    "schemas": {
      "ErrorMessage401": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string",
            "description": "Human-readable error message",
            "example": "Unauthorized"
          }
        },
        "required": [
          "message"
        ]
      },
      "ErrorMessage500": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string",
            "description": "Human-readable error message",
            "example": "Something went wrong"
          }
        },
        "required": [
          "message"
        ]
      },
      "DimensionResponseDto": {
        "type": "object",
        "properties": {
          "dimensionId": {
            "type": "string",
            "description": "A Kable-defined identifier for the dimension.",
            "example": "dim_c5f32b8cd8934356b5167a3b2c6c6314"
          },
          "key": {
            "type": "string",
            "description": "An identifier for the dimension defined by you. This key corresponds to the key in the JSON payload of a usage event, and can be passed into the `record` library method.",
            "example": "userId"
          },
          "name": {
            "type": "string",
            "description": "A human-readable name for the dimension, visible on dashboards, invoices, and reports.",
            "example": "User"
          }
        },
        "required": [
          "dimensionId",
          "key",
          "name"
        ]
      },
      "UpdateDimensionRequestDto": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "A human-readable name for the dimension which will be visible in dashboards and on invoices. Dimension names should be singular, not plural (ie \"User,\" not \"Users\").",
            "example": "User"
          }
        },
        "required": [
          "name"
        ]
      }
    }
  },
  "externalDocs": {
    "description": "Kable Documentation",
    "url": "https://docs.kable.io"
  },
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "_id": {
    "buffer": {
      "0": 98,
      "1": 133,
      "2": 73,
      "3": 91,
      "4": 45,
      "5": 72,
      "6": 119,
      "7": 0,
      "8": 140,
      "9": 125,
      "10": 233,
      "11": 173
    }
  }
}
```