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

# List this week's tasks — work in motion and work done

> The home's work rail, fully server-composed: /weekly_actions stays the decision deck (pending cards to act on), this endpoint carries everything those decisions set in motion plus everything already settled this week. One task per piece of work — a brief that morphed create → generating → ready_to_review is ONE row, its live phase winning. Each brief-backed task ships a `document` that answers brief-vs-article authoritatively, so clients never probe briefs per row to decide whether to show Publish. Task ids are weekly_action ids: dismiss and details reuse the weekly_actions member endpoints; retry rides the failed task's cta.



## OpenAPI

````yaml /api-reference/openapi.json get /api/v2/brands/{brand_id}/weekly_tasks
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}/weekly_tasks:
    parameters:
      - name: brand_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
    get:
      tags:
        - WeeklyTasks
      summary: List this week's tasks — work in motion and work done
      description: >-
        The home's work rail, fully server-composed: /weekly_actions stays the
        decision deck (pending cards to act on), this endpoint carries
        everything those decisions set in motion plus everything already settled
        this week. One task per piece of work — a brief that morphed create →
        generating → ready_to_review is ONE row, its live phase winning. Each
        brief-backed task ships a `document` that answers brief-vs-article
        authoritatively, so clients never probe briefs per row to decide whether
        to show Publish. Task ids are weekly_action ids: dismiss and details
        reuse the weekly_actions member endpoints; retry rides the failed task's
        cta.
      operationId: list_brand_weekly_tasks
      responses:
        '200':
          description: >-
            tasks sorted in_progress → failed → completed → snoozed → dismissed,
            newest first within each status
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/weekly_task'
                  meta:
                    type: object
                    properties:
                      week_start:
                        type: string
                        format: date
                      counts:
                        type: object
                        properties:
                          in_progress:
                            type: integer
                          failed:
                            type: integer
                          completed:
                            type: integer
                          snoozed:
                            type: integer
                          dismissed:
                            type: integer
                        required:
                          - in_progress
                          - failed
                          - completed
                          - snoozed
                          - dismissed
                      content_schedule:
                        type: object
                        description: >-
                          What the publish schedule has queued, for the rail's
                          schedule strip. Only FUTURE slots count — a passed
                          slot whose hourly cron has not run yet is a row on its
                          way out, not a promise. The 30-day horizon bounds the
                          COUNT only: a brand whose only slot is two months out
                          still reports next_publish_at.
                        properties:
                          next_publish_at:
                            type: string
                            format: date-time
                            nullable: true
                            description: >-
                              When the next scheduled publication goes out; null
                              when nothing is scheduled
                          next_title:
                            type: string
                            nullable: true
                            description: >-
                              That publication's title; null when nothing is
                              scheduled
                          scheduled_next_30_days:
                            type: integer
                            description: Upcoming slots within 30 days
                        required:
                          - next_publish_at
                          - next_title
                          - scheduled_next_30_days
                    required:
                      - week_start
                      - counts
                      - content_schedule
                required:
                  - data
                  - meta
        '403':
          description: >-
            organization access revoked (ORGANIZATION_ACCESS_REVOKED): the
            access token's organization is no longer one of the user's
            memberships (they left, were removed, or the organization was
            deleted). The session itself is still valid: drop the organization's
            client state and refresh the session, which moves it to another
            organization.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
        '404':
          description: brand not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
components:
  schemas:
    weekly_task:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: >-
            The underlying weekly action row — valid on the weekly_actions
            member endpoints (dismiss, details).
        action_type:
          type: string
          enum:
            - create_article
            - feed_leads
            - quota_remaining
            - ready_to_review
            - publish_changes
            - request_indexing
            - brief_waiting
            - generating
            - generation_failed
            - new_competitor_spotted
            - stale_published_article
            - watched_page_signal
            - entered_shortlist
            - first_citation
            - gap_widening
            - overtook_you
            - gap_closing
            - overtook_rival
            - gaining_on_rival
            - confirm_guidelines
            - add_audience
            - add_competitors
            - connect_feed
            - connect_gsc
            - monthly_review
            - auto_published
            - fix_audit_issue
            - rerun_audit
          description: >-
            The row's card type. In-progress/failed tasks are pipeline types
            (generating, ready_to_review, publish_changes, generation_failed);
            completed tasks can be any type the user (or the system) settled
            this week.
        status:
          type: string
          enum:
            - in_progress
            - failed
            - completed
            - snoozed
            - dismissed
          description: >-
            The rail's own axis, mapped server-side: in_progress = being written
            or written-but-unpublished; failed = generation retries ran dry (the
            cta carries the retry mutation); completed = settled this week
            (completed or auto_resolved); snoozed / dismissed = the user's Later
            / No calls on this week's cards (snoozed re-enters next week's deck,
            dismissed never returns). One to-do exception: an acknowledged
            connect_gsc reads in_progress until the Search Console integration
            actually exists — its cta.link is the connect destination. Never
            re-derive status from action_type.
        title:
          type: string
          description: >-
            Complete human-readable headline — same composition as the deck's
            cards; render verbatim.
        type_label:
          type: string
          description: The imperative chip/task label — verbatim.
        tone:
          type: string
          enum:
            - positive
            - negative
            - warning
            - info
            - neutral
          description: >-
            Same semantics as the deck's cards — map tones to your palette,
            never types to tones.
        document:
          allOf:
            - $ref: '#/components/schemas/weekly_task_document'
          nullable: true
          description: >-
            The task's brief/article, server-composed — null on tasks with no
            document (direct completions like "Got it", tracked competitors,
            added prompts).
        progress_pct:
          type: integer
          nullable: true
          description: >-
            Live generation progress (0–100). Only on in_progress tasks that are
            being written right now; null everywhere else.
        cta:
          allOf:
            - $ref: '#/components/schemas/brand_action_cta'
          description: >-
            Live rows carry the card's own cta. A completed row with a document
            carries the brief_detail deep_link onto the piece (never the
            production mutation again — a settled create_article does not offer
            create_article). Snoozed/dismissed rows carry exactly the restore
            mutation. When the row traces back to a prompt, a live row's cta
            also carries `link` as a prompt_detail deep_link with prompt_id +
            region_id, so the row can offer "Open prompt" beside its primary
            action; a link the generator already set is never overwritten.
        performed_at:
          type: string
          format: date-time
          nullable: true
          description: >-
            When the task last moved: the transition timestamp for settled rows,
            the deal time for still-running ones. Rows sort in_progress → failed
            → completed, newest first within each status — render as-is.
        week_start:
          type: string
          format: date
      required:
        - id
        - action_type
        - status
        - title
        - type_label
        - tone
        - document
        - progress_pct
        - cta
        - performed_at
        - week_start
    error:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              description: Stable machine-readable reason; see `error_code`.
            message:
              type: string
            details:
              type: array
              items:
                $ref: '#/components/schemas/error_detail'
          required:
            - code
            - message
      required:
        - error
    weekly_task_document:
      type: object
      properties:
        kind:
          type: string
          enum:
            - brief
            - article
          description: >-
            article the moment article generation starts (or the piece is
            published); brief while the work is still at the brief stage.
        brief_id:
          type: string
          format: uuid
        article_id:
          type: string
          format: uuid
          nullable: true
          description: >-
            Null while kind=brief, and briefly null on a just-started article
            generation (kind=article, row still writing).
        workflow_state:
          type: string
          enum:
            - new
            - brief_generating
            - brief_ready
            - article_generating
            - article_ready
            - failed
          description: The brief's pipeline state, verbatim.
        published:
          type: boolean
        published_url:
          type: string
          nullable: true
      required:
        - kind
        - brief_id
        - article_id
        - workflow_state
        - published
        - published_url
    brand_action_cta:
      oneOf:
        - $ref: '#/components/schemas/brand_action_cta_deep_link'
        - $ref: '#/components/schemas/brand_action_cta_mutation'
      discriminator:
        propertyName: kind
        mapping:
          deep_link: '#/components/schemas/brand_action_cta_deep_link'
          mutation: '#/components/schemas/brand_action_cta_mutation'
    error_detail:
      type: object
      properties:
        field:
          type: string
          nullable: true
        code:
          type: string
        message:
          type: string
      required:
        - code
        - message
        - field
    brand_action_cta_deep_link:
      type: object
      properties:
        kind:
          type: string
          enum:
            - deep_link
        to:
          type: string
          enum:
            - audiences
            - brand_guidelines
            - brief_detail
            - citations
            - competitors
            - connect_search_console
            - content_studio
            - feed_leads
            - feed_settings
            - integrations
            - prompt_detail
            - prompts
            - recommendations
            - reports
            - send_audit_fix
            - technical_audit
            - technical_audit_check
            - watchlist
          description: >-
            Where the card's action happens. Most targets are routes; two are
            surfaces the client opens in place — prompt_detail (the prompt
            panel) and connect_search_console (the Search Console connect
            dialog, so the setup nudge is finished on the card instead of three
            screens away). Params per target: brief_detail → brief_id (+
            optional document: brief|article — which editor tab to open;
            article-facing cards like ready_to_review send article);
            prompt_detail → prompt_id + region_id (the prompt's canonical region
            — the per-region detail route needs both, core#378); reports →
            report_id + period (the monthly_review card, whose report is listed
            on the reports surface); competitors → competitor_id; citations →
            url; technical_audit → domain_id (the audit page on that domain);
            technical_audit_check → domain_id + check_key (the audit page with
            that check opened — check_key access.ai_bots is the AI crawlers' one
            row, opened as the AI assistants panel); send_audit_fix → domain_id
            + check_key + check_keys (comma-separated checks the problem stands
            for) — the client opens the "Send to your dev team" dialog for them
            in place, and finishing it completes the card; others take none.
        params:
          type: object
          additionalProperties:
            type: string
            nullable: true
          description: Target-specific route params (string values)
        secondary:
          $ref: '#/components/schemas/brand_action_cta_secondary'
        snooze:
          allOf:
            - $ref: '#/components/schemas/brand_action_cta_mutation'
          nullable: true
          description: >-
            Always-present snooze affordance (POST
            weekly_actions/{action_id}/snooze — drops the card this week, it
            re-enters next week's set). Explicit on every card so schema-driven
            consumers (the MCP server included) can discover it instead of
            inferring it from the transition endpoints.
      required:
        - kind
        - to
    brand_action_cta_mutation:
      type: object
      properties:
        kind:
          type: string
          enum:
            - mutation
        name:
          type: string
          enum:
            - create_article
            - publish_changes
            - add_competitor
            - generate_article
            - regenerate_article
            - retry_generation
            - run_technical_audit
            - complete
            - dismiss
            - snooze
            - restore
          description: >-
            create_article → POST
            .../content_studio/recommendations/{params.recommendation_id}/create_draft
            (the ROUTE keeps the old name) — the brief chains straight into
            article generation and returns as a ready_to_review card;
            publish_changes → POST
            .../content_studio/articles/{params.article_id}/publish
            (re-publishing a live post refreshes its snapshot); add_competitor →
            POST /brands/{brand_id}/competitors with { name:
            params.competitor_name, domain: params.domain } (domain rides along
            when already known; optional on the endpoint); generate_article →
            POST .../content_studio/briefs/{params.brief_id}/generate_article;
            regenerate_article → POST
            .../content_studio/articles/{params.article_id}/regenerate;
            retry_generation → POST
            .../content_studio/briefs/{params.brief_id}/retry;
            run_technical_audit → POST /brands/{brand_id}/technical_audit {
            domain_id: params.domain_id, action_id: <this card's id> } (starts a
            run on the brand's main domain and completes the card in the same
            transaction — no separate complete call; uses the monthly audit
            quota — 409 AUDIT_RUNNING, 429 AUDIT_QUOTA_EXHAUSTED, the card left
            open on either); complete / dismiss / snooze / restore are the card
            transitions (POST weekly_actions/{action_id}/…) — a snoozed or
            dismissed row's cta is EXACTLY the restore mutation (the undo back
            onto the deck), nothing else. PRODUCTION mutations (create_article,
            generate_article, regenerate_article, retry_generation) start
            background work: their responses return the brief/article, and
            clients can show live progress via GET
            .../content_studio/briefs/{id}/progress (or the progress stream)
            until the result lands back on the feed as a ready_to_review card.
        params:
          type: object
          additionalProperties:
            type: string
            nullable: true
        link:
          allOf:
            - $ref: '#/components/schemas/brand_action_cta_deep_link'
          nullable: true
          description: >-
            Optional destination. NEVER present on the decision deck
            (weekly_actions) — deck cards are single-action (primary + dismiss +
            snooze) and the serializer strips it. It appears on /weekly_tasks
            rows only: live work rows carry the open-the-work link
            (publish_changes, generation_failed), completed info rows carry
            where-it-happened (the prompt, the citations, Content Studio).
        label_hint:
          type: string
          nullable: true
          description: >-
            Optional copy hint (e.g. not_a_competitor on the dismiss of
            new_competitor_spotted)
        secondary:
          $ref: '#/components/schemas/brand_action_cta_secondary'
        snooze:
          allOf:
            - $ref: '#/components/schemas/brand_action_cta_mutation'
          nullable: true
          description: >-
            Always-present snooze affordance (POST
            weekly_actions/{action_id}/snooze — drops the card this week, it
            re-enters next week's set). Explicit on every card so schema-driven
            consumers (the MCP server included) can discover it instead of
            inferring it from the transition endpoints.
      required:
        - kind
        - name
    brand_action_cta_secondary:
      nullable: true
      oneOf:
        - $ref: '#/components/schemas/brand_action_cta_deep_link'
        - $ref: '#/components/schemas/brand_action_cta_mutation'
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: X-API-KEY

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.