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

# Update Actions

> Rewrite the fields a customer owns, on actions they wrote or ones Peec generated. An edit is stored beside the generated wording rather than in it, so a regeneration cannot discard it. Only a customer's own action can change shape: the type and group of a generated one say what Peec found, and an item trying to move them lands in `rejected`. A field the item leaves out keeps what it held; `null` clears the ones that can be cleared, and an item naming no field at all is rejected rather than recorded as an edit. Ids the project publishes no action under are returned in `skipped` — the batch never fails as a whole. A content optimisation is reachable only on a project with content optimisation enabled; elsewhere its id is returned in `skipped`.



## OpenAPI

````yaml https://api.peec.ai/customer/v1/openapi/json post /actions/update
openapi: 3.0.3
info:
  title: Peec AI Customer API
  description: Development documentation
  version: 1.0.0
  contact:
    name: Peec AI Team
    email: support@peec.ai
servers:
  - url: https://api.peec.ai/customer/v1
security: []
paths:
  /actions/update:
    post:
      tags:
        - Actions
      summary: Update Actions
      description: >-
        Rewrite the fields a customer owns, on actions they wrote or ones Peec
        generated. An edit is stored beside the generated wording rather than in
        it, so a regeneration cannot discard it. Only a customer's own action
        can change shape: the type and group of a generated one say what Peec
        found, and an item trying to move them lands in `rejected`. A field the
        item leaves out keeps what it held; `null` clears the ones that can be
        cleared, and an item naming no field at all is rejected rather than
        recorded as an edit. Ids the project publishes no action under are
        returned in `skipped` — the batch never fails as a whole. A content
        optimisation is reachable only on a project with content optimisation
        enabled; elsewhere its id is returned in `skipped`.
      operationId: postActionsUpdate
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                project_id:
                  description: Required if using a company api key
                  example: or_f45b94ba-5e35-4982-93ed-285e72ee14eb
                  type: string
                actions:
                  minItems: 1
                  maxItems: 50
                  type: array
                  items:
                    type: object
                    properties:
                      action_id:
                        type: string
                        format: uuid
                        pattern: >-
                          ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                        description: The action to rewrite, from list_actions.
                        example: 01a0422f-e0c4-7820-85a1-31515a321f15
                      description:
                        description: >-
                          What the action is for. `html` is the formatting the
                          app's editor renders; `text` is what everything else
                          reads.
                        type: object
                        properties:
                          text:
                            type: string
                            maxLength: 10000
                          html:
                            type: string
                            maxLength: 10000
                        required:
                          - text
                      notes:
                        description: >-
                          Working notes kept beside the action. Null clears
                          them.
                        nullable: true
                        type: object
                        properties:
                          text:
                            type: string
                            maxLength: 10000
                          html:
                            type: string
                            maxLength: 10000
                        required:
                          - text
                      topic_id:
                        description: >-
                          Topic the action is scoped to, from the topics
                          endpoint. Null clears it.
                        example: to_a1b2c3
                        nullable: true
                        type: string
                        minLength: 1
                      prompt_ids:
                        description: >-
                          Prompts this action is meant to move, from the prompts
                          endpoint. Replaces the whole list.
                        example:
                          - pr_a1b2c3
                        maxItems: 100
                        type: array
                        items:
                          type: string
                      steps:
                        description: The work to do, replacing the whole step list.
                        maxItems: 100
                        type: array
                        items:
                          type: object
                          properties:
                            title:
                              type: string
                              minLength: 1
                              maxLength: 10000
                              description: What to do, as one line.
                              example: Add a pricing comparison table
                            description:
                              description: Detail below the step's own line.
                              type: string
                              maxLength: 10000
                            completed:
                              type: boolean
                            section:
                              description: >-
                                Heading this step sits under. Steps naming the
                                same one are grouped together, in the order they
                                first appear; steps naming none sit in the
                                default list above every group.
                              example: Before publishing
                              type: string
                              minLength: 1
                              maxLength: 80
                          required:
                            - title
                      priority:
                        description: >-
                          How much the action matters. It fills the same impact
                          bars a generated action fills from its predicted lift,
                          which is what lets the two sort together.
                        type: string
                        enum:
                          - none
                          - low
                          - medium
                          - high
                      country_codes:
                        description: >-
                          ISO 3166-1 alpha-2 markets the action is scoped to.
                          Null means every market the project tracks.
                        nullable: true
                        maxItems: 100
                        type: array
                        items:
                          type: string
                      language_codes:
                        nullable: true
                        maxItems: 100
                        type: array
                        items:
                          type: string
                      tag_ids:
                        maxItems: 100
                        type: array
                        items:
                          type: string
                      category:
                        nullable: true
                        type: string
                      assignee_user_id:
                        description: >-
                          The project member who owns the work. Null unassigns
                          it.
                        nullable: true
                        type: string
                      due_on:
                        description: >-
                          Calendar day in the project's timezone. Null clears
                          it.
                        example: '2026-10-31'
                        nullable: true
                        type: string
                        format: date
                        pattern: >-
                          ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$
                      repeat:
                        description: >-
                          How often the work comes round again. Null makes it
                          one-off.
                        nullable: true
                        type: object
                        properties:
                          every:
                            type: integer
                            minimum: 1
                            maximum: 12
                          unit:
                            type: string
                            enum:
                              - day
                              - week
                              - month
                              - year
                        required:
                          - every
                          - unit
                      time_range:
                        nullable: true
                        description: >-
                          The window the action's own measurements are read
                          over.
                        type: string
                        enum:
                          - 7d
                          - 28d
                          - 90d
                          - all
                      title:
                        type: string
                        minLength: 1
                        maxLength: 250
                      kind:
                        description: >-
                          What the work is. Only an action the customer wrote
                          can change shape — a generated one keeps the type and
                          group Peec found it under. One of:
                          `CONTENT_OPTIMIZATION` (Content optimization),
                          `CONTENT_CREATION` (Create content), `MENTION`
                          (Improve a mention), `TECHNICAL` (Fix a technical
                          issue), `PRODUCT_PAGE` (Improve a product page),
                          `OTHER` (Something else).
                        type: string
                        enum:
                          - CONTENT_OPTIMIZATION
                          - CONTENT_CREATION
                          - MENTION
                          - TECHNICAL
                          - PRODUCT_PAGE
                          - OTHER
                      page_url:
                        description: >-
                          The page the action lands on. Empty means it names no
                          page. On an owned-page kind this is also the page the
                          action is measured against.
                        type: string
                        maxLength: 2048
                    required:
                      - action_id
              required:
                - actions
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                project_id:
                  description: Required if using a company api key
                  example: or_f45b94ba-5e35-4982-93ed-285e72ee14eb
                  type: string
                actions:
                  minItems: 1
                  maxItems: 50
                  type: array
                  items:
                    type: object
                    properties:
                      action_id:
                        type: string
                        format: uuid
                        pattern: >-
                          ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                        description: The action to rewrite, from list_actions.
                        example: 01a0422f-e0c4-7820-85a1-31515a321f15
                      description:
                        description: >-
                          What the action is for. `html` is the formatting the
                          app's editor renders; `text` is what everything else
                          reads.
                        type: object
                        properties:
                          text:
                            type: string
                            maxLength: 10000
                          html:
                            type: string
                            maxLength: 10000
                        required:
                          - text
                      notes:
                        description: >-
                          Working notes kept beside the action. Null clears
                          them.
                        nullable: true
                        type: object
                        properties:
                          text:
                            type: string
                            maxLength: 10000
                          html:
                            type: string
                            maxLength: 10000
                        required:
                          - text
                      topic_id:
                        description: >-
                          Topic the action is scoped to, from the topics
                          endpoint. Null clears it.
                        example: to_a1b2c3
                        nullable: true
                        type: string
                        minLength: 1
                      prompt_ids:
                        description: >-
                          Prompts this action is meant to move, from the prompts
                          endpoint. Replaces the whole list.
                        example:
                          - pr_a1b2c3
                        maxItems: 100
                        type: array
                        items:
                          type: string
                      steps:
                        description: The work to do, replacing the whole step list.
                        maxItems: 100
                        type: array
                        items:
                          type: object
                          properties:
                            title:
                              type: string
                              minLength: 1
                              maxLength: 10000
                              description: What to do, as one line.
                              example: Add a pricing comparison table
                            description:
                              description: Detail below the step's own line.
                              type: string
                              maxLength: 10000
                            completed:
                              type: boolean
                            section:
                              description: >-
                                Heading this step sits under. Steps naming the
                                same one are grouped together, in the order they
                                first appear; steps naming none sit in the
                                default list above every group.
                              example: Before publishing
                              type: string
                              minLength: 1
                              maxLength: 80
                          required:
                            - title
                      priority:
                        description: >-
                          How much the action matters. It fills the same impact
                          bars a generated action fills from its predicted lift,
                          which is what lets the two sort together.
                        type: string
                        enum:
                          - none
                          - low
                          - medium
                          - high
                      country_codes:
                        description: >-
                          ISO 3166-1 alpha-2 markets the action is scoped to.
                          Null means every market the project tracks.
                        nullable: true
                        maxItems: 100
                        type: array
                        items:
                          type: string
                      language_codes:
                        nullable: true
                        maxItems: 100
                        type: array
                        items:
                          type: string
                      tag_ids:
                        maxItems: 100
                        type: array
                        items:
                          type: string
                      category:
                        nullable: true
                        type: string
                      assignee_user_id:
                        description: >-
                          The project member who owns the work. Null unassigns
                          it.
                        nullable: true
                        type: string
                      due_on:
                        description: >-
                          Calendar day in the project's timezone. Null clears
                          it.
                        example: '2026-10-31'
                        nullable: true
                        type: string
                        format: date
                        pattern: >-
                          ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$
                      repeat:
                        description: >-
                          How often the work comes round again. Null makes it
                          one-off.
                        nullable: true
                        type: object
                        properties:
                          every:
                            type: integer
                            minimum: 1
                            maximum: 12
                          unit:
                            type: string
                            enum:
                              - day
                              - week
                              - month
                              - year
                        required:
                          - every
                          - unit
                      time_range:
                        nullable: true
                        description: >-
                          The window the action's own measurements are read
                          over.
                        type: string
                        enum:
                          - 7d
                          - 28d
                          - 90d
                          - all
                      title:
                        type: string
                        minLength: 1
                        maxLength: 250
                      kind:
                        description: >-
                          What the work is. Only an action the customer wrote
                          can change shape — a generated one keeps the type and
                          group Peec found it under. One of:
                          `CONTENT_OPTIMIZATION` (Content optimization),
                          `CONTENT_CREATION` (Create content), `MENTION`
                          (Improve a mention), `TECHNICAL` (Fix a technical
                          issue), `PRODUCT_PAGE` (Improve a product page),
                          `OTHER` (Something else).
                        type: string
                        enum:
                          - CONTENT_OPTIMIZATION
                          - CONTENT_CREATION
                          - MENTION
                          - TECHNICAL
                          - PRODUCT_PAGE
                          - OTHER
                      page_url:
                        description: >-
                          The page the action lands on. Empty means it names no
                          page. On an owned-page kind this is also the page the
                          action is measured against.
                        type: string
                        maxLength: 2048
                    required:
                      - action_id
              required:
                - actions
          multipart/form-data:
            schema:
              type: object
              properties:
                project_id:
                  description: Required if using a company api key
                  example: or_f45b94ba-5e35-4982-93ed-285e72ee14eb
                  type: string
                actions:
                  minItems: 1
                  maxItems: 50
                  type: array
                  items:
                    type: object
                    properties:
                      action_id:
                        type: string
                        format: uuid
                        pattern: >-
                          ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                        description: The action to rewrite, from list_actions.
                        example: 01a0422f-e0c4-7820-85a1-31515a321f15
                      description:
                        description: >-
                          What the action is for. `html` is the formatting the
                          app's editor renders; `text` is what everything else
                          reads.
                        type: object
                        properties:
                          text:
                            type: string
                            maxLength: 10000
                          html:
                            type: string
                            maxLength: 10000
                        required:
                          - text
                      notes:
                        description: >-
                          Working notes kept beside the action. Null clears
                          them.
                        nullable: true
                        type: object
                        properties:
                          text:
                            type: string
                            maxLength: 10000
                          html:
                            type: string
                            maxLength: 10000
                        required:
                          - text
                      topic_id:
                        description: >-
                          Topic the action is scoped to, from the topics
                          endpoint. Null clears it.
                        example: to_a1b2c3
                        nullable: true
                        type: string
                        minLength: 1
                      prompt_ids:
                        description: >-
                          Prompts this action is meant to move, from the prompts
                          endpoint. Replaces the whole list.
                        example:
                          - pr_a1b2c3
                        maxItems: 100
                        type: array
                        items:
                          type: string
                      steps:
                        description: The work to do, replacing the whole step list.
                        maxItems: 100
                        type: array
                        items:
                          type: object
                          properties:
                            title:
                              type: string
                              minLength: 1
                              maxLength: 10000
                              description: What to do, as one line.
                              example: Add a pricing comparison table
                            description:
                              description: Detail below the step's own line.
                              type: string
                              maxLength: 10000
                            completed:
                              type: boolean
                            section:
                              description: >-
                                Heading this step sits under. Steps naming the
                                same one are grouped together, in the order they
                                first appear; steps naming none sit in the
                                default list above every group.
                              example: Before publishing
                              type: string
                              minLength: 1
                              maxLength: 80
                          required:
                            - title
                      priority:
                        description: >-
                          How much the action matters. It fills the same impact
                          bars a generated action fills from its predicted lift,
                          which is what lets the two sort together.
                        type: string
                        enum:
                          - none
                          - low
                          - medium
                          - high
                      country_codes:
                        description: >-
                          ISO 3166-1 alpha-2 markets the action is scoped to.
                          Null means every market the project tracks.
                        nullable: true
                        maxItems: 100
                        type: array
                        items:
                          type: string
                      language_codes:
                        nullable: true
                        maxItems: 100
                        type: array
                        items:
                          type: string
                      tag_ids:
                        maxItems: 100
                        type: array
                        items:
                          type: string
                      category:
                        nullable: true
                        type: string
                      assignee_user_id:
                        description: >-
                          The project member who owns the work. Null unassigns
                          it.
                        nullable: true
                        type: string
                      due_on:
                        description: >-
                          Calendar day in the project's timezone. Null clears
                          it.
                        example: '2026-10-31'
                        nullable: true
                        type: string
                        format: date
                        pattern: >-
                          ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$
                      repeat:
                        description: >-
                          How often the work comes round again. Null makes it
                          one-off.
                        nullable: true
                        type: object
                        properties:
                          every:
                            type: integer
                            minimum: 1
                            maximum: 12
                          unit:
                            type: string
                            enum:
                              - day
                              - week
                              - month
                              - year
                        required:
                          - every
                          - unit
                      time_range:
                        nullable: true
                        description: >-
                          The window the action's own measurements are read
                          over.
                        type: string
                        enum:
                          - 7d
                          - 28d
                          - 90d
                          - all
                      title:
                        type: string
                        minLength: 1
                        maxLength: 250
                      kind:
                        description: >-
                          What the work is. Only an action the customer wrote
                          can change shape — a generated one keeps the type and
                          group Peec found it under. One of:
                          `CONTENT_OPTIMIZATION` (Content optimization),
                          `CONTENT_CREATION` (Create content), `MENTION`
                          (Improve a mention), `TECHNICAL` (Fix a technical
                          issue), `PRODUCT_PAGE` (Improve a product page),
                          `OTHER` (Something else).
                        type: string
                        enum:
                          - CONTENT_OPTIMIZATION
                          - CONTENT_CREATION
                          - MENTION
                          - TECHNICAL
                          - PRODUCT_PAGE
                          - OTHER
                      page_url:
                        description: >-
                          The page the action lands on. Empty means it names no
                          page. On an owned-page kind this is also the page the
                          action is measured against.
                        type: string
                        maxLength: 2048
                    required:
                      - action_id
              required:
                - actions
      responses:
        '200':
          description: Per-item results
          content:
            application/json:
              schema:
                type: object
                properties:
                  updated:
                    type: array
                    items:
                      type: object
                      properties:
                        action_id:
                          type: string
                      required:
                        - action_id
                  skipped:
                    type: array
                    items:
                      type: object
                      properties:
                        action_id:
                          type: string
                        reason:
                          type: string
                          enum:
                            - not_found
                      required:
                        - action_id
                        - reason
                  rejected:
                    type: array
                    items:
                      type: object
                      properties:
                        action_id:
                          type: string
                        reason:
                          type: string
                          enum:
                            - duplicate_id
                            - no_change
                            - invalid
                        message:
                          type: string
                      required:
                        - action_id
                        - reason
                        - message
                required:
                  - updated
                  - skipped
                  - rejected
                description: Per-item results
      security:
        - APIKeyHeader: []
        - APIKeyQuery: []
        - BearerAuth: []
components:
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: X-API-Key
    APIKeyQuery:
      type: apiKey
      in: query
      name: api_key
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````