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

# Rename or re-describe — existing links keep their utm_campaign

> Requires a token with the `campaigns:write` permission.



## OpenAPI

````yaml /openapi.json patch /api/v1/campaigns/{id}
openapi: 3.0.0
info:
  description: >-
    Every request carries `Authorization: Bearer utmk_…`. The token fixes the
    workspace; no request names one. Every operation declares `x-permission`,
    the token permission it requires.
  title: UTM Builder API
  version: '1'
servers:
  - url: https://app.utmkit.co
    variables: {}
security:
  - bearer: []
tags: []
paths:
  /api/v1/campaigns/{id}:
    patch:
      tags:
        - campaigns
      summary: Rename or re-describe — existing links keep their utm_campaign
      description: Requires a token with the `campaigns:write` permission.
      operationId: UtmBuilderWeb.API.V1.CampaignController.update
      parameters:
        - description: ''
          in: path
          name: id
          required: true
          schema:
            type: integer
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CampaignUpdateInput'
        description: Campaign update input
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Campaign'
          description: Campaign
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Error
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Error
      callbacks: {}
components:
  schemas:
    CampaignUpdateInput:
      properties:
        description:
          nullable: true
          type: string
        name:
          type: string
      title: CampaignUpdateInput
      type: object
    Campaign:
      properties:
        created_at:
          format: date-time
          type: string
        description:
          nullable: true
          type: string
        id:
          type: integer
        link_count:
          type: integer
        name:
          type: string
      title: Campaign
      type: object
    Error:
      description: Every refusal. `code` is the closed set of FR-019.
      properties:
        error:
          properties:
            code:
              enum:
                - unauthenticated
                - subscription_required
                - subscription_ended
                - missing_permission
                - role_forbids
                - plan_forbids
                - rate_limited
                - governance_refused
                - scanner_refused
                - limit_reached
                - duplicate_link
                - not_found
                - invalid_input
              type: string
            details:
              additionalProperties: true
              description: field → messages, on invalid_input
              nullable: true
              type: object
            message:
              type: string
            permission:
              nullable: true
              type: string
            retry_after_seconds:
              nullable: true
              type: integer
          required:
            - code
            - message
          type: object
      required:
        - error
      title: Error
      type: object
  securitySchemes:
    bearer:
      description: utmk_<lookup><secret>, minted on /tokens
      scheme: bearer
      type: http

````