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

# Write Joint Positions

> Move the robot's joints to the specified angles.



## OpenAPI

````yaml post /joints/write
openapi: 3.1.0
info:
  title: FastAPI
  version: 0.1.0
servers: []
security: []
paths:
  /joints/write:
    post:
      tags:
        - control
      summary: Write Joint Positions
      description: Move the robot's joints to the specified angles.
      operationId: write_joints_joints_write_post
      parameters:
        - in: query
          name: robot_id
          required: false
          schema:
            default: 0
            title: Robot Id
            type: integer
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/JointsWriteRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StatusResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
components:
  schemas:
    JointsWriteRequest:
      description: Request to set the joints of the robot.
      properties:
        angles:
          description: >-
            A list with the position of each joint. The length of the list must
            be equal to the number of joints. The unit is given by the 'unit'
            field.
          items:
            type: number
          title: Angles
          type: array
        joints_ids:
          anyOf:
            - items:
                type: integer
              type: array
            - type: 'null'
          description: >-
            If set, only set the joints with these ids. If None, set all
            joints.Example: 'angles'=[1,1,1], 'joints_ids'=[0,1,2] will set the
            first 3 joints to 1 radian.
          title: Joints Ids
        unit:
          default: rad
          description: The unit of the angles. Defaults to radian.
          enum:
            - rad
            - motor_units
            - degrees
          title: Unit
          type: string
      required:
        - angles
      title: JointsWriteRequest
      type: object
    StatusResponse:
      additionalProperties: true
      description: Default response. May contain other fields.
      properties:
        message:
          anyOf:
            - type: string
            - type: 'null'
          title: Message
        status:
          default: ok
          enum:
            - ok
            - error
          title: Status
          type: string
      title: StatusResponse
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          title: Location
          type: array
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
      type: object

````