---
title: "Upsert a Workspace"
method: PUT
path: "/workspaces/{WorkspaceIdOrName}"
tags: ["Workspaces"]
---

# Upsert a Workspace

`PUT /workspaces/{WorkspaceIdOrName}`

Create or Update Workspace using ID or name.

## Request body

- Workspace
  - `comment` string, nullable — A description or additional information about the workspace.
  - `config` object, nullable
    - `meta` object
    - `portal` boolean
    - `portal_access_request_email` boolean
    - `portal_application_request_email` boolean
    - `portal_application_status_email` boolean
    - `portal_approved_email` boolean
    - `portal_auth` string
    - `portal_auth_conf` string
    - `portal_auto_approve` boolean
    - `portal_cors_origins` string[]
    - `portal_developer_meta_fields` string
    - `portal_emails_from` string
    - `portal_emails_reply_to` string
    - `portal_invite_email` boolean
    - `portal_is_legacy` boolean
    - `portal_reset_email` boolean
    - `portal_reset_success_email` boolean
    - `portal_session_conf` string
    - `portal_smtp_admin_emails` string[]
    - `portal_token_exp` integer
  - `created_at` integer, nullable — Unix epoch when the resource was created.
  - `id` string, nullable — A string representing a UUID (universally unique identifier).
  - `meta` object, nullable
    - `color` string
    - `thumbnail` string
  - `name` string, required — A unique string representing a UTF-8 encoded name.
  - `updated_at` integer, nullable — Unix epoch when the resource was last updated.

## Response `200`

Successfully upserted Workspace

- Workspace
  - `comment` string, nullable — A description or additional information about the workspace.
  - `config` object, nullable
    - `meta` object
    - `portal` boolean
    - `portal_access_request_email` boolean
    - `portal_application_request_email` boolean
    - `portal_application_status_email` boolean
    - `portal_approved_email` boolean
    - `portal_auth` string
    - `portal_auth_conf` string
    - `portal_auto_approve` boolean
    - `portal_cors_origins` string[]
    - `portal_developer_meta_fields` string
    - `portal_emails_from` string
    - `portal_emails_reply_to` string
    - `portal_invite_email` boolean
    - `portal_is_legacy` boolean
    - `portal_reset_email` boolean
    - `portal_reset_success_email` boolean
    - `portal_session_conf` string
    - `portal_smtp_admin_emails` string[]
    - `portal_token_exp` integer
  - `created_at` integer, nullable — Unix epoch when the resource was created.
  - `id` string, nullable — A string representing a UUID (universally unique identifier).
  - `meta` object, nullable
    - `color` string
    - `thumbnail` string
  - `name` string, required — A unique string representing a UTF-8 encoded name.
  - `updated_at` integer, nullable — Unix epoch when the resource was last updated.

## Other responses

- `401` — Unauthorized

---

[API](https://skmtc.net/kong/apis/kong-enterprise-admin-api.md) · [All operations](https://skmtc.net/kong/apis/kong-enterprise-admin-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/kong/kong-enterprise-admin-api/revisions/28b1f8a59cdc/schema)
