---
title: "Patches a direktiv namespace"
method: PATCH
path: "/api/v2/namespaces/{namespace}"
tags: ["namespaces"]
---

# Patches a direktiv namespace

`PATCH /api/v2/namespaces/{namespace}`

## Path parameters

- `namespace` string, required

## Request body

- object
  - `mirror` object, nullable — git mirror settings associated with the namespace (only with git mirrored namespace). Null value means this is a none mirrored (ordinary) namespace
    - `url` string — url of the git repo
    - `gitRef` string — git branch name
    - `authType` 'public' | 'ssh' | 'token' — this field indicated what kind of authentication is used
    - `authToken` string — (optional) auth token used to clone git repo
    - `publicKey` string — (optional) associated publish key ssh credential
    - `privateKey` string — (optional) associated private key ssh credential
    - `privateKeyPassphrase` string — (optional) associated private key passphrase ssh credential
    - `insecure` boolean — to ignore insecure ssl certificates

## Response `200`

data of the updated direktiv namespace

- object
  - `data` object
    - `name` string — a unique string that represent name of the namespace
    - `isSystemNamespace` boolean — returns true only if this is a privileged namespace with special system-wide impacts.
    - `mirror` object, nullable — git mirror settings associated with the namespace (only with git mirrored namespace). Null value means this is a none mirrored (ordinary) namespace
      - `url` string — url of the git repo
      - `gitRef` string — git branch name
      - `authType` 'public' | 'ssh' | 'token' — this field indicated what kind of authentication is used
      - `publicKey` string — (optional) associated publish key ssh credential
      - `insecure` boolean — to ignore insecure ssl certificates
      - `createdAt` string — timestamp of creation date
      - `updatedAt` string — timestamp of last updating date
    - `createdAt` string — timestamp of creation date
    - `updatedAt` string — timestamp of last updating date

---

[API](https://skmtc.net/direktiv/apis/direktiv-apiv2-reference.md) · [All operations](https://skmtc.net/direktiv/apis/direktiv-apiv2-reference/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/direktiv/direktiv-apiv2-reference/revisions/ad935afb0f54/schema)
