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

# Promote

> Make a deployed deployment the active target for its slug.



## OpenAPI

````yaml /openapi.json post /api/v1/deploy/{deployment_id}/promote
openapi: 3.1.0
info:
  title: Trajectory API
  version: 0.1.0
servers:
  - url: https://api.trajectory.ai
security: []
paths:
  /api/v1/deploy/{deployment_id}/promote:
    post:
      tags:
        - deployments
      summary: Promote
      description: Make a deployed deployment the active target for its slug.
      operationId: promoteDeployment
      parameters:
        - name: deployment_id
          in: path
          required: true
          schema:
            type: string
            title: Deployment Id
      requestBody:
        content:
          application/json:
            schema:
              anyOf:
                - $ref: '#/components/schemas/PromoteRequest'
                - type: 'null'
              title: Body
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PromoteResponse'
        '404':
          description: >-
            The requested resource does not exist or is not visible to the
            caller.
          headers:
            X-Request-ID:
              $ref: '#/components/headers/RequestId'
            Trajectory-Should-Retry:
              $ref: '#/components/headers/TrajectoryShouldRetry'
            Retry-After:
              $ref: '#/components/headers/RetryAfter'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResourceNotFoundErrorResponse'
        '409':
          description: >-
            The operation conflicts with the current state or an idempotent
            request.
          headers:
            X-Request-ID:
              $ref: '#/components/headers/RequestId'
            Trajectory-Should-Retry:
              $ref: '#/components/headers/TrajectoryShouldRetry'
            Retry-After:
              $ref: '#/components/headers/RetryAfter'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConflictErrorResponse'
        default:
          $ref: '#/components/responses/ApiErrorResponse'
components:
  schemas:
    PromoteRequest:
      properties:
        demote_deployment_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Demote Deployment Id
          description: >-
            Deployment to stand down in the same write, for an atomic production
            swap.
      type: object
      title: PromoteRequest
    PromoteResponse:
      properties:
        deployment_id:
          type: string
          title: Deployment Id
        is_active:
          type: boolean
          title: Is Active
      type: object
      required:
        - deployment_id
        - is_active
      title: PromoteResponse
    ResourceNotFoundErrorResponse:
      properties:
        error:
          $ref: '#/components/schemas/ResourceNotFoundErrorBody'
      type: object
      required:
        - error
      title: ResourceNotFoundErrorResponse
    ConflictErrorResponse:
      properties:
        error:
          $ref: '#/components/schemas/ConflictErrorBody'
      type: object
      required:
        - error
      title: ConflictErrorResponse
    ResourceNotFoundErrorBody:
      properties:
        type:
          type: string
          const: invalid_request_error
          title: Type
        code:
          type: string
          const: resource_not_found
          title: Code
        message:
          type: string
          title: Message
        param:
          anyOf:
            - type: string
            - type: 'null'
          title: Param
        doc_url:
          type: string
          title: Doc Url
        context:
          $ref: '#/components/schemas/EmptyErrorContext'
      type: object
      required:
        - type
        - code
        - message
        - doc_url
        - context
      title: ResourceNotFoundErrorBody
    ConflictErrorBody:
      properties:
        type:
          type: string
          const: conflict_error
          title: Type
        code:
          type: string
          const: conflict
          title: Code
        message:
          type: string
          title: Message
        param:
          anyOf:
            - type: string
            - type: 'null'
          title: Param
        doc_url:
          type: string
          title: Doc Url
        context:
          $ref: '#/components/schemas/EmptyErrorContext'
      type: object
      required:
        - type
        - code
        - message
        - doc_url
        - context
      title: ConflictErrorBody
    ApiErrorEnvelope:
      properties:
        error:
          $ref: '#/components/schemas/ApiErrorBody'
      required:
        - error
      title: ApiErrorEnvelope
      type: object
    EmptyErrorContext:
      properties: {}
      additionalProperties: false
      type: object
      title: EmptyErrorContext
    ApiErrorBody:
      properties:
        type:
          $ref: '#/components/schemas/ErrorType'
        code:
          title: Code
          type: string
        message:
          type: string
          title: Message
        param:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          title: Param
        doc_url:
          type: string
          title: Doc Url
        context:
          additionalProperties: true
          title: Context
          type: object
      required:
        - type
        - code
        - message
        - doc_url
        - context
      title: ApiErrorBody
      type: object
    ErrorType:
      enum:
        - invalid_request_error
        - authentication_error
        - permission_error
        - conflict_error
        - rate_limit_error
        - dependency_error
        - api_error
      title: ErrorType
      type: string
  headers:
    RequestId:
      schema:
        type: string
    TrajectoryShouldRetry:
      schema:
        type: boolean
    RetryAfter:
      schema:
        type: string
  responses:
    ApiErrorResponse:
      description: >-
        Common API error. Possible codes: `authentication_required`,
        `permission_denied`, `validation_error`, `rate_limited`,
        `internal_error`, `service_unavailable`.
      headers:
        X-Request-ID:
          $ref: '#/components/headers/RequestId'
        Trajectory-Should-Retry:
          $ref: '#/components/headers/TrajectoryShouldRetry'
        Retry-After:
          $ref: '#/components/headers/RetryAfter'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiErrorEnvelope'

````