> ## 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.

# Projekt-Tags aktualisieren

> Fügt Tags eines Projekts hinzu, entfernt oder ersetzt sie. Eingehende Tags werden von umgebenden Leerzeichen bereinigt und in Kleinbuchstaben umgewandelt; leere Werte werden ignoriert und Duplikate vor der Aktualisierung entfernt.



## OpenAPI

````yaml /de/api-reference/openapi.json patch /projects/{project_id}/tags
openapi: 3.0.0
info:
  title: Corgea API
  version: 1.0.0
  description: >-
    API für die Interaktion mit den Scan- und
    Schwachstellenmanagement-Funktionen von Corgea
servers:
  - url: https://www.corgea.app/api/v1
    description: Produktionsserver
security:
  - CorgeaToken: []
  - BearerAuth: []
paths:
  /projects/{project_id}/tags:
    patch:
      tags:
        - Projekte
      summary: Projekt-Tags aktualisieren
      description: >-
        Fügt Tags eines Projekts hinzu, entfernt oder ersetzt sie. Eingehende
        Tags werden von umgebenden Leerzeichen bereinigt und in Kleinbuchstaben
        umgewandelt; leere Werte werden ignoriert und Duplikate vor der
        Aktualisierung entfernt.
      operationId: updateProjectTags
      parameters:
        - name: project_id
          in: path
          required: true
          schema:
            type: integer
          description: ID des zu aktualisierenden Projekts
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - operation
                - tags
              properties:
                operation:
                  type: string
                  enum:
                    - add
                    - remove
                    - replace
                  description: >-
                    Legt fest, wie die angegebenen Tags auf die aktuelle
                    Tag-Liste des Projekts angewendet werden
                tags:
                  type: array
                  items:
                    type: string
                  description: >-
                    Nach der Normalisierung hinzuzufügende, zu entfernende oder
                    zu ersetzende Tags
      responses:
        '200':
          description: Projekt-Tags erfolgreich aktualisiert
          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: >-
                          Dem Projekt zugeordnete Repository-URL, sofern
                          verfügbar
                      tags:
                        type: array
                        items:
                          type: string
                        description: Normalisierte Projekt-Tags nach der Aktualisierung
        '400':
          description: Ungültiger Request – Validierungsfehler
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: tags must be a list
              examples:
                invalid_json:
                  summary: Request-Body ist kein gültiges JSON
                  value:
                    error: Invalid JSON body
                invalid_operation:
                  summary: Operation wird nicht unterstützt
                  value:
                    error: 'operation must be one of: add, remove, replace'
                tags_not_list:
                  summary: Das Feld tags ist kein Array
                  value:
                    error: tags must be a list
                tag_not_string:
                  summary: Mindestens ein Tag ist kein String
                  value:
                    error: all tags must be strings
        '401':
          description: Ungültiges oder fehlendes Token
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: API key is missing
              examples:
                missing_token:
                  summary: API-Key-Header fehlt
                  value:
                    error: API key is missing
                invalid_token:
                  summary: API-Key ist ungültig
                  value:
                    error: Invalid API key
        '403':
          description: Zugriff verweigert
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: Permission denied
        '404':
          description: Projekt wird durch Project Access Control ausgeblendet
          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 für die Authentifizierung
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: OAuth2-Access-Token (JWT) im Authorization-Header

````