# Rename a project or change who sees it

Source: https://openpanel.sh/docs/api/projects/rename-a-project-or-change-who-sees-it

`PATCH https://openpanel.sh/api/v1/projects/{projectId}`

## Parameters

| Name | In | Required | Description |
|---|---|---|---|
| `projectId` | path | yes | The project's id. |

## Request body

JSON, `ProjectUpdate`.

## Responses

| Status | Meaning | Body |
|---|---|---|
| 200 | Rename a project or change who sees it | `application/json`, `Project` |
| 401 | No valid credential was sent. | `application/problem+json`, `Problem` |
| 403 | The credential may not do this. | `application/problem+json`, `Problem` |
| 404 | Not found, or not visible to this credential. | `application/problem+json`, `Problem` |
| 409 | It clashes with something that exists, such as a name in use. | `application/problem+json`, `Problem` |
| 422 | The input was refused; detail says why. | `application/problem+json`, `Problem` |
| 429 | Too many requests; wait for Retry-After seconds. | `application/problem+json`, `Problem` |

## Schemas

### Environment

```json
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "name": {
      "type": "string"
    },
    "production": {
      "type": "boolean"
    }
  },
  "required": [
    "id",
    "name",
    "production"
  ]
}
```

### Problem

```json
{
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "description": "A link to the error's explanation in the docs."
    },
    "title": {
      "type": "string"
    },
    "status": {
      "type": "integer"
    },
    "code": {
      "type": "string",
      "description": "Stable machine-readable code: not_found, forbidden, invalid, conflict, rate_limited, not_implemented, …"
    },
    "detail": {
      "type": "string",
      "description": "What went wrong, in a sentence written for a person."
    }
  },
  "required": [
    "type",
    "title",
    "status",
    "code",
    "detail"
  ]
}
```

### Project

```json
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "organizationId": {
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "slug": {
      "type": "string",
      "description": "The project's part of its services' opnl.app addresses."
    },
    "visibility": {
      "type": "string",
      "enum": [
        "organization",
        "private"
      ]
    },
    "createdBy": {
      "type": [
        "string",
        "null"
      ]
    },
    "createdAt": {
      "type": "string",
      "format": "date-time"
    },
    "updatedAt": {
      "type": "string",
      "format": "date-time"
    },
    "access": {
      "type": "string",
      "enum": [
        "none",
        "view",
        "deploy",
        "admin"
      ],
      "description": "The caller's own access to this project."
    },
    "environments": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/Environment"
      }
    }
  },
  "required": [
    "id",
    "organizationId",
    "name",
    "slug",
    "visibility",
    "createdBy",
    "createdAt",
    "updatedAt",
    "access",
    "environments"
  ]
}
```

### ProjectUpdate

```json
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 60
    },
    "visibility": {
      "type": "string",
      "enum": [
        "organization",
        "private"
      ]
    }
  },
  "additionalProperties": false
}
```