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

# Enable IPv6 on a vpc

> Assign an IPv6 range after creation. Existing ranges cannot be replaced.

<Info>
  Requires the IAM action **`network:UpdateVPC`**. See [NETWORK permissions](/networking/permissions) for the full list, what each one covers, and an example policy.
</Info>


## OpenAPI

````yaml /api-reference/specs/network.yaml post /v1/vpcs/{vpc_id}/ipv6
openapi: 3.0.3
info:
  title: Basaltic Network API
  version: 1.0.0
  description: |
    The VPC surface — networks and subnets, interfaces, route tables,
    security groups, internet, NAT and egress-only gateways, and floating
    IPs.

    Relationship inputs use one reference field: UUID, CRN, or an exact name
    when the request supplies its required parent scope. Subnets and route
    tables are VPC-scoped; interfaces are subnet-scoped. Nested CRNs use
    vpc/<vpc>/subnet/<subnet>, vpc/<vpc>/route-table/<table>, and
    vpc/<vpc>/subnet/<subnet>/interface/<interface>. Names are immutable.
    Unknown request fields and list parameters are rejected.
    Supplied empty references are invalid and failed lookups never fall back
    to another reference kind. Every list accepts exact name and crn filters.
  contact:
    name: Basaltic Support
    email: ping@basaltic.sh
  license:
    name: Proprietary
    url: https://basaltic.sh/terms
servers:
  - url: https://network.{region}.basaltic.sh
    description: Regional API endpoint
    variables:
      region:
        default: sa-saopaulo-1
        description: Region code
security:
  - BearerAuth: []
paths:
  /v1/vpcs/{vpc_id}/ipv6:
    post:
      tags:
        - Networking
      summary: Enable IPv6 on a vpc
      description: Assign an IPv6 range after creation. Existing ranges cannot be replaced.
      operationId: enableVPCIPv6
      parameters:
        - $ref: '#/components/parameters/VpcId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/VpcIPv6Request'
      responses:
        '200':
          description: IPv6 enabled
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VpcResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
        '500':
          $ref: '#/components/responses/InternalServerError'
      security:
        - BearerAuth: []
components:
  parameters:
    VpcId:
      name: vpc_id
      in: path
      description: VPC ID
      required: true
      schema:
        type: string
        format: uuid
      example: 550e8400-e29b-41d4-a716-446655440000
  schemas:
    VpcIPv6Request:
      type: object
      additionalProperties: false
      description: >-
        Provide allocate_cidr_ipv6 as true or a nonempty cidr_ipv6. Existing
        IPv6 ranges cannot be replaced.
      anyOf:
        - required:
            - allocate_cidr_ipv6
        - required:
            - cidr_ipv6
      properties:
        allocate_cidr_ipv6:
          type: boolean
          default: false
          description: >-
            Allocate a regional GUA /60. Mutually exclusive with cidr_ipv6.
            Existing IPv6 ranges cannot be replaced.
        cidr_ipv6:
          type: string
          description: >-
            Optional aligned locally assigned ULA (fd00::/8), /48 through /60.
            May be added after VPC creation.
    VpcResponse:
      type: object
      required:
        - vpc
      properties:
        vpc:
          $ref: '#/components/schemas/Vpc'
    Vpc:
      type: object
      required:
        - id
        - crn
        - name
        - cidr_ipv4
        - tags
        - created_at
        - updated_at
      properties:
        id:
          type: string
          format: uuid
          readOnly: true
        crn:
          type: string
          readOnly: true
          description: Cloud Resource Name (name-based, region+account-scoped).
          example: crn:network:sa-saopaulo-1:my-account:vpc/prod
        name:
          type: string
          description: >-
            1-63 chars, lowercase alphanumeric + hyphen Resource names must not
            start with the literal crn: prefix or be UUIDs (canonical, compact,
            braced, or urn:uuid: forms, in either case).
          example: prod
        description:
          type: string
          example: Production VPC for web and app tiers
        cidr_ipv4:
          type: string
          description: >-
            IPv4 CIDR block carved up by subnets. Must be private (RFC 1918):
            within 10.0.0.0/8, 172.16.0.0/12 or 192.168.0.0/16. Immutable after
            create.
          example: 10.0.0.0/16
        cidr_ipv6:
          type: string
          nullable: true
          readOnly: true
          description: Associated regional GUA or private ULA prefix.
          example: 2a13:9500:1a6:100::/60
        tags:
          type: object
          additionalProperties:
            type: string
        created_at:
          type: string
          format: date-time
          readOnly: true
        updated_at:
          type: string
          format: date-time
          readOnly: true
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
            - request_id
          properties:
            code:
              type: string
              description: Error code identifying the type of error
              example: INVALID_INPUT
            message:
              type: string
              description: Human-readable error message
              example: Invalid request parameters
            params:
              type: object
              additionalProperties: true
              description: >-
                Optional non-sensitive values for interpolation of localized
                errors, keyed by error code. Never present for server errors.
              example:
                instances: 2
                pools: 0
            request_id:
              type: string
              format: uuid
              description: Request ID for debugging
              example: 550e8400-e29b-41d4-a716-446655440000
  responses:
    BadRequest:
      description: Invalid request parameters
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: INVALID_INPUT
              message: Invalid request parameters
              request_id: 550e8400-e29b-41d4-a716-446655440000
    Unauthorized:
      description: Authentication required or token invalid
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: UNAUTHORIZED
              message: Authentication required
              request_id: 550e8400-e29b-41d4-a716-446655440000
    Forbidden:
      description: Insufficient permissions
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: ACCESS_DENIED
              message: You don't have permission to perform this action
              request_id: 550e8400-e29b-41d4-a716-446655440000
    NotFound:
      description: Resource not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: NOT_FOUND
              message: Resource not found
              request_id: 550e8400-e29b-41d4-a716-446655440000
    Conflict:
      description: Resource conflict (e.g., already exists, invalid state)
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: CONFLICT
              message: Resource with this name already exists
              request_id: 550e8400-e29b-41d4-a716-446655440000
    InternalServerError:
      description: Internal server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: INTERNAL_ERROR
              message: An internal error occurred
              request_id: 550e8400-e29b-41d4-a716-446655440000
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: |
        An OAuth 2.0 bearer token, sent as `Authorization: Bearer <token>`.
        This is the recommended way to authenticate.

        Get one by exchanging a service account's access key pair at
        `POST /v1/oauth/token` with `grant_type=client_credentials`. It is the
        standard client-credentials grant, so any OAuth-aware library will
        obtain and refresh it for you.

        ```
        curl -s -u "$KEY_ID:$SECRET" -d grant_type=client_credentials \
          https://iam.basaltic.sh/v1/oauth/token
        ```

        Tokens last an hour by default. The same access key pair is separately
        your AWS SigV4 credential for the S3-compatible object endpoint, which
        speaks nothing else.

````

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