> ## 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

> **Required scope:** `sessions:manage`

Sets the most visible behaviour any number in this project may use. Presence and read receipts are visible to the people this number messages: turning them on makes the number appear online, exposes last-seen subject to the account's privacy settings, and puts blue ticks on incoming messages. Every axis is off by default and only this request changes it.



## OpenAPI

````yaml api-reference/features/operate.json PUT /messaging/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:
  /messaging/projects/{projectId}/safe-mode:
    put:
      tags:
        - Safe Mode
      summary: Update project safe mode
      description: >-
        **Required scope:** `sessions:manage`


        Sets the most visible behaviour any number in this project may use.
        Presence and read receipts are visible to the people this number
        messages: turning them on makes the number appear online, exposes
        last-seen subject to the account's privacy settings, and puts blue ticks
        on incoming messages. Every axis is off by default and only this request
        changes it.
      operationId: nativeUpdateProjectSafeMode
      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:
        content:
          application/json:
            schema:
              type: object
              properties:
                presence:
                  type: string
                  enum:
                    - dark
                    - online_while_sending
                    - online_hours
                  description: |-
                    Specifies presence for this schema.

                    <!-- 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 schema.

                    <!-- 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 schema.

                    <!-- 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 schema.

                    <!-- 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 schema.

                    <!-- 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 schema.

                    <!-- polymorfa-input-table -->
                    **Value constraints**
                    | Constraint | Accepted input |
                    | --- | --- |
                    | Numeric value | `0` through `23` (inclusive) |
              additionalProperties: false
      responses:
        '200':
          description: Project Safe Mode ceiling updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/native__UpdateProjectSafeModeResponse'
        '400':
          description: Bad request — request body or params failed validation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/native__PublicError'
              example:
                error:
                  type: invalid_request_error
                  code: invalid_parameter
                  message: Correct the invalid request field.
                  param: null
                data: null
                docs: https://docs.polymorfa.com/api/errors#invalid-parameter
        '401':
          description: Missing or invalid authentication token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/native__PublicError'
              example:
                error:
                  type: authentication_error
                  code: invalid_credential
                  message: Supply a valid credential.
                  param: null
                data: null
                docs: https://docs.polymorfa.com/api/errors#invalid-credential
        '402':
          description: >-
            Safe Mode is part of BanSafe Lite, which is not included on this
            number's plan
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/native__PublicError'
              example:
                error:
                  type: permission_error
                  code: entitlement_required
                  message: The account needs the required entitlement for this action.
                  param: null
                data: null
                docs: https://docs.polymorfa.com/api/errors#entitlement-required
        '403':
          description: Authenticated but not permitted (missing scope or rule violation)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/native__PublicError'
              example:
                error:
                  type: permission_error
                  code: permission_denied
                  message: The credential does not have access to this resource.
                  param: null
                data: null
                docs: https://docs.polymorfa.com/api/errors#permission-denied
        '404':
          description: Resource not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/native__PublicError'
              example:
                error:
                  type: invalid_request_error
                  code: resource_not_found
                  message: The resource is unavailable to this caller.
                  param: null
                data: null
                docs: https://docs.polymorfa.com/api/errors#resource-not-found
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/native__PublicError'
              example:
                error:
                  type: api_error
                  code: internal_error
                  message: >-
                    An unexpected service failure occurred. Keep the request ID
                    for support.
                  param: null
                data: null
                docs: https://docs.polymorfa.com/api/errors#internal-error
        '503':
          description: >-
            Stored, but a connected number did not confirm the policy; retry the
            request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/native__PublicError'
              example:
                error:
                  type: api_error
                  code: service_unavailable
                  message: >-
                    A required service is unavailable. Check completion before
                    repeating a write.
                  param: null
                data: null
                docs: https://docs.polymorfa.com/api/errors#service-unavailable
      security:
        - native__BearerAuth: []
      servers:
        - url: https://api.polymorfa.com
components:
  schemas:
    native__UpdateProjectSafeModeResponse:
      type: object
      properties:
        success:
          type: boolean
          enum:
            - true
          description: |-
            Whether the request succeeded.

            <!-- polymorfa-input-table -->
            **Allowed values**
            | Value | Meaning |
            | --- | --- |
            | `true` | True. |
        data:
          allOf:
            - $ref: '#/components/schemas/native__ProjectSafeMode'
          description: Structured data carried by this object.
      required:
        - success
        - data
    native__PublicError:
      type: object
      properties:
        error:
          type: object
          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
              enum:
                - invalid_parameter
                - invalid_credential
                - entitlement_required
                - method_not_allowed
                - permission_denied
                - missing_scope
                - resource_not_found
                - media_fetch_failed
                - resource_gone
                - state_conflict
                - rate_limit_exceeded
                - internal_error
                - operation_not_supported
                - upstream_failure
                - service_unavailable
                - credential_verification_unavailable
                - session_not_ready
                - command_dispatch_failed
                - result_unknown
              description: >-
                Stable machine-readable code for this result.


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

                **Allowed values**

                | Value | Meaning |

                | --- | --- |

                | `invalid_parameter` | Invalid parameter. |

                | `invalid_credential` | Invalid credential. |

                | `entitlement_required` | Entitlement required. |

                | `method_not_allowed` | Method not allowed. |

                | `permission_denied` | Permission denied. |

                | `missing_scope` | Missing scope. |

                | `resource_not_found` | Resource not found. |

                | `media_fetch_failed` | Media fetch failed. |

                | `resource_gone` | Resource gone. |

                | `state_conflict` | State conflict. |

                | `rate_limit_exceeded` | Rate limit exceeded. |

                | `internal_error` | Internal error. |

                | `operation_not_supported` | Operation not supported. |

                | `upstream_failure` | Upstream failure. |

                | `service_unavailable` | Service unavailable. |

                | `credential_verification_unavailable` | Credential
                verification unavailable. |

                | `session_not_ready` | Session not ready. |

                | `command_dispatch_failed` | Command dispatch failed. |

                | `result_unknown` | Result unknown. |
            message:
              type: string
              description: Human-readable message associated with this result.
            param:
              type: string
              nullable: true
              description: |-
                Specifies param for this error.

                <!-- polymorfa-input-table -->
                **Accepted alternatives**
                | Alternative | Accepted input |
                | --- | --- |
                | Alternative 1 | Type: `string` |
                | Alternative 2 | `null` |
          required:
            - type
            - code
            - message
            - param
          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: |-
            Specifies docs for this native public error.

            <!-- polymorfa-input-table -->
            **Value constraints**
            | Constraint | Accepted input |
            | --- | --- |
            | Format | `uri` |
      required:
        - error
        - data
        - docs
    native__ProjectSafeMode:
      type: object
      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:
          type: object
          properties:
            presence:
              type: string
              enum:
                - dark
                - online_while_sending
                - online_hours
              description: |-
                Specifies presence for this ceiling.

                <!-- 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 ceiling.

                <!-- 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 ceiling.

                <!-- 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 ceiling.

                <!-- 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 ceiling.

                <!-- 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 ceiling.

                <!-- polymorfa-input-table -->
                **Value constraints**
                | Constraint | Accepted input |
                | --- | --- |
                | Numeric value | `0` through `23` (inclusive) |
          required:
            - presence
            - typing
            - reads
            - pacing
            - onlineStart
            - onlineEnd
          description: Structured ceiling values for this native project safe mode.
        entitled:
          type: boolean
          description: Whether entitled.
        entitlementReason:
          type: string
          nullable: true
          description: |-
            Specifies entitlement reason for this native project safe mode.

            <!-- polymorfa-input-table -->
            **Accepted alternatives**
            | Alternative | Accepted input |
            | --- | --- |
            | Alternative 1 | Type: `string` |
            | Alternative 2 | `null` |
      required:
        - projectId
        - ceiling
        - entitled
        - entitlementReason
  securitySchemes:
    native__BearerAuth:
      type: http
      scheme: bearer
      description: >-
        Polymorfa organization key (pmfa_ prefix), project token (pmfa_pt_
        prefix) where supported, or short-lived client token (pmfa_ct_ prefix).
        Organization and project keys may be personal or service-account owned
        and enforce selected action scopes. Organization keys cover the team and
        its projects; project tokens stay inside one project. Client tokens stay
        inside their live project and session and enforce their client rules.

````