---
title: "Create Network Protocol"
url: "https://public-api-docs.cipherscale.com/apis/cipherscale-api-1/versions/fef69080-6094-4620-8bf0-16fd2de7b598/operations/ProtocolController_create"
---

> Full API specification: https://public-api-docs.cipherscale.com/apis/cipherscale-api-1/versions/fef69080-6094-4620-8bf0-16fd2de7b598.md

# Create Network Protocol

`POST` `/tenants/protocols`

Operation ID: `ProtocolController_create`

Creates a new network protocol definition that specifies allowed network protocols (TCP, UDP, ICMP) and ports for network access control.

## Request body (required)

Content types: `application/json`

## Responses

- `201` - Successfully created the protocol
- `401` - Unauthorized - Invalid or missing authentication token
- `403` - Forbidden - Insufficient permissions to perform this operation.

## OpenAPI definition

```yaml
openapi: 3.0.0
info:
  title: Cipherscale API
  version: "1.0"
servers:
  - url: https://public-api.cipherscale.com/qa
    description: Cipherscale Public API Server
paths:
  /tenants/protocols:
    post:
      operationId: ProtocolController_create
      summary: Create Network Protocol
      description: Creates a new network protocol definition that specifies allowed
        network protocols (TCP, UDP, ICMP) and ports for network access control.
      requestBody:
        required: true
        description: The protocol data to create
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateProtocolDto"
      responses:
        "201":
          description: Successfully created the protocol
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ProtocolDto"
        "401":
          description: Unauthorized - Invalid or missing authentication token
        "403":
          description: Forbidden - Insufficient permissions to perform this operation.
      tags:
        - Protocols
      security:
        - ApiKeyAuth: []
security:
  - ApiKeyAuth: []
components:
  schemas:
    CreateProtocolDto:
      type: object
      properties:
        name:
          type: string
        networkProtocols:
          type: array
          items:
            $ref: "#/components/schemas/NetworkProtocolDto"
      required:
        - networkProtocols
    ProtocolDto:
      type: object
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
        networkProtocols:
          type: array
          items:
            $ref: "#/components/schemas/NetworkProtocolDto"
        type:
          enum:
            - ALL
            - PREDEFINED
            - CUSTOM
          type: string
      required:
        - id
        - name
        - networkProtocols
        - type
    NetworkProtocolDto:
      type: object
      properties:
        protocol:
          type: string
          enum:
            - TCP
            - UDP
            - ICMP
        port:
          type: string
      required:
        - protocol
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: apikey
```
