---
title: "Update city by its id"
method: PUT
path: "/cities/{cityId}"
tags: ["City"]
---

# Update city by its id

`PUT /cities/{cityId}`

Update city by its id

## Path parameters

- `cityId` integer, required

## Request body

- AddCity
  - `name` string — Name of City.
  - `country_id` integer — Country id of City.
  - `state_id` integer — State id of City.
  - `city_code` string — City code of City.
  - `is_active` integer — Is active.

## Response `200`

City updated

- City
  - `id` integer
  - `created_at` string
  - `updated_at` string
  - `country_id` integer
  - `state_id` integer
  - `name` string
  - `slug` string
  - `code` string
  - `is_active` integer

## Other responses

- `default` — Unexpected error

---

[API](https://skmtc.net/agriya/apis/ofos-api-endpoints.md) · [All operations](https://skmtc.net/agriya/apis/ofos-api-endpoints/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/agriya/ofos-api-endpoints/revisions/8db13a44d758/schema)
