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

# Update network settings

> Changes a network's settings. What you can change depends on the network type: on a sub-network you can rename it, change its description, and adjust its operators; on a base network you can adjust the operators and whether its locations appear in anonymous charger searches — but not its name, which is derived from the roaming identity that owns it. When operators are removed from a base network, they're automatically removed from every slice of it too; newly added operators only flow into slices that have opted in to receive them.



## OpenAPI

````yaml /openapi/emsp-network/openapi.yaml patch /emsp/v1/networks/{network_id}
openapi: 3.0.0
info:
  title: Spirii EMSP - Network & Access Control API
  description: >-
    Manages network access and location visibility for secure multi-tenant
    operation.
  version: v1
  contact: {}
servers:
  - url: https://api.spirii.com
    description: Production
security:
  - OAuth2ClientCredentials: []
tags:
  - name: Networks
    description: Network lifecycle management
paths:
  /emsp/v1/networks/{network_id}:
    patch:
      tags:
        - Networks
      summary: Update network settings
      description: >-
        Changes a network's settings. What you can change depends on the network
        type: on a sub-network you can rename it, change its description, and
        adjust its operators; on a base network you can adjust the operators and
        whether its locations appear in anonymous charger searches — but not its
        name, which is derived from the roaming identity that owns it. When
        operators are removed from a base network, they're automatically removed
        from every slice of it too; newly added operators only flow into slices
        that have opted in to receive them.
      operationId: NetworkController_update_v1
      parameters:
        - name: Idempotency-Key
          in: header
          description: >-
            Client-generated unique key per operation intent (UUID). Same key +
            identical body replays the original response; same key + different
            body returns 409.
          required: true
          schema:
            type: string
            format: uuid
        - name: network_id
          required: true
          in: path
          description: The unique ID of the network to update.
          schema:
            type: string
            format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateNetworkDto'
      responses:
        '200':
          description: The updated network. Fires network.updated webhook.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NetworkResponse'
        '422':
          description: Validation error
components:
  schemas:
    UpdateNetworkDto:
      type: object
      properties:
        name:
          type: string
          maxLength: 255
        description:
          type: string
          maxLength: 1000
          nullable: true
        publicly_accessible:
          type: boolean
          description: >-
            Whether locations in this network are included in anonymous location
            discovery. Applies to BASE and SUB networks.
        cpo_ids:
          description: Operator IDs of CPOs belonging to this network. SUB networks only.
          type: array
          items:
            type: string
        countries:
          description: Countries covered. SUB networks only.
          type: array
          items:
            type: string
        power_types:
          description: Power types. SUB networks only.
          type: array
          items:
            type: string
        parking_types:
          description: Parking types. SUB networks only.
          type: array
          items:
            type: string
        facilities:
          description: Facilities. SUB networks only.
          type: array
          items:
            type: string
        auto_accept_cpo_additions:
          type: boolean
          description: >-
            When true, cpo_ids added to the parent BASE network are auto-added
            to this sub. SUB networks only.
    NetworkResponse:
      type: object
      properties:
        network_id:
          type: string
          format: uuid
          description: Network identifier.
        name:
          type: string
          description: >-
            BASE network name (auto-derived from the emp_identity and immutable)
            or the creator-set SUB network name.
        network_type:
          description: Network kind.
          allOf:
            - $ref: '#/components/schemas/NetworkType'
        published:
          type: boolean
          description: >-
            Whether a BASE network is currently published. Always false for SUB
            networks.
        publish_state:
          nullable: true
          description: Publish lifecycle state for BASE networks; null for SUB networks.
          allOf:
            - $ref: '#/components/schemas/PublishState'
        unpublish_started_at:
          type: string
          format: date-time
          nullable: true
          description: When the current unpublish (drain) was started, if any.
        unpublish_drain_until:
          type: string
          format: date-time
          nullable: true
          description: >-
            When the unpublish drain window ends, after which the network is
            fully unpublished.
        tenant_id:
          type: string
          format: uuid
          description: Owning tenant identifier.
        emp_identity_id:
          type: string
          format: uuid
          description: emp_identity the network belongs to.
        description:
          type: string
          nullable: true
          description: Free-text description.
        cpo_ids:
          description: Operator IDs (eMI3, e.g. `DK*SPI`) of the CPOs in this network.
          type: array
          items:
            type: string
        protocol:
          description: Roaming protocols carried by the network.
          type: array
          items:
            type: string
        roaming_hub:
          description: Roaming hubs the network is reachable through.
          type: array
          items:
            type: string
        publicly_accessible:
          type: boolean
          description: Whether the network is publicly accessible.
        parent_network_id:
          type: string
          format: uuid
          nullable: true
          description: Parent BASE network for a SUB network; null for BASE networks.
        countries:
          description: ISO 3166-1 country codes the network covers.
          type: array
          items:
            type: string
        power_types:
          description: Power types the network filters on.
          type: array
          items:
            type: string
        parking_types:
          description: Parking types the network filters on.
          type: array
          items:
            type: string
        facilities:
          description: Facilities the network filters on.
          type: array
          items:
            type: string
        auto_accept_cpo_additions:
          type: boolean
          description: Whether newly-available CPOs are auto-accepted into the network.
        created_at:
          type: string
          format: date-time
          description: Creation timestamp (UTC).
        updated_at:
          type: string
          format: date-time
          description: Last-update timestamp (UTC).
      required:
        - network_id
        - name
        - network_type
        - published
        - publish_state
        - unpublish_started_at
        - unpublish_drain_until
        - tenant_id
        - emp_identity_id
        - description
        - cpo_ids
        - protocol
        - roaming_hub
        - publicly_accessible
        - parent_network_id
        - countries
        - power_types
        - parking_types
        - facilities
        - auto_accept_cpo_additions
        - created_at
        - updated_at
    NetworkType:
      type: string
      enum:
        - BASE
        - SUB
      description: Network kind.
    PublishState:
      type: string
      enum:
        - PUBLISHED
        - UNPUBLISHED
        - UNPUBLISHING
      description: Publish lifecycle state for BASE networks; null for SUB networks.
  securitySchemes:
    OAuth2ClientCredentials:
      type: oauth2
      flows:
        clientCredentials:
          tokenUrl: /oauth/token
          scopes:
            emsp:networks:read: View network and access control configuration
            emsp:networks:write: Create/update/delete SUB networks, manage access rules
            emsp:networks:publish: Publish/drain networks (PATCH /networks/:id/publish-state)

````