# Edit a project

> Management API · Projects

```http
PATCH https://app.mk.io/api/v1/projects/{project_name}
```

Update project.

RBAC Capability Required: `core.project.update`

## Authentication

- `Authorization` header — Bearer authentication of the form `Bearer <token>`.

## Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `project_name` | string | Yes | — |

## Request body

Content type: `application/json`

- `metadata` · object · Optional — Metadata.
  - `displayName` · string · Optional · _1-255 characters_ — New display name of the project.
- `spec` · object · Optional — Specification.
  - `isActive` · boolean · Optional — Is project active?
  - `isHidden` · boolean · Optional — Is project hidden?

## Example request

```bash
curl -X PATCH "https://app.mk.io/api/v1/projects/{project_name}" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
  "metadata": {
    "displayName": "string"
  },
  "spec": {
    "isActive": true,
    "isHidden": true
  }
}'
```

## Responses

### 200 — OK

- `kind` · string · Optional — The kind of record.
- `metadata` · object · Optional — Metadata.
  - `cloud` · object · **Required** — Cloud in which the project is hosted.
    - `displayName` · string · **Required** — The display name of the cloud.
    - `id` · string · Optional · _format: uuid_ — The unique identifier of the cloud.
    - `name` · string · **Required** — The unique name of the cloud.
  - `created` · string · Optional · _format: date-time_ — The time when the resource was created
  - `createdBy` · string · Optional · _format: uuid_ — ID of the user who created the resource
  - `createdByEmail` · string · Optional — Email of the user who created the resource
  - `createdById` · string · **Required** · _format: uuid_ — ID of the user who created the project.
  - `createdByName` · string · **Required** — Name of the user who created the project.
  - `displayName` · string · Optional — The display name of the resource
  - `id` · string · **Required** · _format: uuid_ — The ID of the resource
  - `name` · string · Optional — The name of the resource
  - `updated` · string · Optional · _format: date-time_ — The time when the resource was last updated
- `spec` · object · **Required** — Specification.
  - `assignedPaymentMethodId` · string or null · **Required** · _format: uuid_ — ID of the payment method assigned to the project.
  - `displayName` · string · **Required** — Display name of the project.
  - `isActive` · boolean · **Required** — Is project active.
  - `locationDisplayName` · string · Optional — Display name of the location the project is in.
  - `locationId` · string · **Required** · _format: uuid_ — ID of the location the project is in.
  - `locationName` · string · **Required** — Name of the location the project is in.
  - `name` · string · **Required** — Name of the project.

Example:

```json
{
  "kind": "string",
  "metadata": {
    "cloud": {
      "displayName": "Azure",
      "id": "00000000-0000-0000-0000-000000000000",
      "name": "azure"
    },
    "created": "2024-01-01T00:00:00Z",
    "createdBy": "00000000-0000-0000-0000-000000000000",
    "createdByEmail": "string",
    "createdById": "00000000-0000-0000-0000-000000000000",
    "createdByName": "string",
    "displayName": "string",
    "id": "00000000-0000-0000-0000-000000000000",
    "name": "string",
    "updated": "2024-01-01T00:00:00Z"
  },
  "spec": {
    "assignedPaymentMethodId": "00000000-0000-0000-0000-000000000000",
    "displayName": "string",
    "isActive": true,
    "locationDisplayName": "string",
    "locationId": "00000000-0000-0000-0000-000000000000",
    "locationName": "string",
    "name": "string"
  }
}
```

### 400 — Bad Request

- `error` · object · **Required** — Pertinent information about the error
  - `code` · string · **Required** — The error code.
  - `detail` · string · **Required** — The error message.
  - `extraDetail` · map from strings to any · Optional — Extra information regarding this error.
    - `[any key]` · any — map of additional properties
- `ref` · string · **Required** — A reference to the request that caused the error.
- `status` · integer · **Required** — The HTTP status code

Example:

```json
{
  "error": {
    "code": "string",
    "detail": "string",
    "extraDetail": {
      "key": null
    }
  },
  "ref": "string",
  "status": 0
}
```

### 401 — Unauthorized

- `error` · object · **Required** — Pertinent information about the error
  - `code` · string · **Required** — The error code.
  - `detail` · string · **Required** — The error message.
  - `extraDetail` · map from strings to any · Optional — Extra information regarding this error.
    - `[any key]` · any — map of additional properties
- `ref` · string · **Required** — A reference to the request that caused the error.
- `status` · integer · **Required** — The HTTP status code

Example:

```json
{
  "error": {
    "code": "string",
    "detail": "string",
    "extraDetail": {
      "key": null
    }
  },
  "ref": "string",
  "status": 0
}
```

### 403 — Forbidden

- `error` · object · **Required** — Pertinent information about the error
  - `code` · string · **Required** — The error code.
  - `detail` · string · **Required** — The error message.
  - `extraDetail` · map from strings to any · Optional — Extra information regarding this error.
    - `[any key]` · any — map of additional properties
- `ref` · string · **Required** — A reference to the request that caused the error.
- `status` · integer · **Required** — The HTTP status code

Example:

```json
{
  "error": {
    "code": "string",
    "detail": "string",
    "extraDetail": {
      "key": null
    }
  },
  "ref": "string",
  "status": 0
}
```

### 404 — Not Found

- `error` · object · **Required** — Pertinent information about the error
  - `code` · string · **Required** — The error code.
  - `detail` · string · **Required** — The error message.
  - `extraDetail` · map from strings to any · Optional — Extra information regarding this error.
    - `[any key]` · any — map of additional properties
- `ref` · string · **Required** — A reference to the request that caused the error.
- `status` · integer · **Required** — The HTTP status code

Example:

```json
{
  "error": {
    "code": "string",
    "detail": "string",
    "extraDetail": {
      "key": null
    }
  },
  "ref": "string",
  "status": 0
}
```

### 429 — Too Many Requests

- `error` · object · **Required** — Pertinent information about the error
  - `code` · string · **Required** — The error code.
  - `detail` · string · **Required** — The error message.
  - `extraDetail` · map from strings to any · Optional — Extra information regarding this error.
    - `[any key]` · any — map of additional properties
- `ref` · string · **Required** — A reference to the request that caused the error.
- `status` · integer · **Required** — The HTTP status code

Example:

```json
{
  "error": {
    "code": "string",
    "detail": "string",
    "extraDetail": {
      "key": null
    }
  },
  "ref": "string",
  "status": 0
}
```

### 500 — Internal Server Error

- `error` · object · **Required** — Pertinent information about the error
  - `code` · string · **Required** — The error code.
  - `detail` · string · **Required** — The error message.
  - `extraDetail` · map from strings to any · Optional — Extra information regarding this error.
    - `[any key]` · any — map of additional properties
- `ref` · string · **Required** — A reference to the request that caused the error.
- `status` · integer · **Required** — The HTTP status code

Example:

```json
{
  "error": {
    "code": "string",
    "detail": "string",
    "extraDetail": {
      "key": null
    }
  },
  "ref": "string",
  "status": 0
}
```

---

Source spec: `management-api` · operationId: `[patch]_/api/v1/projects/{project_name}`
