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

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



## OpenAPI

````yaml api-reference/features/numbers.json PUT /platform/sessions/{sessionId}
openapi: 3.0.3
info:
  title: Numbers and sessions API methods
  version: 1.0.0
  description: >-
    Task-focused numbers and sessions methods across supported Polymorfa
    connection types.
servers: []
security: []
paths:
  /platform/sessions/{sessionId}:
    put:
      tags:
        - Sessions
      summary: Update session
      description: '**Required scope:** `sessions:manage`'
      operationId: managementUpdateSession
      parameters:
        - schema:
            type: string
          required: true
          name: sessionId
          in: path
          description: Identifier of the connected Polymorfa session.
      requestBody:
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/management__PlatformAccessUpdateSessionRequest
      responses:
        '200':
          description: >-
            Desired configuration stored; application reports pending until the
            runtime acknowledges
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/management__PlatformAccessUpdateSessionResponse
          headers:
            X-RateLimit-Limit:
              $ref: '#/components/headers/management__X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/management__X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/management__X-RateLimit-Reset'
        '400':
          description: Bad request — request body or params failed validation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/management__PlatformAccessPublicError'
              example:
                error:
                  type: invalid_request_error
                  code: invalid_parameter
                  message: Correct the invalid request field.
                  param: null
                  request_id: 5f0c2a8e-3b1d-4c6f-9e2a-7d4b1c8f6a30
                data: null
                docs: https://docs.polymorfa.com/api/errors#invalid-parameter
          headers:
            X-RateLimit-Limit:
              $ref: '#/components/headers/management__X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/management__X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/management__X-RateLimit-Reset'
        '401':
          description: Missing or invalid authentication token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/management__PlatformAccessPublicError'
              example:
                error:
                  type: authentication_error
                  code: invalid_credential
                  message: Supply a valid credential.
                  param: null
                  request_id: 5f0c2a8e-3b1d-4c6f-9e2a-7d4b1c8f6a30
                data: null
                docs: https://docs.polymorfa.com/api/errors#invalid-credential
          headers:
            X-RateLimit-Limit:
              $ref: '#/components/headers/management__X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/management__X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/management__X-RateLimit-Reset'
        '403':
          description: Authenticated but not permitted (missing scope or rule violation)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/management__PlatformAccessPublicError'
              example:
                error:
                  type: permission_error
                  code: permission_denied
                  message: The credential does not have access to this resource.
                  param: null
                  request_id: 5f0c2a8e-3b1d-4c6f-9e2a-7d4b1c8f6a30
                data: null
                docs: https://docs.polymorfa.com/api/errors#permission-denied
          headers:
            X-RateLimit-Limit:
              $ref: '#/components/headers/management__X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/management__X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/management__X-RateLimit-Reset'
        '404':
          description: Resource not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/management__PlatformAccessPublicError'
              example:
                error:
                  type: invalid_request_error
                  code: resource_not_found
                  message: The resource is unavailable to this caller.
                  param: null
                  request_id: 5f0c2a8e-3b1d-4c6f-9e2a-7d4b1c8f6a30
                data: null
                docs: https://docs.polymorfa.com/api/errors#resource-not-found
          headers:
            X-RateLimit-Limit:
              $ref: '#/components/headers/management__X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/management__X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/management__X-RateLimit-Reset'
        '409':
          description: Configuration revision changed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/management__PlatformAccessPublicError'
              example:
                error:
                  type: conflict_error
                  code: state_conflict
                  message: The request conflicts with the resource state.
                  param: null
                  request_id: 5f0c2a8e-3b1d-4c6f-9e2a-7d4b1c8f6a30
                data: null
                docs: https://docs.polymorfa.com/api/errors#state-conflict
          headers:
            X-RateLimit-Limit:
              $ref: '#/components/headers/management__X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/management__X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/management__X-RateLimit-Reset'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/management__PlatformAccessPublicError'
              example:
                error:
                  type: api_error
                  code: internal_error
                  message: >-
                    An unexpected service failure occurred. Keep the request ID
                    for support.
                  param: null
                  request_id: 5f0c2a8e-3b1d-4c6f-9e2a-7d4b1c8f6a30
                data: null
                docs: https://docs.polymorfa.com/api/errors#internal-error
          headers:
            X-RateLimit-Limit:
              $ref: '#/components/headers/management__X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/management__X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/management__X-RateLimit-Reset'
        '503':
          description: Session configuration persistence is unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/management__PlatformAccessPublicError'
              example:
                error:
                  type: api_error
                  code: service_unavailable
                  message: >-
                    A required service is unavailable. Check completion before
                    repeating a write.
                  param: null
                  request_id: 5f0c2a8e-3b1d-4c6f-9e2a-7d4b1c8f6a30
                data: null
                docs: https://docs.polymorfa.com/api/errors#service-unavailable
          headers:
            X-RateLimit-Limit:
              $ref: '#/components/headers/management__X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/management__X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/management__X-RateLimit-Reset'
      security:
        - management__ApiKeyAuth: []
      servers:
        - url: https://api.polymorfa.com
components:
  schemas:
    management__PlatformAccessUpdateSessionRequest:
      type: object
      properties:
        configuration:
          type: object
          properties:
            set:
              type: object
              properties:
                historySync:
                  type: object
                  properties:
                    mode:
                      type: string
                      enum:
                        - metadata_only
                        - deliver
                      description: |-
                        Operating mode selected for this feature.

                        <!-- polymorfa-input-table -->
                        **Allowed values**
                        | Value | Meaning |
                        | --- | --- |
                        | `metadata_only` | Metadata only. |
                        | `deliver` | Deliver. |
                    requestFull:
                      type: boolean
                      description: Whether request full.
                  additionalProperties: false
                  description: >-
                    History synchronization behavior for newly connected
                    sessions.
                hms:
                  anyOf:
                    - type: object
                      properties:
                        enabled:
                          type: boolean
                          enum:
                            - false
                          description: |-
                            Whether this feature is enabled.

                            <!-- polymorfa-input-table -->
                            **Allowed values**
                            | Value | Meaning |
                            | --- | --- |
                            | `false` | False. |
                      required:
                        - enabled
                      additionalProperties: false
                    - type: object
                      properties:
                        enabled:
                          type: boolean
                          enum:
                            - true
                          description: |-
                            Whether this feature is enabled.

                            <!-- polymorfa-input-table -->
                            **Allowed values**
                            | Value | Meaning |
                            | --- | --- |
                            | `true` | True. |
                        region:
                          type: string
                          pattern: ^[a-z0-9][a-z0-9-]{0,31}$
                          description: |-
                            Specifies region for this any of.

                            <!-- polymorfa-input-table -->
                            **Value constraints**
                            | Constraint | Accepted input |
                            | --- | --- |
                            | Pattern | `^[a-z0-9][a-z0-9-]{0,31}$` |
                        policy:
                          type: string
                          enum:
                            - short
                            - standard
                            - extended
                            - compliance
                            - enterprise_archive
                          description: |-
                            Specifies policy for this any of.

                            <!-- polymorfa-input-table -->
                            **Allowed values**
                            | Value | Meaning |
                            | --- | --- |
                            | `short` | Short. |
                            | `standard` | Standard. |
                            | `extended` | Extended. |
                            | `compliance` | Compliance. |
                            | `enterprise_archive` | Enterprise archive. |
                        retentionDays:
                          type: integer
                          minimum: 1
                          maximum: 2555
                          description: |-
                            Specifies retention days for this any of.

                            <!-- polymorfa-input-table -->
                            **Value constraints**
                            | Constraint | Accepted input |
                            | --- | --- |
                            | Numeric value | `1` through `2555` (inclusive) |
                        policyVersion:
                          type: string
                          minLength: 1
                          maxLength: 128
                          description: |-
                            Specifies policy version for this any of.

                            <!-- polymorfa-input-table -->
                            **Value constraints**
                            | Constraint | Accepted input |
                            | --- | --- |
                            | String length | `1` through `128` characters |
                        legalHold:
                          type: boolean
                          description: Whether legal hold.
                      required:
                        - enabled
                        - region
                        - policy
                      additionalProperties: false
                  description: >-
                    Specifies hms for this set.


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

                    **Accepted alternatives**

                    | Alternative | Accepted input |

                    | --- | --- |

                    | Alternative 1 | Type: `object`; Field `enabled`: `false`;
                    Required fields: `enabled` |

                    | Alternative 2 | Type: `object`; Field `enabled`: `true`;
                    Field `policy`: `short` or `standard` or `extended` or
                    `compliance` or `enterprise_archive`; Required fields:
                    `enabled`, `region`, `policy` |
                observation:
                  type: object
                  properties:
                    presenceMode:
                      type: string
                      enum:
                        - 'off'
                        - events
                        - cache
                      description: |-
                        Behavior selected for presence.

                        <!-- polymorfa-input-table -->
                        **Allowed values**
                        | Value | Meaning |
                        | --- | --- |
                        | `off` | Off. |
                        | `events` | Events. |
                        | `cache` | Cache. |
                    typingMode:
                      type: string
                      enum:
                        - 'off'
                        - events
                        - cache
                      description: |-
                        Behavior selected for typing.

                        <!-- polymorfa-input-table -->
                        **Allowed values**
                        | Value | Meaning |
                        | --- | --- |
                        | `off` | Off. |
                        | `events` | Events. |
                        | `cache` | Cache. |
                    labelMode:
                      type: string
                      enum:
                        - 'off'
                        - events
                        - cache
                        - project
                      description: |-
                        Behavior selected for label.

                        <!-- polymorfa-input-table -->
                        **Allowed values**
                        | Value | Meaning |
                        | --- | --- |
                        | `off` | Off. |
                        | `events` | Events. |
                        | `cache` | Cache. |
                        | `project` | Project. |
                    quickReplyMode:
                      type: string
                      enum:
                        - 'off'
                        - events
                        - cache
                      description: |-
                        Behavior selected for quick reply.

                        <!-- polymorfa-input-table -->
                        **Allowed values**
                        | Value | Meaning |
                        | --- | --- |
                        | `off` | Off. |
                        | `events` | Events. |
                        | `cache` | Cache. |
                  additionalProperties: false
                  description: Structured observation values for this set.
              additionalProperties: false
              description: Structured set values for this configuration.
            reset:
              type: array
              items:
                type: string
                enum:
                  - historySync
                  - historySync.mode
                  - historySync.requestFull
                  - hms
                  - observation
                  - observation.presenceMode
                  - observation.typingMode
                  - observation.labelMode
                  - observation.quickReplyMode
              description: |-
                Reset associated with this configuration.

                <!-- polymorfa-input-table -->
                **Allowed item values**
                | Item value | Meaning |
                | --- | --- |
                | `historySync` | History sync. |
                | `historySync.mode` | History sync.mode. |
                | `historySync.requestFull` | History sync.request full. |
                | `hms` | Hms. |
                | `observation` | Observation. |
                | `observation.presenceMode` | Observation.presence mode. |
                | `observation.typingMode` | Observation.typing mode. |
                | `observation.labelMode` | Observation.label mode. |
                | `observation.quickReplyMode` | Observation.quick reply mode. |
          additionalProperties: false
          description: >-
            Structured configuration values for this management platform access
            update session request.
        revision:
          type: integer
          minimum: 0
          description: >-
            Specifies revision for this management platform access update
            session request.


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

            **Value constraints**

            | Constraint | Accepted input |

            | --- | --- |

            | Numeric value | `0` or greater |
      required:
        - configuration
        - revision
      additionalProperties: false
    management__PlatformAccessUpdateSessionResponse:
      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/management__PlatformAccessSession'
          description: Structured data carried by this object.
      required:
        - success
        - data
    management__PlatformAccessPublicError:
      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
                - gate_limit_reached
                - method_not_allowed
                - permission_denied
                - missing_scope
                - resource_not_found
                - hms_not_enabled
                - media_fetch_failed
                - resource_gone
                - feature_unavailable
                - stream_cursor_invalid
                - stream_cursor_expired
                - stream_connection_limit_reached
                - state_conflict
                - hybrid_choice_required
                - idempotency_conflict
                - idempotency_in_progress
                - idempotency_completed
                - idempotency_outcome_unknown
                - call_claimed
                - call_not_ringing
                - connection_limit
                - unsupported_for_connection
                - call_permission_required
                - invalid_sip_trunk
                - calls_disabled
                - call_recipient_opted_out
                - call_destination_blocked
                - call_permission_request_limited
                - call_permission_granted
                - call_opt_out_limit
                - number_restricted
                - sip_trunk_in_use
                - sip_trunk_revision_conflict
                - sip_trunk_limit
                - sip_unavailable
                - voice_not_enabled
                - provider_credential_invalid
                - provider_unavailable
                - asset_not_ready
                - voice_asset_in_use
                - voice_asset_revision_conflict
                - voice_unavailable
                - rate_limit_exceeded
                - internal_error
                - operation_not_supported
                - upstream_failure
                - service_unavailable
                - credential_verification_unavailable
                - session_not_ready
                - command_dispatch_failed
                - result_unknown
                - recipient_not_on_whatsapp
                - conversation_window_closed
                - template_not_approved
                - media_too_large
                - whatsapp_rate_limited
                - new_chat_limit_reached
                - whatsapp_account_restricted
                - bansafe_suspended
                - bansafe_org_suspended
                - bansafe_cold_blocked
                - bansafe_cold_held
                - bansafe_throttled
                - bansafe_daily_allowance_reached
                - bansafe_accounting_unavailable
                - bansafe_send_outcome_unknown
                - campaigns_not_entitled
                - campaign_throughput_capped
              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. |

                | `gate_limit_reached` | Gate limit reached. |

                | `method_not_allowed` | Method not allowed. |

                | `permission_denied` | Permission denied. |

                | `missing_scope` | Missing scope. |

                | `resource_not_found` | Resource not found. |

                | `hms_not_enabled` | Hms not enabled. |

                | `media_fetch_failed` | Media fetch failed. |

                | `resource_gone` | Resource gone. |

                | `feature_unavailable` | Feature unavailable. |

                | `stream_cursor_invalid` | Stream cursor invalid. |

                | `stream_cursor_expired` | Stream cursor expired. |

                | `stream_connection_limit_reached` | Stream connection limit
                reached. |

                | `state_conflict` | State conflict. |

                | `hybrid_choice_required` | Hybrid choice required. |

                | `idempotency_conflict` | Idempotency conflict. |

                | `idempotency_in_progress` | Idempotency in progress. |

                | `idempotency_completed` | Idempotency completed. |

                | `idempotency_outcome_unknown` | Idempotency outcome unknown. |

                | `call_claimed` | Call claimed. |

                | `call_not_ringing` | Call not ringing. |

                | `connection_limit` | Connection limit. |

                | `unsupported_for_connection` | Unsupported for connection. |

                | `call_permission_required` | Call permission required. |

                | `invalid_sip_trunk` | Invalid sip trunk. |

                | `calls_disabled` | Calls disabled. |

                | `call_recipient_opted_out` | Call recipient opted out. |

                | `call_destination_blocked` | Call destination blocked. |

                | `call_permission_request_limited` | Call permission request
                limited. |

                | `call_permission_granted` | Call permission granted. |

                | `call_opt_out_limit` | Call opt out limit. |

                | `number_restricted` | Number restricted. |

                | `sip_trunk_in_use` | Sip trunk in use. |

                | `sip_trunk_revision_conflict` | Sip trunk revision conflict. |

                | `sip_trunk_limit` | Sip trunk limit. |

                | `sip_unavailable` | Sip unavailable. |

                | `voice_not_enabled` | Voice not enabled. |

                | `provider_credential_invalid` | Provider credential invalid. |

                | `provider_unavailable` | Provider unavailable. |

                | `asset_not_ready` | Asset not ready. |

                | `voice_asset_in_use` | Voice asset in use. |

                | `voice_asset_revision_conflict` | Voice asset revision
                conflict. |

                | `voice_unavailable` | Voice unavailable. |

                | `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. |

                | `recipient_not_on_whatsapp` | Recipient not on whatsapp. |

                | `conversation_window_closed` | Conversation window closed. |

                | `template_not_approved` | Template not approved. |

                | `media_too_large` | Media too large. |

                | `whatsapp_rate_limited` | Whatsapp rate limited. |

                | `new_chat_limit_reached` | New chat limit reached. |

                | `whatsapp_account_restricted` | Whatsapp account restricted. |

                | `bansafe_suspended` | Bansafe suspended. |

                | `bansafe_org_suspended` | Bansafe org suspended. |

                | `bansafe_cold_blocked` | Bansafe cold blocked. |

                | `bansafe_cold_held` | Bansafe cold held. |

                | `bansafe_throttled` | Bansafe throttled. |

                | `bansafe_daily_allowance_reached` | Bansafe daily allowance
                reached. |

                | `bansafe_accounting_unavailable` | Bansafe accounting
                unavailable. |

                | `bansafe_send_outcome_unknown` | Bansafe send outcome unknown.
                |

                | `campaigns_not_entitled` | Campaigns not entitled. |

                | `campaign_throughput_capped` | Campaign throughput capped. |
            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` |
            request_id:
              type: string
              description: >-
                Matches the X-Request-Id response header. Include it when you
                contact support.
            request_log_url:
              type: string
              format: uri
              description: >-
                Console page that shows this request. Returned only to
                organization and project credentials whose request was logged.


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

                **Value constraints**

                | Constraint | Accepted input |

                | --- | --- |

                | Format | `uri` |
          required:
            - type
            - code
            - message
            - param
            - request_id
          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 management platform access public error.

            <!-- polymorfa-input-table -->
            **Value constraints**
            | Constraint | Accepted input |
            | --- | --- |
            | Format | `uri` |
      required:
        - error
        - data
        - docs
    management__PlatformAccessSession:
      type: object
      properties:
        sessionId:
          type: string
          description: >-
            Session ID. Use it to address this session in Platform and Messaging
            requests.
        name:
          type: string
          description: Display label, or the session identifier when no label is set.
        externalId:
          type: string
          description: >-
            Integrator correlation supplied when creating the QuickLink for this
            session.
        tenantId:
          type: string
          description: Identifier of the organization that owns this resource.
        type:
          type: string
          enum:
            - linked_device
            - cloud_api
          description: >-
            How the session connects to WhatsApp. 'linked_device' pairs as a
            WhatsApp linked device; 'cloud_api' uses the Meta Cloud API.
            Immutable after create.


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

            **Allowed values**

            | Value | Meaning |

            | --- | --- |

            | `linked_device` | Linked device. |

            | `cloud_api` | Cloud api. |
        testMode:
          type: boolean
          description: Whether this session was created as a simulated testing number.
        status:
          type: string
          description: 'Current status: CONNECTING, CONNECTED, or DISCONNECTED'
        statusReason:
          type: string
          description: Reason for the current status.
        configuration:
          allOf:
            - $ref: >-
                #/components/schemas/management__PlatformAccessSessionConfigurationView
          description: Specifies configuration for this management platform access session.
        newChatCapping:
          allOf:
            - $ref: '#/components/schemas/management__PlatformAccessNewChatCapping'
          description: >-
            Specifies new chat capping for this management platform access
            session.


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

            **Accepted alternatives**

            | Alternative | Accepted input |

            | --- | --- |

            | Alternative 1 | Type: `object`; Field `status`: `none` or
            `first_warning` or `second_warning` or `capped` or `null`; Required
            fields: `enabled`, `pacing`, `status`, `capped`, `limit`, `used`,
            `remaining`, `cycleStartsAt`, `resetsAt`, `observedAt` |

            | Alternative 2 | `null` |
        createdAt:
          type: string
          description: ISO 8601 timestamp when this resource was created.
        updatedAt:
          type: string
          description: ISO 8601 timestamp when this resource was last updated.
      required:
        - sessionId
        - name
        - tenantId
        - type
        - testMode
        - status
        - createdAt
        - updatedAt
    management__PlatformAccessSessionConfigurationView:
      type: object
      properties:
        requestedHistory:
          type: object
          properties:
            mode:
              type: string
              enum:
                - metadata_only
                - deliver
              description: |-
                Operating mode selected for this feature.

                <!-- polymorfa-input-table -->
                **Allowed values**
                | Value | Meaning |
                | --- | --- |
                | `metadata_only` | Metadata only. |
                | `deliver` | Deliver. |
            requestFull:
              type: boolean
              description: Whether request full.
          required:
            - mode
            - requestFull
          additionalProperties: false
          description: >-
            Structured requested history values for this management platform
            access session configuration view.
        historyConsent:
          type: string
          enum:
            - pending
            - accepted
            - declined
          description: >-
            Specifies history consent for this management platform access
            session configuration view.


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

            **Allowed values**

            | Value | Meaning |

            | --- | --- |

            | `pending` | Pending. |

            | `accepted` | Accepted. |

            | `declined` | Declined. |
        effective:
          type: object
          properties:
            observation:
              type: object
              properties:
                presenceMode:
                  type: string
                  enum:
                    - 'off'
                    - events
                    - cache
                  description: |-
                    Behavior selected for presence.

                    <!-- polymorfa-input-table -->
                    **Allowed values**
                    | Value | Meaning |
                    | --- | --- |
                    | `off` | Off. |
                    | `events` | Events. |
                    | `cache` | Cache. |
                typingMode:
                  type: string
                  enum:
                    - 'off'
                    - events
                    - cache
                  description: |-
                    Behavior selected for typing.

                    <!-- polymorfa-input-table -->
                    **Allowed values**
                    | Value | Meaning |
                    | --- | --- |
                    | `off` | Off. |
                    | `events` | Events. |
                    | `cache` | Cache. |
                labelMode:
                  type: string
                  enum:
                    - 'off'
                    - events
                    - cache
                    - project
                  description: |-
                    Behavior selected for label.

                    <!-- polymorfa-input-table -->
                    **Allowed values**
                    | Value | Meaning |
                    | --- | --- |
                    | `off` | Off. |
                    | `events` | Events. |
                    | `cache` | Cache. |
                    | `project` | Project. |
                quickReplyMode:
                  type: string
                  enum:
                    - 'off'
                    - events
                    - cache
                  description: |-
                    Behavior selected for quick reply.

                    <!-- polymorfa-input-table -->
                    **Allowed values**
                    | Value | Meaning |
                    | --- | --- |
                    | `off` | Off. |
                    | `events` | Events. |
                    | `cache` | Cache. |
              required:
                - presenceMode
                - typingMode
                - labelMode
                - quickReplyMode
              additionalProperties: false
              description: Structured observation values for this effective.
            historySync:
              type: object
              properties:
                mode:
                  type: string
                  enum:
                    - metadata_only
                    - deliver
                  description: |-
                    Operating mode selected for this feature.

                    <!-- polymorfa-input-table -->
                    **Allowed values**
                    | Value | Meaning |
                    | --- | --- |
                    | `metadata_only` | Metadata only. |
                    | `deliver` | Deliver. |
                requestFull:
                  type: boolean
                  description: Whether request full.
              required:
                - mode
                - requestFull
              additionalProperties: false
              description: History synchronization behavior for newly connected sessions.
            hms:
              anyOf:
                - type: object
                  properties:
                    enabled:
                      type: boolean
                      enum:
                        - false
                      description: |-
                        Whether this feature is enabled.

                        <!-- polymorfa-input-table -->
                        **Allowed values**
                        | Value | Meaning |
                        | --- | --- |
                        | `false` | False. |
                  required:
                    - enabled
                  additionalProperties: false
                - type: object
                  properties:
                    enabled:
                      type: boolean
                      enum:
                        - true
                      description: |-
                        Whether this feature is enabled.

                        <!-- polymorfa-input-table -->
                        **Allowed values**
                        | Value | Meaning |
                        | --- | --- |
                        | `true` | True. |
                    region:
                      type: string
                      pattern: ^[a-z0-9][a-z0-9-]{0,31}$
                      description: |-
                        Specifies region for this any of.

                        <!-- polymorfa-input-table -->
                        **Value constraints**
                        | Constraint | Accepted input |
                        | --- | --- |
                        | Pattern | `^[a-z0-9][a-z0-9-]{0,31}$` |
                    policy:
                      type: string
                      enum:
                        - short
                        - standard
                        - extended
                        - compliance
                        - enterprise_archive
                      description: |-
                        Specifies policy for this any of.

                        <!-- polymorfa-input-table -->
                        **Allowed values**
                        | Value | Meaning |
                        | --- | --- |
                        | `short` | Short. |
                        | `standard` | Standard. |
                        | `extended` | Extended. |
                        | `compliance` | Compliance. |
                        | `enterprise_archive` | Enterprise archive. |
                    retentionDays:
                      type: integer
                      minimum: 1
                      maximum: 2555
                      description: |-
                        Specifies retention days for this any of.

                        <!-- polymorfa-input-table -->
                        **Value constraints**
                        | Constraint | Accepted input |
                        | --- | --- |
                        | Numeric value | `1` through `2555` (inclusive) |
                    policyVersion:
                      type: string
                      minLength: 1
                      maxLength: 128
                      description: |-
                        Specifies policy version for this any of.

                        <!-- polymorfa-input-table -->
                        **Value constraints**
                        | Constraint | Accepted input |
                        | --- | --- |
                        | String length | `1` through `128` characters |
                    legalHold:
                      type: boolean
                      description: Whether legal hold.
                  required:
                    - enabled
                    - region
                    - policy
                  additionalProperties: false
              description: >-
                Specifies hms for this effective.


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

                **Accepted alternatives**

                | Alternative | Accepted input |

                | --- | --- |

                | Alternative 1 | Type: `object`; Field `enabled`: `false`;
                Required fields: `enabled` |

                | Alternative 2 | Type: `object`; Field `enabled`: `true`; Field
                `policy`: `short` or `standard` or `extended` or `compliance` or
                `enterprise_archive`; Required fields: `enabled`, `region`,
                `policy` |
          required:
            - observation
            - historySync
            - hms
          additionalProperties: false
          description: >-
            Structured effective values for this management platform access
            session configuration view.
        overrides:
          type: object
          properties:
            historySync:
              type: object
              properties:
                mode:
                  type: string
                  enum:
                    - metadata_only
                    - deliver
                  description: |-
                    Operating mode selected for this feature.

                    <!-- polymorfa-input-table -->
                    **Allowed values**
                    | Value | Meaning |
                    | --- | --- |
                    | `metadata_only` | Metadata only. |
                    | `deliver` | Deliver. |
                requestFull:
                  type: boolean
                  description: Whether request full.
              additionalProperties: false
              description: History synchronization behavior for newly connected sessions.
            hms:
              anyOf:
                - type: object
                  properties:
                    enabled:
                      type: boolean
                      enum:
                        - false
                      description: |-
                        Whether this feature is enabled.

                        <!-- polymorfa-input-table -->
                        **Allowed values**
                        | Value | Meaning |
                        | --- | --- |
                        | `false` | False. |
                  required:
                    - enabled
                  additionalProperties: false
                - type: object
                  properties:
                    enabled:
                      type: boolean
                      enum:
                        - true
                      description: |-
                        Whether this feature is enabled.

                        <!-- polymorfa-input-table -->
                        **Allowed values**
                        | Value | Meaning |
                        | --- | --- |
                        | `true` | True. |
                    region:
                      type: string
                      pattern: ^[a-z0-9][a-z0-9-]{0,31}$
                      description: |-
                        Specifies region for this any of.

                        <!-- polymorfa-input-table -->
                        **Value constraints**
                        | Constraint | Accepted input |
                        | --- | --- |
                        | Pattern | `^[a-z0-9][a-z0-9-]{0,31}$` |
                    policy:
                      type: string
                      enum:
                        - short
                        - standard
                        - extended
                        - compliance
                        - enterprise_archive
                      description: |-
                        Specifies policy for this any of.

                        <!-- polymorfa-input-table -->
                        **Allowed values**
                        | Value | Meaning |
                        | --- | --- |
                        | `short` | Short. |
                        | `standard` | Standard. |
                        | `extended` | Extended. |
                        | `compliance` | Compliance. |
                        | `enterprise_archive` | Enterprise archive. |
                    retentionDays:
                      type: integer
                      minimum: 1
                      maximum: 2555
                      description: |-
                        Specifies retention days for this any of.

                        <!-- polymorfa-input-table -->
                        **Value constraints**
                        | Constraint | Accepted input |
                        | --- | --- |
                        | Numeric value | `1` through `2555` (inclusive) |
                    policyVersion:
                      type: string
                      minLength: 1
                      maxLength: 128
                      description: |-
                        Specifies policy version for this any of.

                        <!-- polymorfa-input-table -->
                        **Value constraints**
                        | Constraint | Accepted input |
                        | --- | --- |
                        | String length | `1` through `128` characters |
                    legalHold:
                      type: boolean
                      description: Whether legal hold.
                  required:
                    - enabled
                    - region
                    - policy
                  additionalProperties: false
              description: >-
                Specifies hms for this override.


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

                **Accepted alternatives**

                | Alternative | Accepted input |

                | --- | --- |

                | Alternative 1 | Type: `object`; Field `enabled`: `false`;
                Required fields: `enabled` |

                | Alternative 2 | Type: `object`; Field `enabled`: `true`; Field
                `policy`: `short` or `standard` or `extended` or `compliance` or
                `enterprise_archive`; Required fields: `enabled`, `region`,
                `policy` |
            observation:
              type: object
              properties:
                presenceMode:
                  type: string
                  enum:
                    - 'off'
                    - events
                    - cache
                  description: |-
                    Behavior selected for presence.

                    <!-- polymorfa-input-table -->
                    **Allowed values**
                    | Value | Meaning |
                    | --- | --- |
                    | `off` | Off. |
                    | `events` | Events. |
                    | `cache` | Cache. |
                typingMode:
                  type: string
                  enum:
                    - 'off'
                    - events
                    - cache
                  description: |-
                    Behavior selected for typing.

                    <!-- polymorfa-input-table -->
                    **Allowed values**
                    | Value | Meaning |
                    | --- | --- |
                    | `off` | Off. |
                    | `events` | Events. |
                    | `cache` | Cache. |
                labelMode:
                  type: string
                  enum:
                    - 'off'
                    - events
                    - cache
                    - project
                  description: |-
                    Behavior selected for label.

                    <!-- polymorfa-input-table -->
                    **Allowed values**
                    | Value | Meaning |
                    | --- | --- |
                    | `off` | Off. |
                    | `events` | Events. |
                    | `cache` | Cache. |
                    | `project` | Project. |
                quickReplyMode:
                  type: string
                  enum:
                    - 'off'
                    - events
                    - cache
                  description: |-
                    Behavior selected for quick reply.

                    <!-- polymorfa-input-table -->
                    **Allowed values**
                    | Value | Meaning |
                    | --- | --- |
                    | `off` | Off. |
                    | `events` | Events. |
                    | `cache` | Cache. |
              additionalProperties: false
              description: Structured observation values for this override.
          additionalProperties: false
          description: >-
            Structured overrides values for this management platform access
            session configuration view.
        sources:
          type: object
          properties:
            observation.presenceMode:
              type: string
              enum:
                - platform
                - team
                - project
                - session
              description: |-
                Behavior selected for observation.presence.

                <!-- polymorfa-input-table -->
                **Allowed values**
                | Value | Meaning |
                | --- | --- |
                | `platform` | Platform. |
                | `team` | Team. |
                | `project` | Project. |
                | `session` | Session. |
            observation.typingMode:
              type: string
              enum:
                - platform
                - team
                - project
                - session
              description: |-
                Behavior selected for observation.typing.

                <!-- polymorfa-input-table -->
                **Allowed values**
                | Value | Meaning |
                | --- | --- |
                | `platform` | Platform. |
                | `team` | Team. |
                | `project` | Project. |
                | `session` | Session. |
            observation.labelMode:
              type: string
              enum:
                - platform
                - team
                - project
                - session
              description: |-
                Behavior selected for observation.label.

                <!-- polymorfa-input-table -->
                **Allowed values**
                | Value | Meaning |
                | --- | --- |
                | `platform` | Platform. |
                | `team` | Team. |
                | `project` | Project. |
                | `session` | Session. |
            observation.quickReplyMode:
              type: string
              enum:
                - platform
                - team
                - project
                - session
              description: |-
                Behavior selected for observation.quick reply.

                <!-- polymorfa-input-table -->
                **Allowed values**
                | Value | Meaning |
                | --- | --- |
                | `platform` | Platform. |
                | `team` | Team. |
                | `project` | Project. |
                | `session` | Session. |
            historySync.mode:
              type: string
              enum:
                - platform
                - team
                - project
                - session
                - consent
              description: |-
                Behavior selected for history sync.mode.

                <!-- polymorfa-input-table -->
                **Allowed values**
                | Value | Meaning |
                | --- | --- |
                | `platform` | Platform. |
                | `team` | Team. |
                | `project` | Project. |
                | `session` | Session. |
                | `consent` | Consent. |
            historySync.requestFull:
              type: string
              enum:
                - platform
                - team
                - project
                - session
                - consent
              description: |-
                Specifies history sync.request full for this source.

                <!-- polymorfa-input-table -->
                **Allowed values**
                | Value | Meaning |
                | --- | --- |
                | `platform` | Platform. |
                | `team` | Team. |
                | `project` | Project. |
                | `session` | Session. |
                | `consent` | Consent. |
            hms:
              type: string
              enum:
                - platform
                - team
                - project
                - session
              description: |-
                Specifies hms for this source.

                <!-- polymorfa-input-table -->
                **Allowed values**
                | Value | Meaning |
                | --- | --- |
                | `platform` | Platform. |
                | `team` | Team. |
                | `project` | Project. |
                | `session` | Session. |
          required:
            - observation.presenceMode
            - observation.typingMode
            - observation.labelMode
            - observation.quickReplyMode
            - historySync.mode
            - historySync.requestFull
            - hms
          additionalProperties: false
          description: >-
            Structured sources values for this management platform access
            session configuration view.
        revisions:
          type: object
          properties:
            team:
              type: integer
              minimum: 0
              description: |-
                Specifies team for this revision.

                <!-- polymorfa-input-table -->
                **Value constraints**
                | Constraint | Accepted input |
                | --- | --- |
                | Numeric value | `0` or greater |
            project:
              type: integer
              minimum: 0
              description: |-
                Specifies project for this revision.

                <!-- polymorfa-input-table -->
                **Value constraints**
                | Constraint | Accepted input |
                | --- | --- |
                | Numeric value | `0` or greater |
            session:
              type: integer
              minimum: 0
              description: |-
                Identifier of the connected Polymorfa session.

                <!-- polymorfa-input-table -->
                **Value constraints**
                | Constraint | Accepted input |
                | --- | --- |
                | Numeric value | `0` or greater |
          required:
            - team
            - project
            - session
          additionalProperties: false
          description: >-
            Structured revisions values for this management platform access
            session configuration view.
        application:
          type: object
          properties:
            desiredGeneration:
              type: integer
              minimum: 0
              description: |-
                Specifies desired generation for this application.

                <!-- polymorfa-input-table -->
                **Value constraints**
                | Constraint | Accepted input |
                | --- | --- |
                | Numeric value | `0` or greater |
            appliedGeneration:
              type: integer
              minimum: 0
              description: |-
                Specifies applied generation for this application.

                <!-- polymorfa-input-table -->
                **Value constraints**
                | Constraint | Accepted input |
                | --- | --- |
                | Numeric value | `0` or greater |
            status:
              type: string
              enum:
                - pending
                - applied
              description: |-
                Current status of this resource or operation.

                <!-- polymorfa-input-table -->
                **Allowed values**
                | Value | Meaning |
                | --- | --- |
                | `pending` | Pending. |
                | `applied` | Applied. |
          required:
            - desiredGeneration
            - appliedGeneration
            - status
          additionalProperties: false
          description: >-
            Structured application values for this management platform access
            session configuration view.
      required:
        - requestedHistory
        - effective
        - overrides
        - sources
        - revisions
      additionalProperties: false
    management__PlatformAccessNewChatCapping:
      type: object
      nullable: true
      properties:
        enabled:
          type: boolean
          nullable: true
          description: >-
            Whether WhatsApp enabled its new-chat cap for this number. WhatsApp
            decides this per number; `false` means no cap applies. `null` means
            WhatsApp's configuration for this number could not be read to a
            decision, and Polymorfa does not pace to a cap.


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

            **Accepted alternatives**

            | Alternative | Accepted input |

            | --- | --- |

            | Alternative 1 | Type: `boolean` |

            | Alternative 2 | `null` |
        pacing:
          type: boolean
          description: >-
            Whether Polymorfa is holding back sends that would start a new chat
            while the number is capped. True only when `enabled` is true.
        status:
          type: string
          nullable: true
          enum:
            - none
            - first_warning
            - second_warning
            - capped
            - null
          description: >-
            The number's cap status as WhatsApp last reported it: `none`,
            `first_warning`, `second_warning` or `capped`. `null` until WhatsApp
            reported one. Reads `none` once the reported cycle has ended.


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

            **Allowed values**

            | Value | Meaning |

            | --- | --- |

            | `none` | None. |

            | `first_warning` | First warning. |

            | `second_warning` | Second warning. |

            | `capped` | Capped. |

            | `null` | Null. |


            **Accepted alternatives**

            | Alternative | Accepted input |

            | --- | --- |

            | Alternative 1 | Type: `string`; Value `none` or `first_warning` or
            `second_warning` or `capped` |

            | Alternative 2 | `null` |
          example: first_warning
        capped:
          type: boolean
          description: >-
            True while WhatsApp reports the number capped and Polymorfa paces it
            (`pacing` is true), until `resetsAt`. New-chat sends are then held
            back; messages to existing chats still send.
        limit:
          type: integer
          nullable: true
          minimum: 0
          description: >-
            New chats the number may start in the current cycle, as WhatsApp
            reported it.


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

            **Accepted alternatives**

            | Alternative | Accepted input |

            | --- | --- |

            | Alternative 1 | Type: `integer`; Numeric value: `0` or greater |

            | Alternative 2 | `null` |


            **Value constraints**

            | Constraint | Accepted input |

            | --- | --- |

            | Numeric value | `0` or greater |
          example: 50
        used:
          type: integer
          nullable: true
          minimum: 0
          description: |-
            New chats started in the current cycle, as WhatsApp reported it.

            <!-- polymorfa-input-table -->
            **Accepted alternatives**
            | Alternative | Accepted input |
            | --- | --- |
            | Alternative 1 | Type: `integer`; Numeric value: `0` or greater |
            | Alternative 2 | `null` |

            **Value constraints**
            | Constraint | Accepted input |
            | --- | --- |
            | Numeric value | `0` or greater |
          example: 26
        remaining:
          type: integer
          nullable: true
          minimum: 0
          description: |-
            `limit` minus `used`.

            <!-- polymorfa-input-table -->
            **Accepted alternatives**
            | Alternative | Accepted input |
            | --- | --- |
            | Alternative 1 | Type: `integer`; Numeric value: `0` or greater |
            | Alternative 2 | `null` |

            **Value constraints**
            | Constraint | Accepted input |
            | --- | --- |
            | Numeric value | `0` or greater |
          example: 24
        cycleStartsAt:
          type: string
          nullable: true
          description: |-
            ISO 8601 start of the current cycle, when WhatsApp reported it.

            <!-- polymorfa-input-table -->
            **Accepted alternatives**
            | Alternative | Accepted input |
            | --- | --- |
            | Alternative 1 | Type: `string` |
            | Alternative 2 | `null` |
        resetsAt:
          type: string
          nullable: true
          description: >-
            ISO 8601 end of the current cycle as WhatsApp reported it. While
            Polymorfa holds a number that WhatsApp rejected for a new chat
            without reporting a cycle, the end of that one-hour hold.


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

            **Accepted alternatives**

            | Alternative | Accepted input |

            | --- | --- |

            | Alternative 1 | Type: `string` |

            | Alternative 2 | `null` |
        observedAt:
          type: string
          description: ISO 8601 time Polymorfa last observed this state.
      required:
        - enabled
        - pacing
        - status
        - capped
        - limit
        - used
        - remaining
        - cycleStartsAt
        - resetsAt
        - observedAt
      description: >-
        WhatsApp's new-chat cap for this linked-device number. Returned by Get
        session only. `null` when Polymorfa has not observed the number's
        configuration yet.
  headers:
    management__X-RateLimit-Limit:
      description: >-
        Team request quota per rolling minute, when the per-team request limiter
        applies.
      schema:
        type: integer
        minimum: 1
    management__X-RateLimit-Remaining:
      description: >-
        Requests left in the per-team quota; zero when this limiter rejects the
        request.
      schema:
        type: integer
        minimum: 0
    management__X-RateLimit-Reset:
      description: >-
        Unix timestamp in seconds when the oldest counted request leaves the
        rolling window, when the per-team request limiter applies. Follow
        Retry-After on a rejected request.
      schema:
        type: integer
        minimum: 0
  securitySchemes:
    management__ApiKeyAuth:
      type: http
      scheme: bearer
      description: >-
        Send your team API key or project token as `Authorization: Bearer
        <token>`. The credential must have the required permissions. Project
        tokens can access only their own project.

````

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