# Update a workspace (/ms/growsocmed/docs/api-reference/me/update-workspace)

Rename a workspace or change its settings (owners and admins)

PATCH /workspaces/{id}

```json
{
  "tags": [
    "Me"
  ],
  "summary": "Update a workspace",
  "parameters": [
    {
      "schema": {
        "type": "string",
        "format": "uuid"
      },
      "required": true,
      "name": "id",
      "in": "path"
    }
  ],
  "requestBody": {
    "content": {
      "application/json": {
        "schema": {
          "type": "object",
          "properties": {
            "name": {
              "type": "string",
              "minLength": 1,
              "maxLength": 80
            },
            "external_id": {
              "type": [
                "string",
                "null"
              ],
              "maxLength": 200
            },
            "media_retention_days": {
              "anyOf": [
                {
                  "type": "number",
                  "enum": [
                    0
                  ]
                },
                {
                  "type": "number",
                  "enum": [
                    1
                  ]
                },
                {
                  "type": "number",
                  "enum": [
                    7
                  ]
                },
                {
                  "type": "number",
                  "enum": [
                    30
                  ]
                }
              ]
            },
            "posting_times": {
              "type": "array",
              "items": {
                "type": "string",
                "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$"
              },
              "maxItems": 48
            }
          }
        }
      }
    }
  },
  "responses": {
    "200": {
      "description": "OK",
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "name": {
                "type": "string"
              },
              "role": {
                "type": "string"
              },
              "is_default": {
                "type": "boolean"
              },
              "external_id": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "media_retention_days": {
                "type": "number",
                "description": "Days files stay after their posts are published: 0 (about an hour), 1, 7 or 30"
              },
              "posting_times": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Daily \"HH:MM\" slots the composer offers"
              },
              "accounts": {
                "type": "number"
              },
              "created_at": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "name",
              "role",
              "is_default",
              "external_id",
              "media_retention_days",
              "posting_times",
              "accounts",
              "created_at"
            ]
          }
        }
      }
    }
  },
  "operationId": "update-workspace",
  "description": "Rename a workspace or change its settings (owners and admins)"
}
```