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

# Suggest posting times

> Suggests the weekdays and hours when the company's own published posts did best, per network. It uses only stored numbers: no network calls, no credits.

It reads up to 5,000 posts from the last `days` days (newest first) and groups them by weekday and hour in `time_zone`. Posts without numbers are skipped; a thread counts as one post, at its first part's time. A slot needs 3+ posts to rank, and a network needs 2+ such slots that don't all score the same. Ties go to more posts, then earlier in the week (Sunday first).

Without enough data, `enough_data` is `false` and `missing` says why. To post at these times, create a queue with matching slots (in UTC).

Roles: any member.




## OpenAPI

````yaml /api-reference/openapi.json get /companies/{company_id}/postTimes/suggestions
openapi: 3.1.0
info:
  title: Followr API
  version: 1.0.0
  summary: Publish, schedule and create social media content programmatically.
  description: >
    The Followr REST API gives your code the same engine as the Followr app:
    brands, social accounts, posts and scheduling, the media library, AI
    generation, music and the social inbox.


    Send every request over HTTPS to `https://api.followr.ai/api`, with an API
    key as a Bearer token. Bodies are JSON.
  contact:
    name: Followr Support
    email: hello@followr.ai
    url: https://followr.ai
  termsOfService: https://followr.ai/terms
servers:
  - url: https://api.followr.ai/api
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Users
    description: |
      The person behind an API key. Use `me` as the ID for the key's user.
  - name: Companies
    description: >
      Brands or client workspaces. Each uses the plan of the account that
      created it (`user_id`).
  - name: Team
    description: |
      Company members and their roles: invite, change roles, remove.
  - name: Brand style
    description: >
      How a company's AI pictures look, and the default brand sound for AI
      videos.
  - name: API keys
    description: |
      REST API keys, MCP keys and app sign-ins.
  - name: Social accounts
    description: >
      A social account is a profile, Page or channel a company has connected,
      such as an Instagram professional account or a LinkedIn page. A company
      has at most one per network. Most networks connect by browser sign-in in
      the Followr app; Bluesky and Medium can also connect through this API.
  - name: Pinterest
    description: >
      Every pin is published to a board. List or create boards here, then set
      the board ID on the Pinterest post.
  - name: YouTube
    description: >
      Video categories and playlists of a connected YouTube channel, for YouTube
      posts.
  - name: Canva
    description: >
      Canva connects like a social account (browser sign-in in the app) but
      doesn't publish. List the connected user's designs and export them as
      files for your posts.
  - name: Post groups
    description: >
      One piece of content and its schedule, with one post per network. The
      group decides when; each post decides what.
  - name: Posts
    description: >
      What goes out on one network (text, media, settings) and its publishing
      status.
  - name: Scheduling
    description: |
      Posting-time suggestions from the company's own results.
  - name: Queues
    description: >
      Weekly time slots that publish waiting post groups (Auto-Listing in the
      app). In paths, a queue is a `ruleGroup` and a slot is a `rule`.
  - name: Tags
    description: >
      Labels for post groups. They also decide which queue takes a waiting
      group.
  - name: Assets
    description: >
      An asset is one item in a company's media library: a picture, a video or a
      text. Its picture or video is an attached file (see **Files**). Posts list
      asset IDs in `assets_ids`.
  - name: Folders
    description: >
      Folders organize a company's media library and can be nested. Each asset
      is in one folder at most, or at the top level.
  - name: Files
    description: >
      Upload a picture, video or audio file to an asset, post cover, company
      logo, profile picture, avatar or voice sample. Leave `url` out and `PUT`
      the bytes to the returned `presigned_url` within 10 minutes, or send a
      public `url` for the server to download. No multipart. Full details: `POST
      /assets/{id}/image`.
  - name: Avatars
    description: >
      An avatar is a person shown in your company's videos: a name, a picture, a
      voice and optional scene pictures (the same person in other settings). One
      avatar per company can be the default.
  - name: Voices
    description: >
      A voice is what your company's videos and audio speak with. It points to a
      stock library voice through `platform_external_id` and can hold a sample
      recording. Saving one spends no credits.
  - name: AI generation
    description: >
      Generate text, images, videos and speech. Every generation is an AI
      result. Long ones answer at once with a `pending` result that you poll.
  - name: AI copywriting
    description: >
      Post copy, titles and thread splits for a social network, in the company's
      brand voice.
  - name: AI result groups
    description: >
      Related AI results: a chat conversation, a Creative Studio design or a
      video project.
  - name: Prompts
    description: |
      Saved prompt templates for text or image generation, per social network.
  - name: Video
    description: >
      Video engines and their prices, and video projects: avatar videos and
      short videos the server makes scene by scene, with captions, transitions
      and music.
  - name: Creative Studio
    description: >
      Social media graphics (single creatives, quote cards, carousels and more),
      planned slide by slide from a style preset and drawn as images.
  - name: Music
    description: >
      The catalog and two writing helpers (lyrics, style suggestions). Making
      music needs a plan that includes Music.
  - name: Music styles
    description: |
      A company's saved sounds, reused so its tracks sound like one artist.
  - name: Music tracks
    description: |
      AI songs and instrumentals: generate, poll, master, download.
  - name: Music releases
    description: >
      Singles, EPs and albums with store metadata, a cover, readiness checks and
      a ZIP kit you upload to a distributor yourself.
  - name: Conversations
    description: >
      Direct-message threads between your connected Facebook pages or Instagram
      accounts and people. Only the person can start one.
  - name: Messages
    description: |
      The messages in a conversation: read, reply or remove them.
  - name: Comments
    description: >-
      Comments on your Facebook and Instagram posts, and your team's public
      replies.
  - name: Contacts
    description: >
      People who messaged one of your accounts or commented on its posts, per
      company and network.
  - name: Internal notes
    description: >
      Notes your team and clients leave on a post group, post or library asset,
      for example to approve it. Never published.
  - name: Research
    description: |
      Current news to write about, from Followr's news provider.
  - name: Plan and usage
    description: |
      Plan allowances, usage, and the caps owners set for companies and members.
  - name: Billing
    description: |
      The key's user's invoices, past and upcoming.
  - name: Webhooks
    description: >
      Requests Followr sends to your server when a post is published or fails.
      See the webhooks guide for setup and verification.
paths:
  /companies/{company_id}/postTimes/suggestions:
    get:
      tags:
        - Scheduling
      summary: Suggest posting times
      description: >
        Suggests the weekdays and hours when the company's own published posts
        did best, per network. It uses only stored numbers: no network calls, no
        credits.


        It reads up to 5,000 posts from the last `days` days (newest first) and
        groups them by weekday and hour in `time_zone`. Posts without numbers
        are skipped; a thread counts as one post, at its first part's time. A
        slot needs 3+ posts to rank, and a network needs 2+ such slots that
        don't all score the same. Ties go to more posts, then earlier in the
        week (Sunday first).


        Without enough data, `enough_data` is `false` and `missing` says why. To
        post at these times, create a queue with matching slots (in UTC).


        Roles: any member.
      operationId: suggestPostTimes
      parameters:
        - $ref: '#/components/parameters/CompanyId'
        - name: network
          in: query
          required: false
          description: >-
            Only this network. Without it, every network with posts in the
            period.
          schema:
            type: string
            enum:
              - twitter
              - linkedin
              - facebook
              - instagram
              - threads
              - bluesky
              - tiktok
              - youtube
              - pinterest
              - medium
          example: instagram
        - name: measure
          in: query
          required: false
          description: >
            `engagement`: average likes, comments, shares and saves per post.
            `engagement_rate`: engagement over impressions, in % (not every
            network reports impressions).
          schema:
            type: string
            enum:
              - engagement
              - engagement_rate
            default: engagement
          example: engagement
        - name: days
          in: query
          required: false
          description: Days to look back.
          schema:
            type: integer
            minimum: 7
            maximum: 365
            default: 90
          example: 90
        - name: slots
          in: query
          required: false
          description: Slots per network, best first.
          schema:
            type: integer
            minimum: 1
            maximum: 10
            default: 5
          example: 5
        - name: time_zone
          in: query
          required: false
          description: >
            IANA time zone for weekdays and hours. Default: your time zone, then
            the company owner's, then UTC. `time_zone_from` says which was used.
          schema:
            type: string
          example: Europe/Madrid
      responses:
        '200':
          description: The suggestions.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/PostTimeSuggestions'
              example:
                data:
                  company_id: 1287
                  enough_data: true
                  measure: engagement
                  period:
                    from: '2026-09-03T10:00:00Z'
                    to: '2026-12-02T10:00:00Z'
                    days: 90
                  time_zone: Europe/Madrid
                  time_zone_from: user
                  minimum_posts_per_slot: 3
                  posts_counted: 28
                  networks:
                    - network: linkedin
                      enough_data: true
                      published_posts: 26
                      posts_counted: 24
                      average_engagement: 41.5
                      slots:
                        - slot: tuesday 09:00
                          weekday: tuesday
                          hour: 9
                          posts: 5
                          average_engagement: 88.4
                          median_engagement: 79
                        - slot: thursday 17:00
                          weekday: thursday
                          hour: 17
                          posts: 4
                          average_engagement: 52.25
                          median_engagement: 50.5
                      slots_below_minimum: 9
                      stored_numbers:
                        oldest_read_at: '2026-11-20T06:12:44Z'
                        newest_read_at: '2026-12-01T22:40:03Z'
                        posts_due_for_refresh: 3
                    - network: instagram
                      enough_data: false
                      missing: >-
                        Only 4 published posts with numbers in the period: only
                        one weekday and hour has the 3 posts it takes to rank
                        one, so there is nothing to compare it with.
                      published_posts: 12
                      posts_counted: 4
                      average_engagement: 120.25
                      slots: []
                      slots_below_minimum: 1
                      stored_numbers:
                        oldest_read_at: '2026-11-28T08:00:12Z'
                        newest_read_at: '2026-12-01T21:15:40Z'
                  basis: >-
                    Only this company's own published posts with stored numbers.
                    Evidence of what worked for it, not general advice.
                  posts_due_for_refresh: 3
                  capped_at: null
        '401':
          $ref: '#/components/responses/Unauthenticated'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '422':
          $ref: '#/components/responses/ValidationFailed'
        '429':
          $ref: '#/components/responses/TooManyRequests'
components:
  parameters:
    CompanyId:
      name: company_id
      in: path
      required: true
      description: The ID of the company (brand) the resource belongs to.
      schema:
        type: integer
        minimum: 1
      example: 1287
  schemas:
    PostTimeSuggestions:
      type: object
      description: When the company's own posts did best, per network.
      properties:
        company_id:
          type: integer
          description: The company's ID.
          example: 1287
        enough_data:
          type: boolean
          description: '`true` when at least one network has a ranking.'
          example: true
        missing:
          type: string
          description: Only when `enough_data` is `false`. Why, as a sentence you can show.
          example: No posts were published in the last 90 days.
        measure:
          type: string
          enum:
            - engagement
            - engagement_rate
          description: The ranking measure.
          example: engagement
        period:
          type: object
          description: The window read.
          properties:
            from:
              type: string
              format: date-time
              description: Window start (UTC).
              example: '2026-09-03T10:00:00Z'
            to:
              type: string
              format: date-time
              description: Window end (UTC).
              example: '2026-12-02T10:00:00Z'
            days:
              type: integer
              description: Length in days.
              example: 90
        time_zone:
          type: string
          description: Time zone of the weekdays and hours.
          example: Europe/Madrid
        time_zone_from:
          type: string
          enum:
            - argument
            - user
            - company_owner
            - default
          description: >-
            Where the time zone came from. `default` means UTC (no other usable
            zone).
          example: user
        minimum_posts_per_slot:
          type: integer
          description: Posts a weekday and hour needs to be ranked.
          example: 3
        posts_counted:
          type: integer
          description: Posts with the measure, all networks.
          example: 28
        networks:
          type: array
          description: >-
            One block per network, in a fixed order (X, LinkedIn, Facebook,
            Instagram, Threads, Bluesky, TikTok, YouTube, Pinterest, Medium).
          items:
            $ref: '#/components/schemas/PostTimeNetwork'
        basis:
          type: string
          description: What the suggestion is based on, as a sentence you can show.
          example: >-
            Only this company's own published posts with stored numbers.
            Evidence of what worked for it, not general advice.
        posts_due_for_refresh:
          type: integer
          description: >-
            Published posts in the period whose numbers are missing or due for a
            refresh. This endpoint never fetches new numbers.
          example: 3
        capped_at:
          type:
            - integer
            - 'null'
          description: >-
            The cap (5,000) when the company had more posts in the period;
            `null` when all were read.
          example: null
    PostTimeNetwork:
      type: object
      description: >
        One network's ranking, or why there is none. The average is in
        `average_engagement` or `engagement_rate`, depending on `measure`.
      properties:
        network:
          type: string
          description: The network.
          example: linkedin
        enough_data:
          type: boolean
          description: '`true` when this network has a ranking.'
          example: true
        missing:
          type: string
          description: Only when `enough_data` is `false`. Why, as a sentence you can show.
          example: No posts were published on this network in the period.
        published_posts:
          type: integer
          description: Posts published here in the period (a thread counts once).
          example: 26
        posts_counted:
          type: integer
          description: Of those, posts with the measure.
          example: 24
        average_engagement:
          type:
            - number
            - 'null'
          description: >-
            With `engagement`. Average engagement per counted post, to compare
            slots with.
          example: 41.5
        engagement_rate:
          type:
            - number
            - 'null'
          description: >-
            With `engagement_rate`. Engagement over impressions of all counted
            posts, as a percentage.
          example: 3.42
        slots:
          type: array
          description: >-
            Best slots first, up to `slots`. Empty when `enough_data` is
            `false`.
          items:
            $ref: '#/components/schemas/PostTimeSlot'
        slots_below_minimum:
          type: integer
          description: Weekdays and hours with posts, but too few to rank.
          example: 9
        stored_numbers:
          type: object
          description: How fresh the numbers are. Left out when there are none.
          properties:
            oldest_read_at:
              type: string
              format: date-time
              description: When the oldest number used was read.
              example: '2026-11-20T06:12:44Z'
            newest_read_at:
              type: string
              format: date-time
              description: When the newest was read.
              example: '2026-12-01T22:40:03Z'
            posts_due_for_refresh:
              type: integer
              description: >-
                Posts here whose numbers are missing or due for a refresh. Left
                out when none.
              example: 3
    Error:
      type: object
      description: The body of every error response except validation errors.
      required:
        - message
      properties:
        message:
          type: string
          description: A human-readable explanation. Don't parse it; it may change.
          example: This action is unauthorized.
    ValidationError:
      type: object
      description: Returned with `422 Unprocessable Content` when the request isn't valid.
      required:
        - message
        - errors
      properties:
        message:
          type: string
          description: The first error, followed by a count of the others.
          example: The name field is required. (and 1 more error)
        errors:
          type: object
          description: >-
            Every invalid field, keyed by its path in the request
            (`rows.0.content` for nested fields), with one or more messages.
          additionalProperties:
            type: array
            items:
              type: string
          example:
            name:
              - The name field is required.
            publish_at:
              - The publish at field must be a valid date.
    PostTimeSlot:
      type: object
      description: >
        One weekday and hour, in the response's `time_zone`. Values are in
        `average_engagement` and `median_engagement`, or `engagement_rate` and
        `median_engagement_rate`, depending on `measure`.
      properties:
        slot:
          type: string
          description: Weekday and hour as one label.
          example: tuesday 09:00
        weekday:
          type: string
          enum:
            - sunday
            - monday
            - tuesday
            - wednesday
            - thursday
            - friday
            - saturday
          description: The weekday.
          example: tuesday
        hour:
          type: integer
          minimum: 0
          maximum: 23
          description: The hour of the day.
          example: 9
        posts:
          type: integer
          description: Posts published in this slot.
          example: 5
        average_engagement:
          type: number
          description: With `engagement`. Average engagement of the slot's posts.
          example: 88.4
        median_engagement:
          type: number
          description: >-
            With `engagement`. The middle post's engagement. Far below the
            average means one post carries the slot.
          example: 79
        engagement_rate:
          type:
            - number
            - 'null'
          description: >-
            With `engagement_rate`. Slot engagement over impressions, as a
            percentage.
          example: 4.12
        median_engagement_rate:
          type: number
          description: With `engagement_rate`. The middle post's rate.
          example: 3.8
  responses:
    Unauthenticated:
      description: The API key is missing, malformed, expired or revoked.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            missing:
              summary: No valid key
              value:
                message: Unauthenticated.
            revoked:
              summary: Revoked key
              value:
                message: Token revoked
    Forbidden:
      description: >-
        The key is valid, but its user may not do this (their role doesn't allow
        it, or the account is suspended).
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            message: This action is unauthorized.
    NotFound:
      description: No resource with this ID, or it was deleted.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            message: No query results for model [App\Models\PostGroup] 99999999
    ValidationFailed:
      description: One or more fields are invalid.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ValidationError'
    TooManyRequests:
      description: Too many requests in the last minute. Wait `Retry-After` seconds.
      headers:
        Retry-After:
          $ref: '#/components/headers/Retry-After'
        X-RateLimit-Limit:
          $ref: '#/components/headers/X-RateLimit-Limit'
        X-RateLimit-Remaining:
          $ref: '#/components/headers/X-RateLimit-Remaining'
        X-RateLimit-Reset:
          $ref: '#/components/headers/X-RateLimit-Reset'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            message: Too Many Attempts.
  headers:
    Retry-After:
      description: Seconds to wait before retrying.
      schema:
        type: integer
        example: 42
    X-RateLimit-Limit:
      description: Requests allowed per minute for the key's user.
      schema:
        type: integer
        example: 200
    X-RateLimit-Remaining:
      description: Requests left in the current one-minute window.
      schema:
        type: integer
        example: 0
    X-RateLimit-Reset:
      description: Unix timestamp (seconds) when the current window resets.
      schema:
        type: integer
        example: 1764672060
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API key
      description: >
        Send your API key in the `Authorization` header:


        ```

        Authorization: Bearer YOUR_API_KEY

        ```


        Create keys in the Followr app under **Settings > API keys**. A key acts
        as its user, with that user's role in each company.

````

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