> ## Documentation Index
> Fetch the complete documentation index at: https://docs.corgea.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Update Project Tags

> Add, remove, or replace tags for a project. Incoming tags are trimmed, lowercased, empty values are ignored, and duplicate values are removed before the update is applied.



## OpenAPI

````yaml /api-reference/openapi.json patch /projects/{project_id}/tags
openapi: 3.0.0
info:
  title: Corgea API
  version: 1.0.0
  description: >-
    API for interacting with Corgea's scanning and vulnerability management
    features
servers:
  - url: https://www.corgea.app/api/v1
    description: Production server
security:
  - CorgeaToken: []
  - BearerAuth: []
paths:
  /projects/{project_id}/tags:
    patch:
      tags:
        - Projects
      summary: Update Project Tags
      description: >-
        Add, remove, or replace tags for a project. Incoming tags are trimmed,
        lowercased, empty values are ignored, and duplicate values are removed
        before the update is applied.
      operationId: updateProjectTags
      parameters:
        - name: project_id
          in: path
          required: true
          schema:
            type: integer
          description: The ID of the project to update
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - operation
                - tags
              properties:
                operation:
                  type: string
                  enum:
                    - add
                    - remove
                    - replace
                  description: >-
                    How to apply the provided tags to the current project tag
                    list
                tags:
                  type: array
                  items:
                    type: string
                  description: Tags to add, remove, or replace after normalization
      responses:
        '200':
          description: Project tags updated successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    example: ok
                  project:
                    type: object
                    properties:
                      id:
                        type: integer
                      name:
                        type: string
                      repo_url:
                        type: string
                        nullable: true
                        description: >-
                          The repository URL associated with the project, when
                          available
                      tags:
                        type: array
                        items:
                          type: string
                        description: Normalized project tags after the update
        '400':
          description: Bad request - validation errors
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: tags must be a list
              examples:
                invalid_json:
                  summary: Request body is not valid JSON
                  value:
                    error: Invalid JSON body
                invalid_operation:
                  summary: Operation is not supported
                  value:
                    error: 'operation must be one of: add, remove, replace'
                tags_not_list:
                  summary: Tags field is not an array
                  value:
                    error: tags must be a list
                tag_not_string:
                  summary: One or more tags are not strings
                  value:
                    error: all tags must be strings
        '401':
          description: Invalid or missing token
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: API key is missing
              examples:
                missing_token:
                  summary: API key header is missing
                  value:
                    error: API key is missing
                invalid_token:
                  summary: API key is invalid
                  value:
                    error: Invalid API key
        '403':
          description: Permission denied
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: Permission denied
        '404':
          description: Project is hidden by Project Access Control
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    example: error
                  message:
                    type: string
                    example: Project doesn't exist
components:
  securitySchemes:
    CorgeaToken:
      type: apiKey
      in: header
      name: CORGEA-TOKEN
      description: API key for authentication
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: OAuth2 access token (JWT) in the Authorization header

````