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

# Show best posting times heatmap



## OpenAPI

````yaml /openapi.json get /analytics/best_times
openapi: 3.1.0
info:
  title: PublishBuddy
  version: 0.0.1
servers:
  - url: https://api.publishbuddy.com/v1
security: []
paths:
  /analytics/best_times:
    get:
      tags:
        - BestTimes
      summary: Show best posting times heatmap
      operationId: bestTimes.index
      parameters:
        - name: from
          in: query
          required: true
          description: Start date in Y-m-d or full datetime format.
          schema:
            type: string
            format: date-time
        - name: to
          in: query
          required: true
          description: >-
            End date in Y-m-d or full datetime format. Must be greater than or
            equal to `from`.
          schema:
            type: string
            format: date-time
        - name: profile
          in: query
          description: Profile UUID. Provide either `profile` or `workspace`.
          schema:
            type:
              - string
              - 'null'
            format: uuid
        - name: workspace
          in: query
          description: Workspace UUID. Provide either `workspace` or `profile`.
          schema:
            type:
              - string
              - 'null'
            format: uuid
        - name: Authorization
          in: header
          required: true
          description: JWT token.
          schema:
            type: string
          example: Bearer 123
      responses:
        '200':
          description: '`BestTimesResource`'
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/BestTimesResource'
                required:
                  - data
        '401':
          $ref: '#/components/responses/AuthenticationException'
        '403':
          $ref: '#/components/responses/AuthorizationException'
        '422':
          $ref: '#/components/responses/ValidationException'
components:
  schemas:
    BestTimesResource:
      type: object
      properties:
        heatmap:
          type: object
          properties:
            Sunday:
              anyOf:
                - type: string
                - type: array
                  items: {}
            Monday:
              anyOf:
                - type: string
                - type: array
                  items: {}
            Tuesday:
              anyOf:
                - type: string
                - type: array
                  items: {}
            Wednesday:
              anyOf:
                - type: string
                - type: array
                  items: {}
            Thursday:
              anyOf:
                - type: string
                - type: array
                  items: {}
            Friday:
              anyOf:
                - type: string
                - type: array
                  items: {}
            Saturday:
              anyOf:
                - type: string
                - type: array
                  items: {}
          required:
            - Sunday
            - Monday
            - Tuesday
            - Wednesday
            - Thursday
            - Friday
            - Saturday
      required:
        - heatmap
      title: BestTimesResource
  responses:
    AuthenticationException:
      description: Unauthenticated
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Error overview.
            required:
              - message
    AuthorizationException:
      description: Authorization error
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Error overview.
            required:
              - message
    ValidationException:
      description: Validation error
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Errors overview.
              errors:
                type: object
                description: A detailed description of each field that failed validation.
                additionalProperties:
                  type: array
                  items:
                    type: string
            required:
              - message
              - errors

````