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

# Check if a phone number is callable at a given time

> Checks if a phone number is callable at a specific timestamp by:
1. Taking a UTC Unix timestamp
2. Converting it to the business hours timezone (from BusinessHours table)
3. Checking if the local time falls within the business hours for that day




## OpenAPI

````yaml /openapi-specs/brainbase-openapi.documented.json post /api/workers/check-callable
openapi: 3.0.0
info:
  title: Brainbase REST API
  version: 1.0.3
  description: API documentation for Brainbase REST API
servers:
  - url: https://brainbase-monorepo-api.onrender.com
    description: Production server
security:
  - ApiKeyAuth: []
tags:
  - name: Team
    description: Endpoints related to team functionalities
  - name: Integrations
    description: Endpoints for integrations
  - name: Assets
    description: Endpoints for asset management
  - name: Workers
    description: Endpoints for worker operations
  - name: Flows
    description: Endpoints for flow management
  - name: Voice Deployments
    description: Endpoints for voice deployments
  - name: Voice V1 Deployments
    description: Endpoints for voice v1 deployments
  - name: Voice Deployment Logs
    description: Endpoints for voice deployment logs
  - name: Voice Deployment Outbound Data
    description: Endpoints for voice deployment outbound data
  - name: Chat Deployments
    description: Endpoints for chat deployments
  - name: Chat Deployment Logs
    description: Endpoints for chat deployment logs
  - name: Tags
    description: Endpoints for tag management and worker tag assignment
  - name: Echo
    description: Endpoints for Echo test suites, agents, and scorecards
  - name: Flow Versions
    description: Endpoints for flow version control
  - name: Deployment History
    description: Endpoints for deployment change history
  - name: Deployment Parameters
    description: Endpoints for deployment parameters
  - name: Log Exports
    description: Endpoints for async log export to CSV/JSON
  - name: Logs
    description: >-
      Universal log lookup — fetch any deployment log by ID without needing
      worker or deployment context
  - name: Deployments
    description: >-
      Universal deployment lookup — fetch any deployment by ID without needing
      worker context
paths:
  /api/workers/check-callable:
    post:
      tags:
        - BusinessHours
      summary: Check if a phone number is callable at a given time
      description: >
        Checks if a phone number is callable at a specific timestamp by:

        1. Taking a UTC Unix timestamp

        2. Converting it to the business hours timezone (from BusinessHours
        table)

        3. Checking if the local time falls within the business hours for that
        day
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - phoneNumber
                - timestamp
              properties:
                phoneNumber:
                  type: string
                  description: >-
                    The phone number to check (accepts any format - will be
                    normalized)
                  example: +1 (954) 580-2181
                timestamp:
                  type: number
                  description: >-
                    Unix timestamp in seconds (UTC). Will be converted to the
                    business hours timezone.
                  example: 1730822400
      responses:
        '200':
          description: Callable status
          content:
            application/json:
              schema:
                type: object
                properties:
                  callable:
                    type: boolean
                    description: Whether the phone number is callable at the given time
        '401':
          description: Unauthorized
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import BrainbaseLabs from 'brainbase-labs';

            const client = new BrainbaseLabs({
              apiKey: process.env['BRAINBASE_LABS_API_KEY'], // This is the default and can be omitted
            });

            const response = await client.workers.checkCallable({
              phoneNumber: '+1 (954) 580-2181',
              timestamp: 1730822400,
            });

            console.log(response.callable);
        - lang: Python
          source: |-
            import os
            from brainbase_labs import BrainbaseLabs

            client = BrainbaseLabs(
                api_key=os.environ.get("BRAINBASE_LABS_API_KEY"),  # This is the default and can be omitted
            )
            response = client.workers.check_callable(
                phone_number="+1 (954) 580-2181",
                timestamp=1730822400,
            )
            print(response.callable)
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: API key authentication

````