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

# Create new business hours



## OpenAPI

````yaml /openapi-specs/brainbase-openapi.documented.json post /api/workers/business-hours
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/business-hours:
    post:
      tags:
        - BusinessHours
      summary: Create new business hours
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateBusinessHoursRequest'
      responses:
        '201':
          description: Business hours created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BusinessHours'
        '400':
          description: Bad Request
        '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 businessHour = await client.workers.businessHours.create({
            hours: { foo: 'string' } });


            console.log(businessHour.id);
        - 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
            )
            business_hour = client.workers.business_hours.create(
                hours={
                    "foo": "string"
                },
            )
            print(business_hour.id)
components:
  schemas:
    CreateBusinessHoursRequest:
      type: object
      properties:
        hours:
          type: object
          additionalProperties:
            type: string
          description: JSON object containing business hours configuration
        timezone:
          type: string
          description: >-
            Timezone for the business hours (e.g., 'America/New_York', 'UTC',
            'Europe/London')
        primaryTag:
          type: string
          description: Primary tag for categorization (e.g., business name, location)
        secondaryTag:
          type: string
          description: Secondary tag for categorization (e.g., department, type)
      required:
        - hours
    BusinessHours:
      type: object
      properties:
        id:
          type: string
          nullable: false
        hours:
          type: object
          nullable: false
        timezone:
          type: string
          nullable: false
        primaryTag:
          type: string
          nullable: true
        secondaryTag:
          type: string
          nullable: true
        createdAt:
          type: string
          nullable: false
          format: date-time
        updatedAt:
          type: string
          nullable: false
          format: date-time
      required:
        - id
        - hours
        - timezone
        - createdAt
        - updatedAt
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: API key authentication

````