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

# Update an article's content



## OpenAPI

````yaml /api-reference/openapi.json put /api/v2/brands/{brand_id}/content_studio/articles/{id}
openapi: 3.0.1
info:
  title: Cognizo Public API
  version: v1
  description: >-
    Public REST API for Cognizo. Authenticate with an API key via the
    `X-API-KEY` header.
servers:
  - url: https://core.cognizo.ai
security:
  - apiKey: []
paths:
  /api/v2/brands/{brand_id}/content_studio/articles/{id}:
    parameters:
      - name: brand_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
    put:
      tags:
        - ContentStudio
      summary: Update an article's content
      operationId: update_brand_content_studio_article
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                content:
                  type: string
                expected_updated_at:
                  type: string
                  format: date-time
                  nullable: true
                  description: >-
                    Optimistic concurrency (#730): send the updated_at you last
                    saw; a mismatch returns 409 VERSION_CONFLICT — refetch and
                    reapply.
              required:
                - content
      responses:
        '200':
          description: saved
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/content_studio_article'
                required:
                  - data
        '404':
          description: article not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
        '409':
          description: >-
            editing locked (mid-generation) or stale expected_updated_at
            (VERSION_CONFLICT)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
        '500':
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
components:
  schemas:
    content_studio_article:
      type: object
      properties:
        id:
          type: string
          format: uuid
        content_brief_id:
          type: string
          format: uuid
        content:
          type: string
          nullable: true
          description: Final markdown; null while generating
        rewrite_source:
          type: object
          nullable: true
          description: >-
            Rewrite-mode articles only: the original page being replaced, for
            old-vs-new diff rendering. Populated on GET/PUT; null on
            progress/202 stubs and create-mode articles.
          properties:
            url:
              type: string
            title:
              type: string
              nullable: true
            body_text:
              type: string
              nullable: true
              description: Plain extracted text of the original page (not markdown)
          required:
            - url
        word_count:
          type: integer
          nullable: true
        ai_model:
          type: string
          nullable: true
        generation_duration_ms:
          type: integer
          nullable: true
        metadata:
          type: object
          additionalProperties: true
        state:
          type: string
          enum:
            - new
            - article_generating
            - article_ready
            - failed
        progress_pct:
          type: integer
        generation_error:
          type: string
          nullable: true
        generated_at:
          type: string
          format: date-time
          nullable: true
        created_at:
          type: string
          format: date-time
          nullable: true
        updated_at:
          type: string
          format: date-time
          nullable: true
        deleted_at:
          type: string
          format: date-time
          nullable: true
      required:
        - id
        - content_brief_id
        - state
        - progress_pct
        - metadata
    error:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
            message:
              type: string
            details:
              type: array
              items:
                $ref: '#/components/schemas/error_detail'
          required:
            - code
            - message
      required:
        - error
    error_detail:
      type: object
      properties:
        field:
          type: string
          nullable: true
        code:
          type: string
        message:
          type: string
      required:
        - code
        - message
        - field
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: X-API-KEY

````