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

# Set Organization IP Allowlist

> Replaces the addresses your organization accepts requests from.

⚠️ THIS IS THE CALL THAT CAN LOCK YOU OUT. Read `GET /v1/security/ip-allowlist` first, and keep your own address in the list.

`entries` is REQUIRED and replaces the stored list wholesale — there is no per-entry merge. Bare addresses are widened to host routes (`/32`, `/128`) and CIDRs are canonicalized on save, so what you read back may be spelled differently from what you sent. An explicit EMPTY list turns the allowlist OFF; omitting the member is a `400`, never a silent wipe.

Each entry is either a bare string (`"203.0.113.0/24"`) or a labeled object (`{"cidr": "203.0.113.0/24", "description": "São Paulo office"}`), and the two forms can be mixed. A string is stored with an empty description. Only `cidr` is validated and only `cidr` decides whether a request is allowed; `description` is free text for your administrators and is stored as sent. When the same network appears twice, the first entry — and its description — is kept.

`scopes` is the member to be careful with, because it has THREE meanings:
- OMIT it — the surfaces currently enforced are left exactly as they are.
- Send `[]` — enforcement is turned off on every surface, while the entries stay stored.
- Send values — enforcement applies to exactly those surfaces.

So an entries-only update must OMIT `scopes`.

Failures:
- `400 IDE-0036` — an entry is not a valid IP or CIDR, or a labeled entry has no `cidr`. The message names the offending value.
- `400` — a scope is not one this deployment enforces, or `entries` was omitted.
- `403` — as on the read: `AUT-1020`, a permissions problem, or `AUT-0021`, the lockout case.
- `503 IDE-0066` — the identity provider is unavailable (unreachable, too slow to answer, or failing). Nothing about the request was wrong; retry it later.



## OpenAPI

````yaml /en/openapi/v3-current/AM-identity.yaml put /v1/security/ip-allowlist
openapi: 3.1.0
info:
  contact:
    name: Lerian Studio
    url: https://lerian.studio
  description: OpenAPI 3.1 surface for the Access Manager identity component.
  license:
    name: Lerian Studio General License
  title: Plugin Access Manager — Identity API
  version: v1
servers:
  - url: https://identity.sandbox.lerian.net
security: []
tags:
  - description: >-
      M2M-only: each plugin declares its own permissions, roles and M2M
      contract, and the server reconciles them.
    name: Declarations
  - description: >-
      A tenant administrator's customers. Each partner holds what its
      credentials may DO (permissions, per product) and WHERE they may do it
      (scope, per product and dimension); an M2M application attached to one is
      confined to that intersection. Administrator-only: authorized on the
      "partners" resource, and every route resolves the owning organization from
      the caller's token.
    name: Partners
paths:
  /v1/security/ip-allowlist:
    put:
      tags:
        - Security
      summary: Set Organization IP Allowlist
      description: >-
        Replaces the addresses your organization accepts requests from.


        ⚠️ THIS IS THE CALL THAT CAN LOCK YOU OUT. Read `GET
        /v1/security/ip-allowlist` first, and keep your own address in the list.


        `entries` is REQUIRED and replaces the stored list wholesale — there is
        no per-entry merge. Bare addresses are widened to host routes (`/32`,
        `/128`) and CIDRs are canonicalized on save, so what you read back may
        be spelled differently from what you sent. An explicit EMPTY list turns
        the allowlist OFF; omitting the member is a `400`, never a silent wipe.


        Each entry is either a bare string (`"203.0.113.0/24"`) or a labeled
        object (`{"cidr": "203.0.113.0/24", "description": "São Paulo
        office"}`), and the two forms can be mixed. A string is stored with an
        empty description. Only `cidr` is validated and only `cidr` decides
        whether a request is allowed; `description` is free text for your
        administrators and is stored as sent. When the same network appears
        twice, the first entry — and its description — is kept.


        `scopes` is the member to be careful with, because it has THREE
        meanings:

        - OMIT it — the surfaces currently enforced are left exactly as they
        are.

        - Send `[]` — enforcement is turned off on every surface, while the
        entries stay stored.

        - Send values — enforcement applies to exactly those surfaces.


        So an entries-only update must OMIT `scopes`.


        Failures:

        - `400 IDE-0036` — an entry is not a valid IP or CIDR, or a labeled
        entry has no `cidr`. The message names the offending value.

        - `400` — a scope is not one this deployment enforces, or `entries` was
        omitted.

        - `403` — as on the read: `AUT-1020`, a permissions problem, or
        `AUT-0021`, the lockout case.

        - `503 IDE-0066` — the identity provider is unavailable (unreachable,
        too slow to answer, or failing). Nothing about the request was wrong;
        retry it later.
      operationId: setIPAllowlist
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/IPAllowlistInput'
              description: >-
                The allowlist to store. entries is required; omitting scopes
                leaves the enforcement surfaces unchanged.
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IPAllowlistResponse'
          description: OK
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPError'
          description: Bad Request
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPError'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPError'
          description: Forbidden
        '422':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Detail'
          description: Unprocessable Entity
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPError'
          description: Internal Server Error
        '503':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPError'
          description: Service Unavailable
      security:
        - BearerAuth: []
components:
  schemas:
    IPAllowlistInput:
      additionalProperties: false
      properties:
        entries:
          items:
            description: >-
              One allowlist entry: a bare IP address or CIDR block (the original
              form), or a labeled {cidr, description} object. A bare string is
              stored with an empty description.
            oneOf:
              - description: >-
                  An IP address or CIDR block. Bare addresses are widened to /32
                  or /128.
                examples:
                  - 203.0.113.0/24
                type: string
              - additionalProperties: false
                properties:
                  cidr:
                    description: >-
                      Required. An IP address or CIDR block. Bare addresses are
                      widened to /32 or /128. A missing, blank or malformed cidr
                      is refused with IDE-0036.
                    examples:
                      - 203.0.113.0/24
                    type: string
                  description:
                    description: >-
                      Free-text label shown to administrators, e.g. which office
                      or datacenter the network belongs to. Never influences an
                      access decision.
                    examples:
                      - São Paulo office
                    type: string
                type: object
          type: array
        scopes:
          examples:
            - - console
              - api
          items:
            type: string
          type:
            - array
            - 'null'
      required:
        - entries
      type: object
    IPAllowlistResponse:
      additionalProperties: false
      properties:
        entries:
          examples:
            - - 203.0.113.0/24
              - 198.51.100.7
          items:
            type: string
          type: array
        labeledEntries:
          description: >-
            The same allowlist as entries, in the same order and with the same
            CIDRs, each paired with the description an administrator gave it.
            The description is empty for an entry saved as a bare string or
            stored before descriptions existed. entries keeps its current shape
            and stays available; it will be retired later in favor of this
            member. The description is display text only and never influences an
            access decision.
          items:
            $ref: '#/components/schemas/IPAllowlistLabeledEntry'
          type: array
        scopes:
          examples:
            - - console
              - api
          items:
            type: string
          type: array
      required:
        - entries
        - scopes
        - labeledEntries
      type: object
    HTTPError:
      additionalProperties: false
      properties:
        code:
          type: string
        entityType:
          type: string
        err: {}
        message:
          type: string
        title:
          type: string
      type: object
    Detail:
      additionalProperties: true
      properties:
        code:
          description: >-
            Stable, machine-readable domain error code scoped to the emitting
            service (format: <SERVICE>-NNNN).
          type: string
        detail:
          description: >-
            A human-readable explanation specific to this occurrence of the
            problem.
          examples:
            - Property foo is required but is missing.
          type: string
        errors:
          description: Optional list of individual error details
          items:
            $ref: '#/components/schemas/ErrorDetail'
          type:
            - array
            - 'null'
        instance:
          description: >-
            A URI reference that identifies the specific occurrence of the
            problem.
          examples:
            - https://example.com/error-log/abc123
          format: uri
          type: string
        status:
          description: HTTP status code
          examples:
            - 400
          format: int64
          type: integer
        title:
          description: >-
            A short, human-readable summary of the problem type. This value
            should not change between occurrences of the error.
          examples:
            - Bad Request
          type: string
        type:
          default: about:blank
          description: A URI reference to human-readable documentation for the error.
          examples:
            - https://example.com/errors/example
          format: uri
          type: string
        upstream:
          $ref: '#/components/schemas/Upstream'
          description: >-
            RFC 9457 extension member: the error a proxied third-party provider
            reported. Absent unless the emitting service explicitly surfaced
            one.
      type: object
    IPAllowlistLabeledEntry:
      additionalProperties: false
      properties:
        cidr:
          description: Canonical CIDR block, exactly as listed in entries.
          examples:
            - 203.0.113.0/24
          type: string
        description:
          description: >-
            Free-text label shown to administrators; empty when none was given.
            Never influences an access decision.
          examples:
            - São Paulo office
          type: string
      required:
        - cidr
        - description
      type: object
    ErrorDetail:
      additionalProperties: false
      properties:
        location:
          description: >-
            Where the error occurred, e.g. 'body.items[3].tags' or
            'path.thing-id'
          type: string
        message:
          description: Error message text
          type: string
        value:
          description: The value at the given location
      type: object
    Upstream:
      additionalProperties: false
      properties:
        code:
          description: The upstream provider's own error code, verbatim.
          examples:
            - E4001
          type: string
        message:
          description: >-
            The upstream provider's own error message, verbatim (bounded, never
            its raw response body).
          examples:
            - account not found at provider
          type: string
      type: object
  securitySchemes:
    BearerAuth:
      bearerFormat: JWT
      description: JWT bearer token issued by the identity provider.
      scheme: bearer
      type: http

````

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