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

# Check the 24-hour messaging window

> Check whether you can send free-form text to a contact now, inside the 24-hour WhatsApp messaging window, and whether they opted out.



## OpenAPI

````yaml /api-reference/openapi.json get /v1/messaging-window
openapi: 3.0.0
info:
  title: Flowella REST API
  version: 2.1.0
  description: >-
    Public v1 HTTP API for Flowella. Authenticate with `Authorization: Bearer
    <api_key>` (`flo_` prefix) or an OAuth access token (`fla_` prefix).
    Canonical base: `https://api.flowella.io/v1`. Legacy
    `https://app.flowella.io/api/v1/...` requests are permanently redirected
    (308) to the canonical host, preserving method and body.
servers:
  - url: https://api.flowella.io
    description: Canonical API host
  - url: https://app.flowella.io
    description: Legacy app host — /api/v1 permanently redirects (308) to the API host /v1
security: []
tags:
  - name: System
    description: Health and auth checks
  - name: Account
    description: Credential and organisation details
  - name: Messages
    description: Send WhatsApp messages
  - name: Conversations
    description: Inbox conversations
  - name: Contacts
    description: CRM contacts
  - name: Templates
    description: WhatsApp templates and bulk send
  - name: Analytics
    description: Usage and delivery metrics
paths:
  /v1/messaging-window:
    get:
      tags:
        - Conversations
      summary: Check the 24-hour messaging window
      description: >-
        Checks whether a free-form text can be sent to a contact now. WhatsApp
        only allows free-form messages within 24 hours of the contact's last
        message; outside that window send an approved template with POST
        /v1/templates/send. Pass phone or contactId. Also reports opt-outs.
      operationId: v1GetMessagingWindow
      parameters:
        - schema:
            type: string
            minLength: 3
            maxLength: 32
            description: Contact phone in any common format. Pass phone or contactId.
          required: false
          description: Contact phone in any common format. Pass phone or contactId.
          name: phone
          in: query
        - schema:
            type: string
            minLength: 1
            maxLength: 128
            description: Contact id from the contacts tools. Pass phone or contactId.
          required: false
          description: Contact id from the contacts tools. Pass phone or contactId.
          name: contactId
          in: query
        - schema:
            type: string
            minLength: 1
            maxLength: 128
            description: >-
              WhatsApp channel to check. Omit to use the organization's default
              number.
          required: false
          description: >-
            WhatsApp channel to check. Omit to use the organization's default
            number.
          name: whatsappChannelId
          in: query
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  open:
                    type: boolean
                    description: True while inside 24 hours of the contact's last message.
                  canSendFreeform:
                    type: boolean
                    description: >-
                      True when a free-form text can be sent now: the window is
                      open and the contact has not opted out.
                  reason:
                    type: string
                    enum:
                      - OPEN
                      - NO_INBOUND
                      - EXPIRED
                      - OPTED_OUT
                      - NO_CONTACT
                  closesAt:
                    type: string
                    nullable: true
                  lastInboundAt:
                    type: string
                    nullable: true
                  contactId:
                    type: string
                    nullable: true
                  conversationId:
                    type: string
                    nullable: true
                  whatsappChannelId:
                    type: string
                  optedOut:
                    type: boolean
                required:
                  - open
                  - canSendFreeform
                  - reason
                  - closesAt
                  - lastInboundAt
                  - contactId
                  - conversationId
                  - whatsappChannelId
                  - optedOut
                example:
                  open: true
                  canSendFreeform: true
                  reason: OPEN
                  closesAt: '2026-11-21T02:00:00.000Z'
                  lastInboundAt: '2026-11-20T02:00:00.000Z'
                  contactId: clxxxxxxxxxxxxxxxxxxxxxxxx
                  conversationId: clxxxxxxxxxxxxxxxxxxxxxxxx
                  whatsappChannelId: clxxxxxxxxxxxxxxxxxxxxxxxx
                  optedOut: false
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      requestId:
                        type: string
                      details:
                        nullable: true
                    required:
                      - code
                      - message
                required:
                  - error
                description: >-
                  Machine codes include INVALID_TEMPLATE_NAME and
                  INVALID_TEMPLATE_COMPONENTS. requestId is copied from
                  X-Request-Id when present.
                example:
                  error:
                    code: INVALID_TEMPLATE_COMPONENTS
                    message: INVALID_TEMPLATE_COMPONENTS
                    requestId: req_019abc
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      requestId:
                        type: string
                      details:
                        nullable: true
                    required:
                      - code
                      - message
                required:
                  - error
                description: >-
                  Machine codes include INVALID_TEMPLATE_NAME and
                  INVALID_TEMPLATE_COMPONENTS. requestId is copied from
                  X-Request-Id when present.
                example:
                  error:
                    code: INVALID_TEMPLATE_COMPONENTS
                    message: INVALID_TEMPLATE_COMPONENTS
                    requestId: req_019abc
        '404':
          description: Contact or channel not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      requestId:
                        type: string
                      details:
                        nullable: true
                    required:
                      - code
                      - message
                required:
                  - error
                description: >-
                  Machine codes include INVALID_TEMPLATE_NAME and
                  INVALID_TEMPLATE_COMPONENTS. requestId is copied from
                  X-Request-Id when present.
                example:
                  error:
                    code: INVALID_TEMPLATE_COMPONENTS
                    message: INVALID_TEMPLATE_COMPONENTS
                    requestId: req_019abc
      security:
        - bearerAuth: []
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API key
      description: >-
        Organization API key (`flo_…`) or OAuth access token (`fla_…`). Paste
        the full token; Scalar sends `Authorization: Bearer <token>`.

````

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