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

# Promote, merge or reject a candidate

> Promote (a new text or rule item) or merge (into an existing one)
writes into the pack's draft, started if needed; the draft then goes
through normal review. Reject needs a reason.



## OpenAPI

````yaml post /api/registry/context/candidates/{candidate_id}/decision
openapi: 3.1.0
info:
  title: Nx1 AI API
  description: |

    AI API for Nx1 Data Platform Management and Automated Data Tasks.

    Authentication is required via PSK in Authorization header.

    Default PSK is | [ask a friend] |
  version: 0.10.2
servers: []
security: []
paths:
  /api/registry/context/candidates/{candidate_id}/decision:
    post:
      tags:
        - Context packs
      summary: Promote, merge or reject a candidate
      description: |-
        Promote (a new text or rule item) or merge (into an existing one)
        writes into the pack's draft, started if needed; the draft then goes
        through normal review. Reject needs a reason.
      operationId: >-
        decide_candidate_api_registry_context_candidates__candidate_id__decision_post
      parameters:
        - name: candidate_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            description: The candidate's ID.
            title: Candidate Id
          description: The candidate's ID.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CandidateDecision'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CandidateDecisionResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Unprocessable Content
      security:
        - OAuth2AuthorizationCodeBearer: []
        - APIKeyHeader: []
components:
  schemas:
    CandidateDecision:
      properties:
        action:
          type: string
          enum:
            - promote
            - merge
            - reject
          title: Action
        as_type:
          type: string
          enum:
            - text
            - constraint
          title: As Type
          default: text
        title:
          anyOf:
            - type: string
              maxLength: 200
            - type: 'null'
          title: Title
        text:
          anyOf:
            - type: string
              maxLength: 8000
            - type: 'null'
          title: Text
          description: Edited wording; defaults to the proposal.
        item_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Item Id
          description: 'merge: the item to append to; promote: a new id.'
        reason:
          anyOf:
            - type: string
              maxLength: 2000
            - type: 'null'
          title: Reason
        accept_sensitivity:
          type: boolean
          title: Accept Sensitivity
          description: Accept a candidate that would raise the pack's sensitivity.
          default: false
      type: object
      required:
        - action
      title: CandidateDecision
      description: What a steward does with a candidate.
    CandidateDecisionResponse:
      properties:
        candidate:
          $ref: '#/components/schemas/CandidateView'
        draft_version_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Draft Version Id
        draft_version:
          anyOf:
            - type: string
            - type: 'null'
          title: Draft Version
      type: object
      required:
        - candidate
      title: CandidateDecisionResponse
      description: The decided candidate, and the draft version it went into.
    ErrorResponse:
      properties:
        error:
          type: string
          title: Error
          description: A brief description of the error that occurred.
        code:
          type: integer
          title: Code
          description: The HTTP status code associated with the error.
          default: 500
      type: object
      required:
        - error
      title: ErrorResponse
    CandidateView:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        pack_artifact_id:
          type: string
          format: uuid
          title: Pack Artifact Id
        text:
          type: string
          title: Text
        source:
          type: string
          title: Source
        evidence:
          additionalProperties: true
          type: object
          title: Evidence
        proposer:
          type: string
          title: Proposer
        status:
          type: string
          title: Status
        raises_sensitivity:
          type: boolean
          title: Raises Sensitivity
        duplicates:
          items:
            additionalProperties: true
            type: object
          type: array
          title: Duplicates
        decided_by:
          anyOf:
            - type: string
            - type: 'null'
          title: Decided By
        decided_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Decided At
        decision_reason:
          anyOf:
            - type: string
            - type: 'null'
          title: Decision Reason
        item_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Item Id
        created_at:
          type: string
          format: date-time
          title: Created At
      type: object
      required:
        - id
        - pack_artifact_id
        - text
        - source
        - evidence
        - proposer
        - status
        - raises_sensitivity
        - created_at
      title: CandidateView
      description: A proposed fact awaiting a steward.
  securitySchemes:
    OAuth2AuthorizationCodeBearer:
      type: oauth2
      flows:
        authorizationCode:
          scopes: {}
          authorizationUrl: >-
            https://sso-rapid.rapid.nx1cloud.com/realms/rapid/protocol/openid-connect/auth
          tokenUrl: >-
            https://sso-rapid.rapid.nx1cloud.com/realms/rapid/protocol/openid-connect/token
    APIKeyHeader:
      type: apiKey
      in: header
      name: Authorization-PSK

````

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