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

# Update a spacecraft lifecycle status

> Updates the lifecycle status (Active or Archived) of a spacecraft resolved strictly by id. Returns 404 if it does not exist.



## OpenAPI

````yaml https://api.valar.space/api-docs/mintlify put /operations/spacecraft/{id}/lifecycle
openapi: 3.0.1
info:
  contact:
    email: api@valar.space
    name: Valar Space
    url: https://valar.space
  description: >-
    <H4>Welcome to the documentation for the Valar Operations API, here are some
    quick tips if you just landed!</H4><ol><li> The top level elements are the
    <b>Resources</b> accessible via the API and the different queries used to
    interact with each resource via the appropriate HTTP method call.</li><li>
    You can expand each method to get further information on the expected input
    parameters and the different responses that can be received.</li><li>For
    both the input parameters and responses, an <b>Example</b> is present for
    clarification.</li><li>For further details, the example snipped can be
    switched to <b>Schema</b> view, where a detailed explanation of each element
    can be found.</li><li>The <b>Try it out</b> button can be used to call the
    API directly from the documentation page, which allows for some easy testing
    and also provides the equivalent 'curl' command line code for easy
    portability of the call execution.</li><li><b>Before starting</b>, remember
    to use the token endpoint and activate the token with the <b>Authorize</b>
    button.</li></ol>
  title: API Documentation
  version: 1.0.0
servers:
  - url: /
    description: Default Server URL
  - url: https://api.valar.space
    description: API Server
security:
  - apiKeyAuth: []
tags:
  - description: >-
      Operations for managing state vectors — listing, importing, exporting, and
      deleting spacecraft state data
    name: State Vectors
  - description: Register, list, read, update, and manage the lifecycle of your spacecraft.
    name: Spacecraft
  - description: Manage the thrusters mounted on a spacecraft.
    name: Thrusters
  - description: Manage the payloads (sensors) mounted on a spacecraft.
    name: Payloads
paths:
  /operations/spacecraft/{id}/lifecycle:
    put:
      tags:
        - Spacecraft
      summary: Update a spacecraft lifecycle status
      description: >-
        Updates the lifecycle status (Active or Archived) of a spacecraft
        resolved strictly by id. Returns 404 if it does not exist.
      operationId: updateOperationsSpacecraftLifecycle
      parameters:
        - description: Spacecraft identifier
          in: path
          name: id
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/LifecycleUpdateRequest'
        required: true
      responses:
        '200':
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SpacecraftResponse'
          description: Lifecycle status updated successfully
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Invalid lifecycle status value
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BearerTokenErrorResponse'
          description: Unauthorized - JWT token missing or invalid
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Forbidden - User lacks PERM_write:spacecraft permission
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Spacecraft not found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskDeletionConflictResponse'
          description: >-
            Archive gated on task-deletion confirmation — body carries the
            taskCount of scheduled tasks the archive would permanently delete
      security:
        - bearerAuth: []
components:
  schemas:
    LifecycleUpdateRequest:
      required:
        - lifecycleStatus
      type: object
      properties:
        confirmTaskDeletion:
          type: boolean
          description: >-
            Confirms permanent deletion of the craft's scheduled tasks when
            archiving. Required (true) only to archive a craft that has
            scheduled tasks; ignored on restore and for a craft with no tasks.
          nullable: true
          example: true
        lifecycleStatus:
          pattern: ^(Active|Archived)$
          type: string
          description: Lifecycle status (ONLY Active or Archived allowed)
          example: Archived
          enum:
            - Active
            - Archived
      description: Request payload for updating spacecraft lifecycle status
    SpacecraftResponse:
      type: object
      properties:
        absorption:
          type: number
          description: Optical absorption coefficient α (dimensionless). Range (0.0, 1.0].
          format: double
          example: 0.4
        bodyShape:
          type: string
          description: Body geometry primitive (BOX or REGULAR_PRISM).
          example: BOX
          enum:
            - BOX
            - REGULAR_PRISM
        boxX:
          type: number
          description: Spacecraft box/bus X dimension (width) in meters
          format: double
          example: 1.5
        boxY:
          type: number
          description: Spacecraft box/bus Y dimension (height) in meters
          format: double
          example: 1
        boxZ:
          type: number
          description: Spacecraft box/bus Z dimension (length) in meters
          format: double
          example: 2
        color:
          type: string
          description: Spacecraft color in hex format
          example: '#FF5733'
        cosparId:
          type: string
          description: COSPAR international designator
          example: 2024-001A
        createdAt:
          type: string
          description: Timestamp when the spacecraft was created
          format: date-time
        dragArea:
          type: number
          description: >-
            Operator-typed drag cross-sectional area in m² (null for
            pre-migration spacecraft)
          format: double
          example: 5
        dragCoefficient:
          type: number
          description: Drag coefficient
          format: double
          example: 2.2
        dryMass:
          type: number
          description: Mass without propellant in kg
          format: double
          example: 450
        id:
          type: string
          description: Unique identifier of the spacecraft
          example: 550e8400-e29b-41d4-a716-446655440000
        inertiaIxx:
          type: number
          description: >-
            Principal moment of inertia about the body's primary principal axis
            (kg·m²). Optional; null when inertia is not configured.
          format: double
          example: 1500
        inertiaIyy:
          type: number
          description: >-
            Principal moment of inertia about the body's secondary principal
            axis (kg·m²). Optional; null when inertia is not configured.
          format: double
          example: 1700
        inertiaIzz:
          type: number
          description: >-
            Principal moment of inertia about the body's tertiary principal axis
            (kg·m²). Optional; null when inertia is not configured.
          format: double
          example: 2100
        launchMass:
          type: number
          description: Total mass at launch in kg
          format: double
          example: 500
        lifecycleStatus:
          type: string
          description: Lifecycle status of the spacecraft
          example: Active
        name:
          type: string
          description: Name of the spacecraft
          example: Sentinel-1A
        noradId:
          type: integer
          description: NORAD catalog number
          format: int32
          example: 43013
        organizationId:
          type: string
          description: Organization ID that owns this spacecraft
          example: VALAR
        panels:
          type: array
          description: >-
            Per-panel rows (0..8). Each entry carries dimensions, attachment
            face, and orientation angles.
          items:
            $ref: '#/components/schemas/PanelResponse'
        prismAxis:
          type: string
          description: >-
            Extrusion axis of the regular prism (DKR-1 §3.4). Populated only
            when bodyShape=REGULAR_PRISM; null otherwise.
          example: Z
          enum:
            - X
            - 'Y'
            - Z
        prismComplementaryDiameter:
          type: number
          description: >-
            Cross-section diameter in the OTHER datum (the complement of
            prismDiameterMeasure), computed from edge + sides (DKR-1 §3.4).
            Populated only when bodyShape=REGULAR_PRISM; null otherwise.
          format: double
          example: 1
        prismDiameter:
          type: number
          description: >-
            Cross-section diameter in the operator's chosen datum
            (prismDiameterMeasure), computed from edge + sides (DKR-1 §3.4).
            Populated only when bodyShape=REGULAR_PRISM; null otherwise.
          format: double
          example: 0.866025
        prismDiameterMeasure:
          type: string
          description: >-
            Which diameter datum the operator used to size the cross-section
            (DKR-1 §3.4). Populated only when bodyShape=REGULAR_PRISM; null
            otherwise.
          example: INSCRIBED
          enum:
            - INSCRIBED
            - CIRCUMSCRIBED
        prismEdgeM:
          type: number
          description: >-
            Canonical regular-polygon edge length a in meters (DKR-1 §6) — the
            persisted source-of-truth cross-section dimension. Populated only
            when bodyShape=REGULAR_PRISM; null otherwise.
          format: double
          example: 0.5
        prismHeightM:
          type: number
          description: >-
            Regular-prism height L along the extrusion axis in meters. Populated
            only when bodyShape=REGULAR_PRISM; null otherwise.
          format: double
          example: 1
        prismSides:
          type: integer
          description: >-
            Number of regular-polygon sides N (DKR-1 §3.4). Populated only when
            bodyShape=REGULAR_PRISM; null otherwise.
          format: int32
          example: 6
        reflectivityCoefficient:
          type: number
          description: Reflectivity coefficient
          format: double
          example: 1
        specularReflection:
          type: number
          description: >-
            Optical specular-reflection coefficient ρs (dimensionless). Range
            [0.0, 1.0).
          format: double
          example: 0.3
        srpArea:
          type: number
          description: >-
            Operator-typed SRP cross-sectional area in m² (null for
            pre-migration spacecraft)
          format: double
          example: 5
        updatedAt:
          type: string
          description: Timestamp when the spacecraft was last updated
          format: date-time
      description: Response containing spacecraft details
    ErrorResponse:
      type: object
      properties:
        details:
          type: object
          additionalProperties:
            type: object
            description: Structured error details with scenario-specific context fields
            nullable: true
          description: Structured error details with scenario-specific context fields
          nullable: true
        error:
          type: string
          description: HTTP status reason phrase or error category
          example: Bad Request
        fieldErrors:
          type: object
          additionalProperties:
            type: string
            description: >-
              Per-field validation error messages, present only for validation
              errors
            nullable: true
          description: >-
            Per-field validation error messages, present only for validation
            errors
          nullable: true
        message:
          type: string
          description: Detailed error message
          example: Validation failed
        path:
          type: string
          description: The request path where the error occurred
          example: /measurements
        status:
          type: integer
          description: The HTTP status code
          format: int32
          example: 400
        timestamp:
          type: string
          description: The timestamp when the error occurred
          format: date-time
          example: '2025-11-14T10:15:30.123Z'
    BearerTokenErrorResponse:
      type: object
      properties:
        error:
          type: string
          description: OAuth 2.0 error code
          example: invalid_token
        error_description:
          type: string
          description: Human-readable error description
          example: An error occurred while attempting to decode the Jwt
      description: OAuth 2.0 Bearer Token error response (RFC 6750)
    TaskDeletionConflictResponse:
      type: object
      properties:
        taskCount:
          type: integer
          description: Number of scheduled tasks the archive would permanently delete
          format: int32
          example: 3
      description: 409 body gating an archive-with-tasks on task-deletion confirmation
    PanelResponse:
      type: object
      properties:
        absorption:
          type: number
          description: Per-panel optical absorption coefficient α (dimensionless).
          format: double
          example: 0.3
        derivedNormal:
          $ref: '#/components/schemas/DerivedNormal'
        doubleSided:
          type: boolean
          description: Whether the panel contributes drag / SRP area on both faces.
          example: true
        lengthM:
          type: number
          description: Plate length (along the panel's local L axis) in meters.
          format: double
          example: 2
        mountAxisCustomX:
          type: number
          description: >-
            X component of the custom mount-axis direction; null unless
            mountAxisPreset = CUSTOM.
          format: double
          example: 0
        mountAxisCustomY:
          type: number
          description: >-
            Y component of the custom mount-axis direction; null unless
            mountAxisPreset = CUSTOM.
          format: double
          example: 0
        mountAxisCustomZ:
          type: number
          description: >-
            Z component of the custom mount-axis direction; null unless
            mountAxisPreset = CUSTOM.
          format: double
          example: 5
        mountAxisPreset:
          type: string
          description: Body-frame mount axis the panel is oriented along.
          example: PLUS_Z
          enum:
            - PLUS_X
            - MINUS_X
            - PLUS_Y
            - MINUS_Y
            - PLUS_Z
            - MINUS_Z
            - CUSTOM
        mountPositionX:
          type: number
          description: Mount-point X coordinate in the spacecraft body frame (meters).
          format: double
          example: -1.5
        mountPositionY:
          type: number
          description: Mount-point Y coordinate in the spacecraft body frame (meters).
          format: double
          example: 0
        mountPositionZ:
          type: number
          description: Mount-point Z coordinate in the spacecraft body frame (meters).
          format: double
          example: 0.25
        name:
          type: string
          description: Operator-facing panel name.
          example: Port array
        panelIndex:
          type: integer
          description: Zero-based panel slot index within the spacecraft.
          format: int32
          example: 0
        rotationDeg:
          type: number
          description: Rotation about the mount axis (degrees). Range [0°, 360°).
          format: double
          example: 90
        specularReflection:
          type: number
          description: >-
            Per-panel optical specular-reflection coefficient ρs
            (dimensionless).
          format: double
          example: 0.2
        widthM:
          type: number
          description: Plate width (along the panel's local W axis) in meters.
          format: double
          example: 1
      description: >-
        One independent solar / radiator panel with its server-derived outward
        normal (DKR-1 §2 / §3.1).
    DerivedNormal:
      type: object
      properties:
        x:
          type: number
          description: Body-frame X component.
          format: double
          example: 1
        'y':
          type: number
          description: Body-frame Y component.
          format: double
          example: 0
        z:
          type: number
          description: Body-frame Z component.
          format: double
          example: 0
      description: A body-frame outward unit-normal triple {x, y, z}.
  securitySchemes:
    apiKeyAuth:
      description: 'API Key (format: vsp_sk_...)'
      scheme: bearer
      type: http

````