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

# Update project safe mode ceiling

> Sets the most visible behaviour any number in this project may use. Send only the settings you want to change. Presence and read receipts are visible to the people these numbers message: turning them on makes a number appear online, exposes last seen subject to the account's privacy settings, and puts blue ticks on incoming messages. Raising a setting requires a plan that includes BanSafe Lite, and lowering one is always allowed. A signed-in caller must be an organization owner, admin, or developer.

Requires `sessions:manage`. Project tokens only access resources in their own project.



## OpenAPI

````yaml api-reference/features/operate.json PUT /platform/projects/{projectId}/safe-mode
openapi: 3.0.3
info:
  title: Operate API methods
  version: 1.0.0
  description: Task-focused operate methods across supported Polymorfa connection types.
servers: []
security: []
paths:
  /platform/projects/{projectId}/safe-mode:
    put:
      tags:
        - Bansafe
      summary: Update project safe mode ceiling
      description: >-
        Sets the most visible behaviour any number in this project may use. Send
        only the settings you want to change. Presence and read receipts are
        visible to the people these numbers message: turning them on makes a
        number appear online, exposes last seen subject to the account's privacy
        settings, and puts blue ticks on incoming messages. Raising a setting
        requires a plan that includes BanSafe Lite, and lowering one is always
        allowed. A signed-in caller must be an organization owner, admin, or
        developer.


        Requires `sessions:manage`. Project tokens only access resources in
        their own project.
      operationId: managementUpdateProjectSafeModeCeiling
      parameters:
        - schema:
            type: string
            format: uuid
          required: true
          name: projectId
          in: path
          description: |-
            Identifier of the Polymorfa project that owns this resource.

            <!-- polymorfa-input-table -->
            **Value constraints**
            | Constraint | Accepted input |
            | --- | --- |
            | Format | `uuid` |
      requestBody:
        required: false
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/management__UpdateProjectSafeModeInput'
      responses:
        '200':
          description: Success
          headers:
            X-Request-Id:
              schema:
                type: string
              description: Stable request correlation identifier.
            Polymorfa-Version:
              schema:
                type: string
              description: API version applied to this response.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: false
                properties:
                  data:
                    allOf:
                      - $ref: '#/components/schemas/management__ProjectSafeMode'
                    description: Structured data carried by this object.
                required:
                  - data
        '400':
          $ref: '#/components/responses/management__BadRequest'
        '401':
          $ref: '#/components/responses/management__Unauthorized'
        '402':
          $ref: '#/components/responses/management__PaymentRequired'
        '403':
          $ref: '#/components/responses/management__Forbidden'
        '404':
          $ref: '#/components/responses/management__NotFound'
        '503':
          $ref: '#/components/responses/management__PropagationPending'
      security:
        - management__ApiKeyAuth: []
      servers:
        - url: https://api.polymorfa.com
        - url: http://localhost:8080
          description: local dev
components:
  schemas:
    management__UpdateProjectSafeModeInput:
      type: object
      additionalProperties: false
      description: 'A partial update: send only the settings you want to change.'
      properties:
        presence:
          type: string
          enum:
            - dark
            - online_while_sending
            - online_hours
          description: >-
            Specifies presence for this management update project safe mode
            input.


            <!-- polymorfa-input-table -->

            **Allowed values**

            | Value | Meaning |

            | --- | --- |

            | `dark` | Dark. |

            | `online_while_sending` | Online while sending. |

            | `online_hours` | Online hours. |
        typing:
          type: string
          enum:
            - 'off'
            - before_text
            - before_all
          description: |-
            Specifies typing for this management update project safe mode input.

            <!-- polymorfa-input-table -->
            **Allowed values**
            | Value | Meaning |
            | --- | --- |
            | `off` | Off. |
            | `before_text` | Before text. |
            | `before_all` | Before all. |
        reads:
          type: string
          enum:
            - 'off'
            - replied_chats
            - all_inbound
          description: |-
            Specifies reads for this management update project safe mode input.

            <!-- polymorfa-input-table -->
            **Allowed values**
            | Value | Meaning |
            | --- | --- |
            | `off` | Off. |
            | `replied_chats` | Replied chats. |
            | `all_inbound` | All inbound. |
        pacing:
          type: string
          enum:
            - 'off'
            - jittered
            - conversation
          description: |-
            Specifies pacing for this management update project safe mode input.

            <!-- polymorfa-input-table -->
            **Allowed values**
            | Value | Meaning |
            | --- | --- |
            | `off` | Off. |
            | `jittered` | Jittered. |
            | `conversation` | Conversation. |
        onlineStart:
          type: integer
          minimum: 0
          maximum: 23
          description: >-
            Specifies online start for this management update project safe mode
            input.


            <!-- polymorfa-input-table -->

            **Value constraints**

            | Constraint | Accepted input |

            | --- | --- |

            | Numeric value | `0` through `23` (inclusive) |
        onlineEnd:
          type: integer
          minimum: 0
          maximum: 23
          description: >-
            Specifies online end for this management update project safe mode
            input.


            <!-- polymorfa-input-table -->

            **Value constraints**

            | Constraint | Accepted input |

            | --- | --- |

            | Numeric value | `0` through `23` (inclusive) |
    management__ProjectSafeMode:
      type: object
      additionalProperties: false
      properties:
        projectId:
          type: string
          format: uuid
          description: |-
            Identifier of the Polymorfa project that owns this resource.

            <!-- polymorfa-input-table -->
            **Value constraints**
            | Constraint | Accepted input |
            | --- | --- |
            | Format | `uuid` |
        ceiling:
          allOf:
            - $ref: '#/components/schemas/management__SafeModeSettings'
          description: Specifies ceiling for this management project safe mode.
        entitled:
          type: boolean
          description: >-
            Whether this project's plan includes BanSafe Lite, which Safe Mode
            is part of. When false, a request that raises a setting is refused.
        entitlementReason:
          type: string
          nullable: true
          description: >-
            Why a raise would be refused. Null when the plan includes BanSafe
            Lite.


            <!-- polymorfa-input-table -->

            **Accepted alternatives**

            | Alternative | Accepted input |

            | --- | --- |

            | Alternative 1 | Type: `string` |

            | Alternative 2 | `null` |
      required:
        - projectId
        - ceiling
        - entitled
        - entitlementReason
    management__SafeModeSettings:
      type: object
      additionalProperties: false
      properties:
        presence:
          type: string
          enum:
            - dark
            - online_while_sending
            - online_hours
          description: |-
            Specifies presence for this management safe mode setting.

            <!-- polymorfa-input-table -->
            **Allowed values**
            | Value | Meaning |
            | --- | --- |
            | `dark` | Dark. |
            | `online_while_sending` | Online while sending. |
            | `online_hours` | Online hours. |
        typing:
          type: string
          enum:
            - 'off'
            - before_text
            - before_all
          description: |-
            Specifies typing for this management safe mode setting.

            <!-- polymorfa-input-table -->
            **Allowed values**
            | Value | Meaning |
            | --- | --- |
            | `off` | Off. |
            | `before_text` | Before text. |
            | `before_all` | Before all. |
        reads:
          type: string
          enum:
            - 'off'
            - replied_chats
            - all_inbound
          description: |-
            Specifies reads for this management safe mode setting.

            <!-- polymorfa-input-table -->
            **Allowed values**
            | Value | Meaning |
            | --- | --- |
            | `off` | Off. |
            | `replied_chats` | Replied chats. |
            | `all_inbound` | All inbound. |
        pacing:
          type: string
          enum:
            - 'off'
            - jittered
            - conversation
          description: |-
            Specifies pacing for this management safe mode setting.

            <!-- polymorfa-input-table -->
            **Allowed values**
            | Value | Meaning |
            | --- | --- |
            | `off` | Off. |
            | `jittered` | Jittered. |
            | `conversation` | Conversation. |
        onlineStart:
          type: integer
          minimum: 0
          maximum: 23
          description: |-
            Specifies online start for this management safe mode setting.

            <!-- polymorfa-input-table -->
            **Value constraints**
            | Constraint | Accepted input |
            | --- | --- |
            | Numeric value | `0` through `23` (inclusive) |
        onlineEnd:
          type: integer
          minimum: 0
          maximum: 23
          description: |-
            Specifies online end for this management safe mode setting.

            <!-- polymorfa-input-table -->
            **Value constraints**
            | Constraint | Accepted input |
            | --- | --- |
            | Numeric value | `0` through `23` (inclusive) |
      required:
        - presence
        - typing
        - reads
        - pacing
        - onlineStart
        - onlineEnd
    management__ErrorEnvelope:
      type: object
      required:
        - error
        - data
        - docs
      properties:
        error:
          type: object
          required:
            - type
            - code
            - message
            - param
          properties:
            type:
              type: string
              enum:
                - invalid_request_error
                - authentication_error
                - permission_error
                - conflict_error
                - rate_limit_error
                - api_error
                - upstream_error
              description: |-
                Type discriminator for this object.

                <!-- polymorfa-input-table -->
                **Allowed values**
                | Value | Meaning |
                | --- | --- |
                | `invalid_request_error` | Invalid request error. |
                | `authentication_error` | Authentication error. |
                | `permission_error` | Permission error. |
                | `conflict_error` | Conflict error. |
                | `rate_limit_error` | Rate limit error. |
                | `api_error` | Api error. |
                | `upstream_error` | Upstream error. |
            code:
              type: string
              description: Stable failure code. Use this value for programmatic handling.
            message:
              type: string
              description: Safe explanation of the failure.
            param:
              type: string
              nullable: true
              description: |-
                Invalid request field, or null when no field applies.

                <!-- polymorfa-input-table -->
                **Accepted alternatives**
                | Alternative | Accepted input |
                | --- | --- |
                | Alternative 1 | Type: `string` |
                | Alternative 2 | `null` |
          description: Error details returned when the operation fails.
        data:
          type: string
          nullable: true
          enum:
            - null
          description: |-
            Always null for a failed request.

            <!-- polymorfa-input-table -->
            **Allowed values**
            | Value | Meaning |
            | --- | --- |
            | `null` | Null. |

            **Accepted alternatives**
            | Alternative | Accepted input |
            | --- | --- |
            | Alternative 1 | Type: `string` |
            | Alternative 2 | `null` |
        docs:
          type: string
          format: uri
          description: |-
            Documentation link to this failure code.

            <!-- polymorfa-input-table -->
            **Value constraints**
            | Constraint | Accepted input |
            | --- | --- |
            | Format | `uri` |
  responses:
    management__BadRequest:
      description: A path, query, or request-body value did not pass validation.
      headers:
        X-Request-Id:
          schema:
            type: string
          description: Stable request correlation identifier.
        Polymorfa-Version:
          schema:
            type: string
          description: API version applied to this response.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/management__ErrorEnvelope'
    management__Unauthorized:
      description: Missing/invalid credential for this audience.
      headers:
        X-Request-Id:
          schema:
            type: string
          description: Stable request correlation identifier.
        Polymorfa-Version:
          schema:
            type: string
          description: API version applied to this response.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/management__ErrorEnvelope'
    management__PaymentRequired:
      description: The number's plan does not include this capability.
      headers:
        X-Request-Id:
          schema:
            type: string
          description: Stable request correlation identifier.
        Polymorfa-Version:
          schema:
            type: string
          description: API version applied to this response.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/management__ErrorEnvelope'
    management__Forbidden:
      description: Authenticated but lacks the required scope/role/audience.
      headers:
        X-Request-Id:
          schema:
            type: string
          description: Stable request correlation identifier.
        Polymorfa-Version:
          schema:
            type: string
          description: API version applied to this response.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/management__ErrorEnvelope'
    management__NotFound:
      description: >-
        The requested resource was not found inside the authenticated
        organization or project scope.
      headers:
        X-Request-Id:
          schema:
            type: string
          description: Stable request correlation identifier.
        Polymorfa-Version:
          schema:
            type: string
          description: API version applied to this response.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/management__ErrorEnvelope'
    management__PropagationPending:
      description: >-
        The change was stored, but a connected number has not confirmed it.
        Retry the request; the stored setting is already correct and is retried
        automatically.
      headers:
        X-Request-Id:
          schema:
            type: string
          description: Stable request correlation identifier.
        Polymorfa-Version:
          schema:
            type: string
          description: API version applied to this response.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/management__ErrorEnvelope'
  securitySchemes:
    management__ApiKeyAuth:
      type: http
      scheme: bearer
      description: >-
        Polymorfa server credential: a scoped pmfa_ organization key, or a
        pmfa_pt_ project token on project- and session-bound operations inside
        its exact authenticated project. Keys may be personal or service-account
        owned. Both enforce selected action scopes; organization keys can
        address team resources and every project in the organization. Listener
        and browser client credentials are rejected.

````