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

# Change an action status

> Moves an action through its lifecycle, as the member who created the API key; they must be a project member who can manage actions (403 otherwise, including for a key with no creator). Transitions come in pairs. accept moves a suggestion to accepted and unaccept returns it to the suggestions; unaccept is refused with not_reversible once the action has an owner, is in progress or blocked, has ever gone live or has a measurement, or has a brief, draft, edit, Library item, retest, prompt request added from another prompt, or dismissal note attached, whenever it was written, or was accepted before DevTune recorded that it came from a suggestion; an action someone created, such as a prompt action, is refused with invalid_transition; and a suggestion accepted as already covered by an existing page is not undone. archive takes a suggestion or accepted or live work off the queue; restore returns an archived suggestion to the suggestions, or archived work to the status it had, live work keeping its go-live date. Work archived while blocked returns to blocked, except work archived before DevTune kept that state, which returns to the status it had before it was blocked. block and unblock apply to accepted work; unblock returns it to the status it had before. mark_live moves accepted work to live and opens its before/after measurement in Results from now; publishedUrl, when given, is added to the pages the action already carries, which all stay. reopen moves live work back to accepted: its measurement, go-live date and published pages stay, and marking it live again continues the same measurement. accept, archive of a suggestion, restore of an archived suggestion and unaccept act on every suggestion merged into the named one. A high-stakes target page refuses accept with acknowledgment_required until acknowledgeHighStakes is true, which needs a human's confirmation; a locked page refuses it with page_locked. Repeating accept, unaccept, archive, block, unblock, reopen, or mark_live without a new page returns changed false and writes nothing; restore of an action that is not archived is refused with invalid_transition, because the status it would return to is not known. Any other refusal is a 409 whose reason is invalid_transition, superseded (a newer action for the same Agent Picks loss is open) or conflict (the action, its merged suggestions or its target page's protection changed during the request, or the merged suggestions cannot all move in one change; read the action and retry); nothing is written. Some suggestions archived before DevTune recorded which suggestions were archived together share their archive time with others and are always refused with conflict; they stay archived. The key, its creator's membership and their permission are checked again where the change is written, so access revoked mid-request is refused with 403. A change queues action.updated webhooks naming the API as the actor. Nothing is published to the customer's site.



## OpenAPI

````yaml /openapi.json post /projects/{projectId}/actions/{actionId}/status
openapi: 3.1.0
info:
  title: DevTune API
  version: 2.0.0
  description: >-
    API for programmatic access to your AI visibility data, webhook
    subscriptions, and automation workflows. Use this API to integrate DevTune
    data into CI/CD pipelines, BI tools, AI agents, and operational systems.
servers:
  - url: https://devtune.ai/api/v2
    description: Production
security:
  - bearerAuth: []
paths:
  /projects/{projectId}/actions/{actionId}/status:
    post:
      summary: Change an action status
      description: >-
        Moves an action through its lifecycle, as the member who created the API
        key; they must be a project member who can manage actions (403
        otherwise, including for a key with no creator). Transitions come in
        pairs. accept moves a suggestion to accepted and unaccept returns it to
        the suggestions; unaccept is refused with not_reversible once the action
        has an owner, is in progress or blocked, has ever gone live or has a
        measurement, or has a brief, draft, edit, Library item, retest, prompt
        request added from another prompt, or dismissal note attached, whenever
        it was written, or was accepted before DevTune recorded that it came
        from a suggestion; an action someone created, such as a prompt action,
        is refused with invalid_transition; and a suggestion accepted as already
        covered by an existing page is not undone. archive takes a suggestion or
        accepted or live work off the queue; restore returns an archived
        suggestion to the suggestions, or archived work to the status it had,
        live work keeping its go-live date. Work archived while blocked returns
        to blocked, except work archived before DevTune kept that state, which
        returns to the status it had before it was blocked. block and unblock
        apply to accepted work; unblock returns it to the status it had before.
        mark_live moves accepted work to live and opens its before/after
        measurement in Results from now; publishedUrl, when given, is added to
        the pages the action already carries, which all stay. reopen moves live
        work back to accepted: its measurement, go-live date and published pages
        stay, and marking it live again continues the same measurement. accept,
        archive of a suggestion, restore of an archived suggestion and unaccept
        act on every suggestion merged into the named one. A high-stakes target
        page refuses accept with acknowledgment_required until
        acknowledgeHighStakes is true, which needs a human's confirmation; a
        locked page refuses it with page_locked. Repeating accept, unaccept,
        archive, block, unblock, reopen, or mark_live without a new page returns
        changed false and writes nothing; restore of an action that is not
        archived is refused with invalid_transition, because the status it would
        return to is not known. Any other refusal is a 409 whose reason is
        invalid_transition, superseded (a newer action for the same Agent Picks
        loss is open) or conflict (the action, its merged suggestions or its
        target page's protection changed during the request, or the merged
        suggestions cannot all move in one change; read the action and retry);
        nothing is written. Some suggestions archived before DevTune recorded
        which suggestions were archived together share their archive time with
        others and are always refused with conflict; they stay archived. The
        key, its creator's membership and their permission are checked again
        where the change is written, so access revoked mid-request is refused
        with 403. A change queues action.updated webhooks naming the API as the
        actor. Nothing is published to the customer's site.
      operationId: changeActionStatus
      parameters:
        - name: projectId
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: actionId
          in: path
          required: true
          description: The action
          schema:
            type: string
            format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              additionalProperties: false
              required:
                - transition
              properties:
                transition:
                  type: string
                  enum:
                    - accept
                    - unaccept
                    - archive
                    - restore
                    - block
                    - unblock
                    - mark_live
                    - reopen
                acknowledgeHighStakes:
                  type: boolean
                  description: >-
                    Only with accept. Confirms a human approved changing a
                    high-stakes page.
                publishedUrl:
                  type: string
                  format: uri
                  maxLength: 2048
                  description: Only with mark_live. The http(s) page where the fix shipped.
      responses:
        '200':
          description: The transition receipt
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/ActionStatusReceipt'
                  meta:
                    $ref: '#/components/schemas/Meta'
                required:
                  - data
                  - meta
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        '404':
          $ref: '#/components/responses/NotFoundError'
        '409':
          $ref: '#/components/responses/ConflictError'
        '429':
          $ref: '#/components/responses/RateLimitExceededError'
components:
  schemas:
    ActionStatusReceipt:
      type: object
      additionalProperties: false
      required:
        - actionId
        - actionIds
        - blocked
        - changed
        - fromStatus
        - toStatus
        - transition
        - transitionedAt
      description: >-
        A receipt of the transition as it applied, not a current read of the
        action. Read the action's current state from the actions list.
      properties:
        actionId:
          type: string
          format: uuid
        actionIds:
          type: array
          minItems: 1
          maxItems: 40
          items:
            type: string
            format: uuid
          description: >-
            Every action the transition moved: the named one and any suggestions
            merged into it. Just the named action when nothing changed.
        blocked:
          type: boolean
          description: Whether the action is blocked after the transition.
        changed:
          type: boolean
          description: >-
            False when the action was already where the transition leads;
            nothing was written or announced.
        fromStatus:
          $ref: '#/components/schemas/PublicActionStatus'
        toStatus:
          $ref: '#/components/schemas/PublicActionStatus'
        transition:
          type: string
          enum:
            - accept
            - unaccept
            - archive
            - restore
            - block
            - unblock
            - mark_live
            - reopen
        transitionedAt:
          type:
            - string
            - 'null'
          format: date-time
          description: When the transition applied; null when nothing changed.
    Meta:
      type: object
      properties:
        timestamp:
          type: string
          format: date-time
        projectId:
          type: string
          format: uuid
    PublicActionStatus:
      type: string
      enum:
        - suggested
        - accepted
        - live
        - archived
      description: >-
        suggested: DevTune proposed it and nobody has decided. accepted: the
        team wants it done. live: the page is published and its measurement
        window is open. archived: taken off the queue by the team.
    Error:
      type: object
      properties:
        error:
          type: string
        message:
          type: string
        reason:
          type: string
          description: >-
            Why the request was refused, for an error with more than one cause,
            such as a refused content-draft start.
        status:
          type: integer
      required:
        - error
        - message
        - status
  responses:
    BadRequestError:
      description: Bad request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    UnauthorizedError:
      description: Unauthorized
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    ForbiddenError:
      description: Forbidden
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    NotFoundError:
      description: Not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    ConflictError:
      description: Request conflicts with current resource state
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    RateLimitExceededError:
      description: Rate limit exceeded
      headers:
        X-RateLimit-Limit:
          $ref: '#/components/headers/X-RateLimit-Limit'
        X-RateLimit-Remaining:
          $ref: '#/components/headers/X-RateLimit-Remaining'
        X-RateLimit-Reset:
          $ref: '#/components/headers/X-RateLimit-Reset'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  headers:
    X-RateLimit-Limit:
      description: Maximum requests per window
      schema:
        type: integer
    X-RateLimit-Remaining:
      description: Requests remaining in current window
      schema:
        type: integer
    X-RateLimit-Reset:
      description: Unix timestamp when the window resets
      schema:
        type: integer
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        API key with dtk_live_ prefix. Obtain it from API Keys in the account
        sidebar. New keys start with all supported scopes selected for the
        chosen project, and you can narrow them to specific read/write scopes as
        needed.

````

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