---
updatedAt: 2026-05-31T12:17:20.000Z
agentTools:
  siteIndex: https://docs.jfrog.com/llms.txt
  projectIndex: https://docs.jfrog.com/administration/llms.txt
---

# Create or Replace Permission Target

Creates a new permission target in the JFrog Unified Platform or replaces an existing permission target.

Manages permissions on repositories only. For permissions on builds and release bundles, use the V2 API at `/v2/security/permissions/{permissionTargetName}`.

Since: 2.4.0

Notes: Requires Artifactory Pro.

- Missing values will be set to the default values as defined by the consumed type.

- Please note when adding Release Bundles permission targets

- Requires an Edge/Enterprise+ license

On Edge nodes, the repositories section in the request body can be left empty or contain the 'release-bundles' default repository. No other repositories are allowed. An Enterprise+ license allows you to add any repository

The default repository in the repository section is "release-bundles" for both Edge/EntPlus licenses. (if user create permission target with empty repositories section the repository that we put is "release bundles")

- To support spaces in the User or Group or Permission names, a Plus symbol (+) is automatically placed when there is a space. This is set by default as the artifactory.

security.api.plus.insteadof.space property is set to true. If you want to use the + (plus) symbol, set the artifactory.security.api.plus.insteadof.space to false.

Security: Requires an admin user

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "JFrog Artifactory Security API",
    "description": "REST API for managing security settings in JFrog Artifactory, including users, permissions, API keys, GPG keys, certificates, and encryption. \n\nNote - From Artifactory release 7.49.3, the security APIs are being decoupled from Artifactory and moving to JFrog Platform Access. This means that the security APIs below are planned to be deprecated at a later stage. We recommend using the available new APIs for all your security and access needs moving forward.\n",
    "version": "1.0.0",
    "contact": {
      "name": "JFrog Support"
    }
  },
  "servers": [
    {
      "url": "https://{jfrog_url}/artifactory/api",
      "description": "JFrog Platform",
      "variables": {
        "jfrog_url": {
          "default": "myserver.jfrog.io",
          "description": "Your JFrog Platform hostname (e.g., mycompany.jfrog.io)"
        }
      }
    }
  ],
  "tags": [
    {
      "name": "Permissions",
      "description": "Permission target management operations.\n\n- **V1** — permissions on repositories only.\n- **V2** — permissions on repositories, builds, and release bundles."
    }
  ],
  "paths": {
    "/security/permissions/{permissionTargetName}": {
      "put": {
        "tags": [
          "Permissions"
        ],
        "summary": "Create or Replace Permission Target",
        "description": "Creates a new permission target in the JFrog Unified Platform or replaces an existing permission target.\n\nManages permissions on repositories only. For permissions on builds and release bundles, use the V2 API at `/v2/security/permissions/{permissionTargetName}`.\n\nSince: 2.4.0\n\nNotes: Requires Artifactory Pro.\n\n- Missing values will be set to the default values as defined by the consumed type.\n\n- Please note when adding Release Bundles permission targets\n\n- Requires an Edge/Enterprise+ license\n\nOn Edge nodes, the repositories section in the request body can be left empty or contain the 'release-bundles' default repository. No other repositories are allowed. An Enterprise+ license allows you to add any repository\n\nThe default repository in the repository section is \"release-bundles\" for both Edge/EntPlus licenses. (if user create permission target with empty repositories section the repository that we put is \"release bundles\")\n\n- To support spaces in the User or Group or Permission names, a Plus symbol (+) is automatically placed when there is a space. This is set by default as the artifactory.\n\nsecurity.api.plus.insteadof.space property is set to true. If you want to use the + (plus) symbol, set the artifactory.security.api.plus.insteadof.space to false.\n\nSecurity: Requires an admin user",
        "operationId": "createOrReplacePermissionTarget",
        "parameters": [
          {
            "$ref": "#/components/parameters/permissionTargetName"
          }
        ],
        "requestBody": {
          "description": "Permission target definition including repositories, includes/excludes patterns, and user/group principals.",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PermissionTarget"
              }
            },
            "application/vnd.org.jfrog.artifactory.security.PermissionTarget+json": {
              "schema": {
                "$ref": "#/components/schemas/PermissionTarget"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Permission target created or replaced successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "info": {
                      "type": "string",
                      "description": "Confirmation message"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request - Invalid permission target configuration.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/UnauthorizedError"
          },
          "403": {
            "description": "Permission Denied - This operation requires an admin user.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    }
  },
  "security": [
    {
      "BasicAuth": []
    },
    {
      "ApiKeyAuth": []
    },
    {
      "BearerAuth": []
    }
  ],
  "components": {
    "securitySchemes": {
      "BasicAuth": {
        "type": "http",
        "scheme": "basic"
      },
      "ApiKeyAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "X-JFrog-Art-Api"
      },
      "BearerAuth": {
        "type": "http",
        "scheme": "bearer"
      }
    },
    "parameters": {
      "permissionTargetName": {
        "name": "permissionTargetName",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string"
        },
        "description": "The name of the permission target"
      }
    },
    "responses": {
      "UnauthorizedError": {
        "description": "Bad Credentials - The provided authentication is invalid.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            }
          }
        }
      },
      "InternalServerError": {
        "description": "Internal Server Error",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            }
          }
        }
      }
    },
    "schemas": {
      "ErrorResponse": {
        "type": "object",
        "properties": {
          "errors": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "status": {
                  "type": "integer",
                  "description": "HTTP status code"
                },
                "message": {
                  "type": "string",
                  "description": "Error message"
                }
              }
            }
          }
        }
      },
      "PermissionTarget": {
        "type": "object",
        "required": [
          "repositories"
        ],
        "properties": {
          "name": {
            "type": "string",
            "description": "The name of the permission target"
          },
          "includesPattern": {
            "type": "string",
            "description": "A regex pattern that defines which repositories to include in this permission. The default is '**' (all)."
          },
          "excludesPattern": {
            "type": "string",
            "description": "A regex pattern that defines which repositories to explicitly exclude from this permission. The default is '' (none)."
          },
          "repositories": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Defines the local and remote repositories included as resources for this permission. Note - Virtual repositories are not supported."
          },
          "principals": {
            "type": "object",
            "properties": {
              "users": {
                "type": "object",
                "additionalProperties": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "enum": [
                      "m",
                      "d",
                      "w",
                      "n",
                      "r",
                      "mxm",
                      "x"
                    ]
                  }
                },
                "description": "Permissions are set/returned according to the following conventions m=admin; d=delete; w=deploy; n=annotate; r=read; mxm=managedXrayMeta; x=distribute"
              },
              "groups": {
                "type": "object",
                "additionalProperties": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "enum": [
                      "m",
                      "d",
                      "w",
                      "n",
                      "r",
                      "mxm",
                      "x"
                    ]
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "x-readme": {
    "explorer-enabled": false
  }
}
```