> ## 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.

# Partially update a payload

> Updates only the provided scalars of a payload in place (the UUID is never re-minted). The FOV group is an atomic replace: restate fovShape to change any FOV param; a lone FOV param without fovShape is a 400. Returns a uniform 404 for any miss vector. A genuine change to this payload's offNadirAlongTrackDeg or offNadirCrossTrackDeg field auto-mints a new slew-envelope revision as a same-transaction side effect. A mint failure over frame/attitude interpretability still rolls back the entire PATCH, so the payload's scalar fields revert to their pre-PATCH persisted values; a mint refused only because the payload's own aperture is non-isotropic does NOT roll back — the scalar edit still commits, and the rejection surfaces later via the affected AOI opportunities' own off-nadir disclosure rather than in this response.



## OpenAPI

````yaml https://api.valar.space/api-docs/mintlify patch /operations/spacecraft/{spacecraftId}/payloads/{payloadId}
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>, select
    <b>Authorize</b> and enter your API key. The key is sent as a bearer token
    in the <code>Authorization</code> header.</li></ol>
  title: API Documentation
  version: 1.0.0
servers:
  - url: https://api.valar.space
    description: VALAR API Server
  - 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
  - description: >-
      Maneuver API 4.0.0: import and export spacecraft maneuvers using CCSDS
      OCM, and delete stored maneuvers.
    name: Maneuvers
paths:
  /operations/spacecraft/{spacecraftId}/payloads/{payloadId}:
    patch:
      tags:
        - Payloads
      summary: Partially update a payload
      description: >-
        Updates only the provided scalars of a payload in place (the UUID is
        never re-minted). The FOV group is an atomic replace: restate fovShape
        to change any FOV param; a lone FOV param without fovShape is a 400.
        Returns a uniform 404 for any miss vector. A genuine change to this
        payload's offNadirAlongTrackDeg or offNadirCrossTrackDeg field
        auto-mints a new slew-envelope revision as a same-transaction side
        effect. A mint failure over frame/attitude interpretability still rolls
        back the entire PATCH, so the payload's scalar fields revert to their
        pre-PATCH persisted values; a mint refused only because the payload's
        own aperture is non-isotropic does NOT roll back — the scalar edit still
        commits, and the rejection surfaces later via the affected AOI
        opportunities' own off-nadir disclosure rather than in this response.
      operationId: updateOperationsPayload
      parameters:
        - description: Parent spacecraft id
          in: path
          name: spacecraftId
          required: true
          schema:
            type: string
        - description: Payload id
          in: path
          name: payloadId
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdatePayloadRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PayloadResponse'
          description: Payload updated successfully
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Invalid request data
        '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: Payload not found
      security:
        - apiKeyAuth: []
components:
  schemas:
    UpdatePayloadRequest:
      type: object
      properties:
        boresight:
          type: string
          description: >-
            New body-frame boresight axis (X+, X-, Y+, Y-, Z+, Z-); omit to
            leave unchanged.
          example: Z+
          enum:
            - X+
            - X-
            - Y+
            - Y-
            - Z+
            - Z-
        focalLengthMm:
          type: number
          description: >-
            Optical focal length in millimetres (mm) — JsonNullable three-state
            (DT-8): omit to leave unchanged, send explicit `null` to clear, send
            a positive finite number to set. Independent of the FOV group.
          format: double
          nullable: true
        fovShape:
          type: string
          description: >-
            New FOV shape. Present ⇒ the whole FOV is replaced (set this shape's
            params, null all others). Absent ⇒ the FOV is left untouched (a lone
            FOV param is rejected).
          example: CONICAL
          enum:
            - CONICAL
            - RECTANGULAR
            - ELLIPTICAL
            - POLYGON
        halfAngleDeg:
          maximum: 90
          exclusiveMaximum: false
          minimum: 0
          exclusiveMinimum: true
          type: number
          description: >-
            Cone half-angle in degrees (CONICAL only). Range (0°, 90°]; 90°
            accepted.
          format: double
          example: 30
        halfHeightDeg:
          maximum: 90
          exclusiveMaximum: true
          minimum: 0
          exclusiveMinimum: true
          type: number
          description: >-
            FOV half-height in degrees (RECTANGULAR / ELLIPTICAL only). Range
            (0°, 90°) strict.
          format: double
          example: 20
        halfWidthDeg:
          maximum: 90
          exclusiveMaximum: true
          minimum: 0
          exclusiveMinimum: true
          type: number
          description: >-
            FOV half-width in degrees (RECTANGULAR / ELLIPTICAL only). Range
            (0°, 90°) strict.
          format: double
          example: 10
        name:
          maxLength: 100
          minLength: 0
          type: string
          description: New payload name; omit to leave unchanged.
          example: EO Camera
        offNadirAlongTrackDeg:
          type: number
          description: >-
            Payload off-nadir along-track slew limit in degrees — JsonNullable
            three-state (DT-8): omit to leave unchanged, send explicit `null` to
            clear, send a number in (0°, 90°] to set. Independent of the FOV
            group and of the optics fields.
          format: double
          nullable: true
        offNadirCrossTrackDeg:
          type: number
          description: >-
            Payload off-nadir cross-track slew limit in degrees — JsonNullable
            three-state (DT-8): omit to leave unchanged, send explicit `null` to
            clear, send a number in (0°, 90°] to set. Independent of the FOV
            group and of the optics fields.
          format: double
          nullable: true
        pixelPitchUm:
          type: number
          description: >-
            Detector pixel pitch in micrometres (µm) — JsonNullable three-state
            (DT-8): omit to leave unchanged, send explicit `null` to clear, send
            a positive finite number to set. Independent of the FOV group.
          format: double
          nullable: true
        positionX:
          type: number
          description: >-
            New mounting position X in metres (body frame); omit to leave
            unchanged.
          format: double
          example: 0.1
        positionY:
          type: number
          description: >-
            New mounting position Y in metres (body frame); omit to leave
            unchanged.
          format: double
          example: 0
        positionZ:
          type: number
          description: >-
            New mounting position Z in metres (body frame); omit to leave
            unchanged.
          format: double
          example: -0.2
        radiusDeg:
          maximum: 90
          exclusiveMaximum: true
          minimum: 0
          exclusiveMinimum: true
          type: number
          description: >-
            Polygon circumscribed (to-vertices) angular radius in degrees
            (POLYGON only). Range (0°, 90°) strict.
          format: double
          example: 30
        sides:
          maximum: 1000
          minimum: 3
          type: integer
          description: Number of polygon sides (POLYGON only). 3 ≤ N ≤ 1000.
          format: int32
          example: 6
      description: >-
        Partial payload update — every scalar independently optional; the FOV
        group is an atomic replace (restate fovShape to change any FOV param).
    PayloadResponse:
      type: object
      properties:
        boresight:
          type: string
          enum:
            - X+
            - X-
            - Y+
            - Y-
            - Z+
            - Z-
        focalLengthMm:
          type: number
          format: double
        fovShape:
          type: string
          enum:
            - CONICAL
            - RECTANGULAR
            - ELLIPTICAL
            - POLYGON
        halfAngleDeg:
          type: number
          format: double
        halfHeightDeg:
          type: number
          format: double
        halfWidthDeg:
          type: number
          format: double
        id:
          type: string
        name:
          type: string
        offNadirAlongTrackDeg:
          type: number
          format: double
        offNadirCrossTrackDeg:
          type: number
          format: double
        payloadIndex:
          type: integer
          format: int32
        pixelPitchUm:
          type: number
          format: double
        positionX:
          type: number
          format: double
        positionY:
          type: number
          format: double
        positionZ:
          type: number
          format: double
        radiusDeg:
          type: number
          format: double
        sides:
          type: integer
          format: int32
    ErrorResponse:
      type: object
      properties:
        code:
          type: string
          description: Stable frontend-dictionary error code
          nullable: true
          example: import.tracking.tdm.parse_failed
        correlationId:
          type: string
          description: Server-generated opaque identifier for support correlation
          nullable: true
          example: a1b2c3d4-e5f6-7890-abcd-ef1234567890
        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: The HTTP status reason phrase or exception-handler code
          example: Bad Request
        fieldErrors:
          type: object
          additionalProperties:
            type: string
            description: Field-level validation errors (field name to error message)
          description: Field-level validation errors (field name to error message)
        message:
          type: string
          description: Detailed error message
          example: Invalid spacecraft ID format
        params:
          type: object
          additionalProperties:
            type: string
            description: Per-key allowlisted structured params for frontend rendering
            nullable: true
          description: Per-key allowlisted structured params for frontend rendering
          nullable: true
        path:
          type: string
          description: The request path where the error occurred
          example: /api/v1/stm/credentials
        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'
      description: Standard API error response
    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)
  securitySchemes:
    apiKeyAuth:
      description: 'API Key (format: vsp_sk_...)'
      scheme: bearer
      type: http

````

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