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

# Get session capabilities

> Returns which WhatsApp features WhatsApp has enabled for this number, and the limits it applies, as of the number's last configuration sync. Each value reflects WhatsApp's configuration at `syncedAt`, not a live check. Values describe the WhatsApp account last linked to the number, whether or not it is connected now; read the session for its connection status. Before the first sync, from the first sync attempt of another linked WhatsApp account until its configuration is synced, and when Polymorfa cannot tell whether the stored configuration belongs to the account linked now, `status` is `unknown` and every value is null. Values come from a linked-device connection: a number that has never had one (Official API only) reports `unknown`, and a number whose linked-device connection was removed keeps the values last synced. A capability reports what WhatsApp allows the number; it does not mean the Polymorfa API offers an operation for that feature. This is a beta: teams that are not enrolled receive 403.

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



## OpenAPI

````yaml api-reference/features/numbers.json GET /platform/sessions/{sessionId}/capabilities
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}/capabilities:
    get:
      tags:
        - Sessions
      summary: Get session capabilities
      description: >-
        Returns which WhatsApp features WhatsApp has enabled for this number,
        and the limits it applies, as of the number's last configuration sync.
        Each value reflects WhatsApp's configuration at `syncedAt`, not a live
        check. Values describe the WhatsApp account last linked to the number,
        whether or not it is connected now; read the session for its connection
        status. Before the first sync, from the first sync attempt of another
        linked WhatsApp account until its configuration is synced, and when
        Polymorfa cannot tell whether the stored configuration belongs to the
        account linked now, `status` is `unknown` and every value is null.
        Values come from a linked-device connection: a number that has never had
        one (Official API only) reports `unknown`, and a number whose
        linked-device connection was removed keeps the values last synced. A
        capability reports what WhatsApp allows the number; it does not mean the
        Polymorfa API offers an operation for that feature. This is a beta:
        teams that are not enrolled receive 403.


        Requires `sessions:read`. Project tokens only access resources in their
        own project.
      operationId: managementGetSessionCapabilities
      parameters:
        - name: sessionId
          in: path
          required: true
          description: |-
            Database session UUID or stable session slug.

            <!-- polymorfa-input-table -->
            **Value constraints**
            | Constraint | Accepted input |
            | --- | --- |
            | String length | `1` through `64` characters |
          schema:
            $ref: '#/components/schemas/management__SessionIdentifier'
      responses:
        '200':
          description: Success
          headers:
            X-Request-Id:
              schema:
                type: string
              description: Stable request correlation identifier.
            X-Trace-Id:
              schema:
                type: string
                pattern: ^[0-9a-f]{32}$
              description: >-
                W3C trace ID of this request. Your `traceparent` trace ID when
                you sent a valid one.
            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__SessionCapabilities'
                    description: Structured data carried by this object.
                required:
                  - data
        '400':
          $ref: '#/components/responses/management__BadRequest'
        '401':
          $ref: '#/components/responses/management__Unauthorized'
        '403':
          $ref: '#/components/responses/management__Forbidden'
        '404':
          $ref: '#/components/responses/management__NotFound'
      security:
        - management__ApiKeyAuth: []
      servers:
        - url: https://api.polymorfa.com
components:
  schemas:
    management__SessionIdentifier:
      type: string
      minLength: 1
      maxLength: 64
      description: Database session UUID or stable session slug.
    management__SessionCapabilities:
      type: object
      additionalProperties: false
      properties:
        session:
          type: string
          description: The session name.
        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` |
        status:
          type: string
          enum:
            - synced
            - unknown
          description: >-
            `synced` when the values reflect WhatsApp's configuration for the
            account last linked to the number. `unknown` before the first sync,
            from the first sync attempt of another linked WhatsApp account until
            its configuration is synced, and when Polymorfa cannot tell whether
            the stored configuration belongs to the account linked now; every
            capability value is then null.


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

            **Allowed values**

            | Value | Meaning |

            | --- | --- |

            | `synced` | Synced. |

            | `unknown` | Unknown. |
        syncedAt:
          type: string
          format: date-time
          nullable: true
          description: >-
            When the configuration the values reflect was last read from
            WhatsApp. Null while `status` is `unknown`.


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

            **Accepted alternatives**

            | Alternative | Accepted input |

            | --- | --- |

            | Alternative 1 | Type: `string`; Format: `date-time` |

            | Alternative 2 | `null` |


            **Value constraints**

            | Constraint | Accepted input |

            | --- | --- |

            | Format | `date-time` |
        checkedAt:
          type: string
          format: date-time
          nullable: true
          description: >-
            When Polymorfa last asked WhatsApp for the number's configuration,
            whether or not anything changed. Null before the first request.


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

            **Accepted alternatives**

            | Alternative | Accepted input |

            | --- | --- |

            | Alternative 1 | Type: `string`; Format: `date-time` |

            | Alternative 2 | `null` |


            **Value constraints**

            | Constraint | Accepted input |

            | --- | --- |

            | Format | `date-time` |
        accountType:
          type: string
          enum:
            - business
            - personal
            - null
          nullable: true
          description: >-
            The WhatsApp account type the values were evaluated for. Null when
            not known.


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

            **Allowed values**

            | Value | Meaning |

            | --- | --- |

            | `business` | Business. |

            | `personal` | Personal. |

            | `null` | Null. |


            **Accepted alternatives**

            | Alternative | Accepted input |

            | --- | --- |

            | Alternative 1 | Type: `string`; Value `business` or `personal` |

            | Alternative 2 | `null` |
        capabilities:
          type: array
          maxItems: 100
          description: >-
            Every capability, always in the same order. Ignore keys your app
            does not recognize; new keys can be added.


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

            **Value constraints**

            | Constraint | Accepted input |

            | --- | --- |

            | Array size | At most `100` items |
          items:
            $ref: '#/components/schemas/management__SessionCapability'
      required:
        - session
        - projectId
        - status
        - syncedAt
        - checkedAt
        - accountType
        - capabilities
    management__SessionCapability:
      type: object
      additionalProperties: false
      properties:
        key:
          type: string
          pattern: ^[a-z][A-Za-z]*(\.[a-z][A-Za-z]*)*$
          maxLength: 64
          description: >-
            Stable capability identifier, for example `channels` or
            `messageEdit.windowSeconds`. A key never changes meaning; new keys
            can be added.


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

            **Value constraints**

            | Constraint | Accepted input |

            | --- | --- |

            | String length | At most `64` characters |

            | Pattern | `^[a-z][A-Za-z]*(\.[a-z][A-Za-z]*)*$` |
        kind:
          type: string
          enum:
            - feature
            - limit
          description: >-
            `feature`: `value` is a boolean. `limit`: `value` is an integer in
            `unit`.


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

            **Allowed values**

            | Value | Meaning |

            | --- | --- |

            | `feature` | Feature. |

            | `limit` | Limit. |
        unit:
          type: string
          enum:
            - seconds
            - count
            - characters
            - members
            - null
          nullable: true
          description: >-
            Unit of a limit. Null for a feature.


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

            **Allowed values**

            | Value | Meaning |

            | --- | --- |

            | `seconds` | Seconds. |

            | `count` | Count. |

            | `characters` | Characters. |

            | `members` | Members. |

            | `null` | Null. |


            **Accepted alternatives**

            | Alternative | Accepted input |

            | --- | --- |

            | Alternative 1 | Type: `string`; Value `seconds` or `count` or
            `characters` or `members` |

            | Alternative 2 | `null` |
        value:
          description: >-
            Boolean for a feature, integer for a limit. Null whenever `status`
            is `unknown`, for a capability that depends on an account type that
            is not known, for a limit whose WhatsApp setting is not a usable
            number, and for a capability Polymorfa can no longer evaluate.


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

            **Accepted alternatives**

            | Alternative | Accepted input |

            | --- | --- |

            | Alternative 1 | Type: `boolean` |

            | Alternative 2 | Type: `integer` |
          anyOf:
            - type: boolean
              nullable: true
            - type: integer
              nullable: true
        source:
          type: string
          enum:
            - server
            - client_default
            - account_type
            - null
          nullable: true
          description: >-
            `server`: every WhatsApp setting the value was evaluated from was
            sent by WhatsApp and used as sent. `client_default`: WhatsApp's own
            default or limit took part, because a setting was not sent or not
            usable, or WhatsApp caps or replaces the value it sent.
            `account_type`: the capability does not apply to this account type.
            Null when `value` is null.


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

            **Allowed values**

            | Value | Meaning |

            | --- | --- |

            | `server` | Server. |

            | `client_default` | Client default. |

            | `account_type` | Account type. |

            | `null` | Null. |


            **Accepted alternatives**

            | Alternative | Accepted input |

            | --- | --- |

            | Alternative 1 | Type: `string`; Value `server` or `client_default`
            or `account_type` |

            | Alternative 2 | `null` |
      required:
        - key
        - kind
        - unit
        - value
        - source
    management__ErrorEnvelope:
      type: object
      required:
        - error
        - data
        - docs
      properties:
        error:
          type: object
          required:
            - type
            - code
            - message
            - param
            - request_id
          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` |
            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` |
          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.
        X-Trace-Id:
          schema:
            type: string
            pattern: ^[0-9a-f]{32}$
          description: >-
            W3C trace ID of this request. Your `traceparent` trace ID when you
            sent a valid one.
        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.
        X-Trace-Id:
          schema:
            type: string
            pattern: ^[0-9a-f]{32}$
          description: >-
            W3C trace ID of this request. Your `traceparent` trace ID when you
            sent a valid one.
        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.
        X-Trace-Id:
          schema:
            type: string
            pattern: ^[0-9a-f]{32}$
          description: >-
            W3C trace ID of this request. Your `traceparent` trace ID when you
            sent a valid one.
        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 team or
        project scope.
      headers:
        X-Request-Id:
          schema:
            type: string
          description: Stable request correlation identifier.
        X-Trace-Id:
          schema:
            type: string
            pattern: ^[0-9a-f]{32}$
          description: >-
            W3C trace ID of this request. Your `traceparent` trace ID when you
            sent a valid one.
        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: >-
        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.