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

# Update a host

> Partial update - only the fields in the body change.



## OpenAPI

````yaml /0.17/openapi.json post /api/v1/hosts/{id}
openapi: 3.0.3
info:
  title: 2501 Public API
  version: v1
  description: >-
    The stable, versioned HTTP API for driving 2501 as code. See the API
    Overview for authentication, the org_id rule, cursor pagination, and the
    error envelope.
servers:
  - url: https://{command_center_host}
    variables:
      command_center_host:
        default: your-command-center-host
        description: Your Command Center host
security:
  - bearerAuth: []
paths:
  /api/v1/hosts/{id}:
    post:
      tags:
        - Hosts
      summary: Update a host
      description: Partial update - only the fields in the body change.
      parameters:
        - schema:
            type: string
          required: true
          name: id
          in: path
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  minLength: 1
                  maxLength: 255
                public_ip:
                  type: string
                  nullable: true
                private_ip:
                  type: string
                  nullable: true
                ip_connect_mode:
                  type: string
                  enum:
                    - auto
                    - public
                    - private
                additional_names:
                  type: array
                  items:
                    type: string
                    minLength: 1
                    maxLength: 255
                target_type:
                  type: string
                  enum:
                    - ssh
                    - winrm
                platform:
                  type: string
                  nullable: true
                  enum:
                    - unix
                    - windows
                    - fortigate
                    - nxos
                    - null
                target_port:
                  type: integer
                  nullable: true
                  minimum: 1
                  maximum: 65535
                skip_tls_verify:
                  type: boolean
                knowledge:
                  type: string
                  nullable: true
                tags:
                  type: array
                  items:
                    type: string
                satellite_cluster_id:
                  type: string
                  nullable: true
                placement:
                  type: object
                  nullable: true
                  description: >-
                    Where the executor runs in the host's satellite cluster, in
                    the shape that cluster's type reads. Requires
                    satellite_cluster_id.
                  anyOf:
                    - type: object
                      properties:
                        namespace:
                          type: string
                          minLength: 1
                          maxLength: 63
                          pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$
                        node_selector:
                          type: object
                          additionalProperties:
                            type: string
                        tolerations:
                          type: array
                          items:
                            type: object
                            properties:
                              key:
                                type: string
                                minLength: 1
                              value:
                                type: string
                                minLength: 1
                              operator:
                                type: string
                                enum:
                                  - Exists
                                  - Equal
                              effect:
                                type: string
                                enum:
                                  - NoSchedule
                                  - PreferNoSchedule
                                  - NoExecute
                              tolerationSeconds:
                                type: integer
                                minimum: -9007199254740991
                                maximum: 9007199254740991
                      additionalProperties: false
                    - type: object
                      properties:
                        constraints:
                          maxItems: 64
                          type: array
                          items:
                            type: string
                            maxLength: 256
                            description: >-
                              A Swarm constraint: node.id, node.hostname,
                              node.role, node.platform.os, node.platform.arch,
                              node.labels.<key> or engine.labels.<key>, then ==
                              or != and a value. For example
                              node.labels.zone==shared.
                      additionalProperties: false
                jump_host_ids:
                  type: array
                  items:
                    type: string
                  maxItems: 5
                is_jump_host:
                  type: boolean
                jump_host_username_credential_id:
                  type: string
                  nullable: true
                jump_host_secret_credential_id:
                  type: string
                  nullable: true
                eligible_subnets:
                  type: array
                  items:
                    type: string
                  maxItems: 64
      responses:
        '200':
          description: The updated host
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Host'
        '400':
          description: >-
            Bad request - a field is missing, malformed, or not allowed
            (VALIDATION_FAILED, BAD_REQUEST, INVALID_CURSOR)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: >-
            No credentials, or a key that is invalid, revoked, or expired
            (UNAUTHORIZED)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: >-
            Authenticated but not allowed (FORBIDDEN, ORG_ACCESS_DENIED,
            STEP_UP_REFUSED, TWO_FACTOR_ENROLLMENT_REQUIRED,
            LICENSE_CAP_REACHED, LICENSE_EXPIRED)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: No such row that this caller can see (NOT_FOUND)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    Host:
      type: object
      properties:
        id:
          type: string
          example: hst_8272f9b4-3c1e-4a2b-9f0d-1e2c3b4a5d6e
        name:
          type: string
          example: web-01
        org_id:
          type: string
          example: org_460b541c-...
        tenant_id:
          type: string
          example: ten_115bea44-...
        public_ip:
          type: string
          nullable: true
        private_ip:
          type: string
          nullable: true
          example: 10.0.4.12
        ip_connect_mode:
          type: string
          enum:
            - auto
            - public
            - private
        target_type:
          type: string
          enum:
            - ssh
            - winrm
        platform:
          type: string
          nullable: true
          enum:
            - unix
            - windows
            - fortigate
            - nxos
            - null
          description: Null until the first task detects it.
        target_port:
          type: integer
          nullable: true
        skip_tls_verify:
          type: boolean
        additional_names:
          type: array
          items:
            type: string
        tags:
          type: array
          items:
            type: string
          example:
            - os:linux
            - type:web
        knowledge:
          type: string
          nullable: true
        is_jump_host:
          type: boolean
        jump_host_ids:
          type: array
          items:
            type: string
        jump_host_username_credential_id:
          type: string
          nullable: true
        jump_host_secret_credential_id:
          type: string
          nullable: true
        eligible_subnets:
          type: array
          items:
            type: string
        unique_id:
          type: string
          nullable: true
        external_id:
          type: string
          nullable: true
        mac:
          type: string
          nullable: true
        enrichment_source:
          type: string
          nullable: true
        created_at:
          type: string
          format: date-time
          example: '2026-08-26T10:00:26.380Z'
        updated_at:
          type: string
          format: date-time
          example: '2026-08-26T10:00:26.380Z'
      required:
        - id
        - name
        - org_id
        - tenant_id
        - public_ip
        - private_ip
        - ip_connect_mode
        - target_type
        - platform
        - target_port
        - skip_tls_verify
        - additional_names
        - tags
        - knowledge
        - is_jump_host
        - jump_host_ids
        - jump_host_username_credential_id
        - jump_host_secret_credential_id
        - eligible_subnets
        - created_at
        - updated_at
    Error:
      type: object
      properties:
        code:
          type: string
          example: VALIDATION_FAILED
        message:
          type: string
          example: Validation failed
        request_id:
          type: string
          example: req_3702b7e7-...
        field:
          type: string
          description: Set when one input is at fault
        errors:
          type: array
          items:
            type: object
            properties:
              field:
                type: string
              message:
                type: string
            required:
              - field
              - message
          description: Set when several inputs are at fault
        details:
          type: object
          additionalProperties:
            nullable: true
      required:
        - code
        - message
        - request_id
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        An API key minted in Command Center (Settings -> API Keys), sent as
        `Authorization: Bearer 2501_ak_...`. A Command Center session cookie is
        also accepted.

````

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