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

# Create or update subnet tags

> Create or update one or more tags for a subnet.
If a tag does not exist, it gets created.
If a tag already exists, its value is overwritten.

**Deprecated**: Use `PATCH /v1/subnets/{project_id}/{region_id}/{subnet_id}` instead.



## OpenAPI

````yaml /api-reference/services_docs_mintlify/cloud_api.yaml post /cloud/v1/subnets/{project_id}/{region_id}/{subnet_id}/metadata
openapi: 3.1.0
info:
  title: Gcore OpenAPI – Cloud API
  description: >-
    This OpenAPI is an aggregated OpenAPI specification that unifies all Gcore
    products into a single file. It covers Cloud, CDN, DNS, WAAP, DDoS
    Protection, Object Storage, Streaming, and FastEdge services.
  version: 2606518da447
servers:
  - url: https://api.gcore.com
security:
  - APIKey: []
tags:
  - name: Bare Metal
  - name: Container as a Service
  - name: Cost Reports
  - name: DDoS Protection
  - name: Everywhere Inference
  - name: Everywhere Inference Apps
  - name: File Shares
  - name: Floating IPs
  - name: Function as a Service
  - name: GPU Bare Metal
  - name: GPU Virtual
  - name: IP Ranges
  - name: Images
  - name: Instances
  - name: Load Balancers
  - name: Logging
  - name: Managed Kubernetes
  - name: Managed PostgreSQL
  - name: Networks
  - name: Placement Groups
  - name: Ports
  - name: Projects
  - name: Quotas
  - name: Regions
  - name: Registry
  - name: Reservations
  - name: Reserved IPs
  - name: Routers
  - name: SSH Keys
  - name: Secrets
  - name: Security Groups
  - name: Snapshot Schedules
  - name: Snapshots
  - name: Tasks
  - name: User Actions
  - name: User Role Assignments
  - name: Volumes
paths:
  /cloud/v1/subnets/{project_id}/{region_id}/{subnet_id}/metadata:
    post:
      tags:
        - Networks
      summary: Create or update subnet tags
      description: >-
        Create or update one or more tags for a subnet.

        If a tag does not exist, it gets created.

        If a tag already exists, its value is overwritten.


        **Deprecated**: Use `PATCH
        /v1/subnets/{project_id}/{region_id}/{subnet_id}` instead.
      operationId: SubnetMetadataHandler.post
      parameters:
        - in: path
          name: project_id
          required: true
          description: Project ID
          schema:
            description: Project ID
            example: 1
            examples:
              - 1
            title: Project Id
            type: integer
        - in: path
          name: region_id
          required: true
          description: Region ID
          schema:
            description: Region ID
            example: 1
            examples:
              - 1
            title: Region Id
            type: integer
        - in: path
          name: subnet_id
          required: true
          description: Subnet ID
          schema:
            description: Subnet ID
            example: b39792c3-3160-4356-912e-ba396c95cdcf
            examples:
              - b39792c3-3160-4356-912e-ba396c95cdcf
            format: uuid4
            title: Subnet Id
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateTagsSerializer'
      responses:
        '204':
          description: No Content
      deprecated: true
components:
  schemas:
    CreateTagsSerializer:
      description: >-
        A tag is a key-value pair that can be associated with a resource,

        enabling efficient filtering and grouping for better organization and
        management.

        Some tags are read-only and cannot be modified by the user.

        Tags are also integrated with cost reports, allowing cost data to be
        filtered based on tag keys or values.
      propertyNames:
        description: >-
          Tag key. Maximum 255 characters. Cannot contain spaces, tabs,
          newlines, empty string or '=' character. Trailing or leading
          whitespaces will be stripped.
        examples:
          - my-tag
        maxLength: 255
        minLength: 1
        pattern: ^[^\s=]+$
      title: CreateTagsSerializer
      type: object
      additionalProperties:
        description: >-
          Tag value. Maximum 255 characters. Cannot contain tabs, newlines, or
          empty strings. Trailing or leading whitespaces will be stripped.
        example: my-tag-value
        examples:
          - my-tag-value
        maxLength: 255
        minLength: 1
        pattern: ^[^ \t\n\r\f\v]([^\t\n\r\f\v]*[^ \t\n\r\f\v])?$
        type: string
  securitySchemes:
    APIKey:
      description: >-
        API key for authentication. Make sure to include the word `apikey`,
        followed by a single space and then your token.

        Example: `apikey 1234$abcdef`
      type: apiKey
      in: header
      name: Authorization

````