v1
Northflank docs for LLMs
API
CLI
JS Client

Team / Network Policies /

Create network policy

Creates a new network policy for this account.

Required permission

Account > Networking > NetworkPolicies > Create

Request body

  • {object}
    • name

      string required
      The name of the network policy.
      min length
      3
      max length
      39
      pattern
      ^[a-zA-Z]((-|\s)?[a-zA-Z0-9]+((-|\s)[a-zA-Z0-9]+)*)?$
    • description

      string
      The description of the network policy.
      max length
      200
      pattern
      ^[a-zA-Z0-9.,?\s\\/'"()[\];`%^&*\-_:!]+$
    • spec

      {object} required
API
CLI
JS Client

POST /v1/network-policies

POST /v1/teams/{teamId}/network-policies

Example request

Request body
curl --header "Content-Type: application/json" \
  --header "Authorization: Bearer NORTHFLANK_API_TOKEN" \
  --request POST \
  --data '{"name":"restrict-api-ingress","description":"Restrict ingress to the api service."}' \
  https://api.northflank.com/v1/network-policies

Example response

200 OK

success

© 2026 Northflank Ltd. All rights reserved.

northflank.com / Terms / Privacy / feedback@northflank.com