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

# Get organization

> Returns the user's organization, including all members.



## OpenAPI

````yaml /public/api.json get /organizations
openapi: 3.1.0
info:
  title: PostFlow
  version: '1'
  description: >-
    The PostFlow API gives you access to analytics data from your PostFlow
    organization and provides you with tools for scheduling and publishing
    social media posts directly from your own application, automation tool, or
    AI assistant.


    ### What is PostFlow?

    PostFlow is a social media management platform designed to help teams and
    creators plan, collaborate, and publish social media content.


    ### Base URL

    The base URL for the PostFlow API is:


    ```http

    https://api.postflow.app/v1

    ```


    For media requests use base URL:

    ```http

    https://media.postflow.app/api/v1

    ```



    ### Authentication

    All API requests require a bearer token in the Authorization header.


    You can generate an API token from your [PostFlow account
    settings](https://new.postflow.app/settings/account/api). Once you have your
    token, include it in the Authorization header of your API requests as
    follows:



    ```http

    Authorization: Bearer YOUR_API_TOKEN

    ```



    ### Headers


    API requests must include the following headers:


    ```http

    Accept: application/json

    Content-Type: application/json

    ```


    ### Make your first request

    Once you have a token, you can make requests directly to the API. The
    following example returns basic information about your organization:


    ```bash

    curl https://api.postflow.app/v1/organizations \
      -H "Authorization: Bearer YOUR_API_TOKEN" \
      -H "Accept: application/json"
    ```


    ## Rate limits


    The PostFlow API implements rate limiting to ensure fair usage and protect
    against abuse. The default limit is **60 requests per minute** per
    authenticated user.


    Each API response includes the following headers with information about your
    current rate limit status:


    - `X-RateLimit-Limit` - maximum number of requests allowed per minute

    - `X-RateLimit-Remaining` - number of requests remaining in the current
    window

    - `X-RateLimit-Reset` - Unix timestamp when the rate limit resets


    ## PostFlow IDs


    Every object in the PostFlow API has a unique ID. PostFlow uses a system
    called "Snowflake ID" created by Twitter.


    These IDs are **64-bit unsigned integers**. Some programming languages
    (JavaScript) cannot accurately represent 64-bit integers.


    > **Warning:** You must **ALWAYS** use strings for PostFlow IDs in your
    code.



    ### String vs integer in Javascript


    In JavaScript, integers are limited to 53 bits. This causes precision loss
    with large IDs:


    ```javascript

    // This loses precision!

    const id = 10765432100123456789;

    console.log(id.toString()); // "10765432100123458000" — wrong!


    // Use strings instead

    const id = "10765432100123456789";

    console.log(id); // "10765432100123456789" — correct!

    ```


    ### Comparing IDs


    Examples of how you can compare PostFlow IDs:



    ```javascript javascript

    // Use BigInt


    if (BigInt(post1.id) > BigInt(post2.id)) {
        console.log("post1 is newer");
    }

    ```


    ```python python

    # Python handles large integers natively


    if post1.id > post2.id:
        print("post1 is newer")
    ```


    ```php php

    # PHP is safe with 64-bit integers


    if (post1->id > post2->id) {
        dd("post1 is newer");
    }

    ```


    ## Relationships & includes


    Some endpoints support the `include` query parameter to enrich the response
    with related resources. Pass a comma-separated list of relationship names to
    load them alongside the primary data.


    ```http

    GET /posts?include=media

    ```


    Multiple relationships can be included by separating them with a comma:


    ```http

    GET /posts?include=media,labels,postComments

    ```


    ## OpenAPI collection


    The raw OpenAPI specifications for the PostFlow API are available below.
    They can be used with various API tools and code generators that support the
    OpenAPI format.


    - [PostFlow API](https://postflow.app/docs/public/api.json)

    - [Media API](https://postflow.app/docs/public/media.json)


    > You can copy the above URLs to import them into API tools such as Postman.
servers:
  - url: https://api.postflow.app/v1
security:
  - http: []
tags:
  - name: User
  - name: Organization
  - name: Social accounts
  - name: Posts
  - name: Posts bulk
  - name: Post activities
  - name: Post metrics
  - name: Analytics
  - name: Widgets
  - name: Calendar notes
  - name: Groups
  - name: Labels
paths:
  /organizations:
    get:
      tags:
        - Organization
      summary: Get organization
      description: Returns the user's organization, including all members.
      operationId: organization.index
      responses:
        '200':
          description: '`OrganizationData`'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrganizationData'
        '401':
          $ref: '#/components/responses/AuthenticationException'
        '403':
          $ref: '#/components/responses/AuthorizationException'
components:
  schemas:
    OrganizationData:
      type: object
      properties:
        id:
          type: string
        owner_id:
          type: string
          description: The ID of the user who created the organization
        name:
          type: string
        approval_workflow:
          $ref: '#/components/schemas/ApprovalWorkflow'
        guest_can_approve:
          type: boolean
          description: >-
            Guests can approve a post using an external public link. Only for
            Loose approval workflow
        avatar:
          type:
            - string
            - 'null'
          description: URL to the profile image of the organization
        timezone:
          type:
            - string
            - 'null'
        default_group_id:
          type: string
        two_factor_required:
          type: boolean
          description: >-
            All organization members are required to set up two-factor
            authentication
        default_notify_assignee:
          type: boolean
          description: Send approval requests by default
        lock_approved_posts:
          type: boolean
          description: Changes made after approval will require new approval again
        hide_drafts_for_clients:
          type: boolean
          description: Hide draft posts from client users across all groups
        external_sync_enabled:
          type: boolean
          description: >-
            Automatically sync posts that were published on connected accounts
            outside of PostFlow
        created_at:
          type:
            - string
            - 'null'
          format: date-time
          description: The date the organization was created in PostFlow
        socialAccountsLeft:
          type: integer
          description: >-
            The number of social media accounts that can be connected based on
            the current subscription
        totalConnectedSocialAccounts:
          type: integer
          description: The total number of currently connected social accounts
        subscriptionPlan:
          anyOf:
            - $ref: '#/components/schemas/SubscriptionPlan'
              description: Current subscription plan of the organization
            - type: 'null'
        users:
          type: array
          description: |-
            List of users in the organization.

            Data on request, you must add `users` to the `include` parameter
          items:
            $ref: '#/components/schemas/UserData'
        default_fb_post_type:
          anyOf:
            - $ref: '#/components/schemas/FacebookPostType'
              description: >-
                This post type will be preselected when you create a new post


                `1` Feed <br/> `2` Reel <br/> `3` Story <br/> `4` Carousel <br/>
                `5` PageCover
            - type: 'null'
        default_ig_post_type:
          anyOf:
            - $ref: '#/components/schemas/InstagramPostType'
            - type: 'null'
        default_li_post_type:
          anyOf:
            - $ref: '#/components/schemas/LinkedInPostType'
            - type: 'null'
        default_tt_post_type:
          anyOf:
            - $ref: '#/components/schemas/TikTokPostType'
            - type: 'null'
        default_gb_post_type:
          anyOf:
            - $ref: '#/components/schemas/GoogleBusinessPostType'
            - type: 'null'
        default_yt_post_type:
          anyOf:
            - $ref: '#/components/schemas/YouTubePostType'
            - type: 'null'
        default_tw_post_type:
          anyOf:
            - $ref: '#/components/schemas/TwitterPostType'
            - type: 'null'
        default_th_post_type:
          anyOf:
            - $ref: '#/components/schemas/ThreadsPostType'
            - type: 'null'
      required:
        - id
        - owner_id
        - name
        - approval_workflow
        - guest_can_approve
        - avatar
        - timezone
        - default_group_id
        - two_factor_required
        - default_notify_assignee
        - lock_approved_posts
        - hide_drafts_for_clients
        - external_sync_enabled
        - created_at
        - socialAccountsLeft
        - totalConnectedSocialAccounts
        - subscriptionPlan
        - default_fb_post_type
        - default_ig_post_type
        - default_li_post_type
        - default_tt_post_type
        - default_gb_post_type
        - default_yt_post_type
        - default_tw_post_type
        - default_th_post_type
      title: OrganizationData
    ApprovalWorkflow:
      type: integer
      enum:
        - 0
        - 1
        - 2
      x-enum-varnames:
        - None
        - Loose
        - Strict
      description: '`0` None <br/> `1` Loose <br/> `2` Strict'
      title: ApprovalWorkflow
    SubscriptionPlan:
      type: string
      enum:
        - solo
        - brand
        - business
        - agency
        - advanced
      x-enum-varnames:
        - Solo
        - Brand
        - Business
        - Agency
        - Advanced
      title: SubscriptionPlan
    UserData:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        email:
          type: string
        phone:
          type:
            - string
            - 'null'
        inviter_id:
          type:
            - string
            - 'null'
          description: The ID of the user who invited the user to the organization
        organization_id:
          type: string
        role:
          $ref: '#/components/schemas/UserRole'
        is_client:
          type: boolean
        can_approve:
          type: boolean
          description: Determines whether the user can approve posts
        can_connect_account:
          type: boolean
          description: >-
            Determines whether the user can connect social media accounts to the
            organization
        can_access_all_groups:
          type: boolean
          description: >-
            Determines whether the user has permissions to all groups in the
            organization. If not, check the permissions for the individual
            groups in `groupIds`
        self_approval:
          type: boolean
          description: >-
            Automatically grant your approval when you assign yourself as the
            assignee
        time_format_24:
          type: boolean
          description: The user's preferred time format
        week_start_day:
          $ref: '#/components/schemas/WeekDay'
          description: >-
            The user's preferred start of the calendar week


            `0` Sunday <br/> `1` Monday <br/> `2` Tuesday <br/> `3` Wednesday
            <br/> `4` Thursday <br/> `5` Friday <br/> `6` Saturday
        date_format:
          $ref: '#/components/schemas/DateFormat'
          description: |-
            The user's preferred date format

            `1` DMY <br/> `2` MDY <br/> `3` YMD
        color:
          $ref: '#/components/schemas/BaseColor'
        avatar:
          type:
            - string
            - 'null'
          description: URL to the profile image of the user
        invited_at:
          type:
            - string
            - 'null'
          format: date-time
          description: The date the user was invited to join the organization
        created_at:
          type: string
          format: date-time
          description: The date the user signed up
        open_cu_links_in_app:
          type: boolean
          description: >-
            The user's preference for how to open ClickUp links, in the app or
            in a browser
          default: false
        groupIds:
          type: array
          description: >-
            The IDs of the groups the user has access to. Always check
            `can_access_all_groups` first to see if the user has access to all
            groups.


            If the user has permissions to all groups, this value will be an
            empty array
          default: []
          items:
            type: string
      required:
        - id
        - name
        - email
        - phone
        - inviter_id
        - organization_id
        - role
        - is_client
        - can_approve
        - can_connect_account
        - can_access_all_groups
        - self_approval
        - time_format_24
        - week_start_day
        - date_format
        - color
        - avatar
        - invited_at
        - created_at
        - open_cu_links_in_app
        - groupIds
      title: UserData
    FacebookPostType:
      type: integer
      enum:
        - 1
        - 2
        - 3
        - 4
        - 5
      x-enum-varnames:
        - Feed
        - Reel
        - Story
        - Carousel
        - PageCover
      description: >-
        `1` Feed <br/> `2` Reel <br/> `3` Story <br/> `4` Carousel <br/> `5`
        PageCover
      title: FacebookPostType
    InstagramPostType:
      type: integer
      enum:
        - 1
        - 2
        - 3
      x-enum-varnames:
        - Feed
        - Reel
        - Story
      description: '`1` Feed <br/> `2` Reel <br/> `3` Story'
      title: InstagramPostType
    LinkedInPostType:
      type: integer
      enum:
        - 1
        - 2
        - 3
      x-enum-varnames:
        - Normal
        - Poll
        - Carousel
      description: '`1` Normal <br/> `2` Poll <br/> `3` Carousel'
      title: LinkedInPostType
    TikTokPostType:
      type: integer
      enum:
        - 1
        - 2
      x-enum-varnames:
        - Video
        - ImageCarousel
      description: '`1` Video <br/> `2` ImageCarousel'
      title: TikTokPostType
    GoogleBusinessPostType:
      type: integer
      enum:
        - 1
        - 2
        - 3
      x-enum-varnames:
        - Standard
        - Event
        - Offer
      description: '`1` Standard <br/> `2` Event <br/> `3` Offer'
      title: GoogleBusinessPostType
    YouTubePostType:
      type: integer
      enum:
        - 1
        - 2
      x-enum-varnames:
        - Video
        - Shorts
      description: '`1` Video <br/> `2` Shorts'
      title: YouTubePostType
    TwitterPostType:
      type: integer
      enum:
        - 1
        - 2
      x-enum-varnames:
        - Normal
        - Poll
      description: '`1` Normal <br/> `2` Poll'
      title: TwitterPostType
    ThreadsPostType:
      type: integer
      enum:
        - 1
        - 2
      x-enum-varnames:
        - Normal
        - Poll
      description: '`1` Normal <br/> `2` Poll'
      title: ThreadsPostType
    UserRole:
      type: string
      enum:
        - owner
        - manager
        - member
        - viewer
      x-enum-varnames:
        - Owner
        - Manager
        - Member
        - Viewer
      title: UserRole
    WeekDay:
      type: integer
      enum:
        - 0
        - 1
        - 2
        - 3
        - 4
        - 5
        - 6
      x-enum-varnames:
        - Sunday
        - Monday
        - Tuesday
        - Wednesday
        - Thursday
        - Friday
        - Saturday
      description: >-
        `0` Sunday <br/> `1` Monday <br/> `2` Tuesday <br/> `3` Wednesday <br/>
        `4` Thursday <br/> `5` Friday <br/> `6` Saturday
      title: WeekDay
    DateFormat:
      type: integer
      enum:
        - 1
        - 2
        - 3
      x-enum-varnames:
        - DMY
        - MDY
        - YMD
      description: '`1` DMY <br/> `2` MDY <br/> `3` YMD'
      title: DateFormat
    BaseColor:
      type: integer
      enum:
        - 1
        - 2
        - 3
        - 4
        - 5
        - 6
        - 7
        - 8
        - 9
      x-enum-varnames:
        - Red
        - Green
        - Blue
        - Yellow
        - Orange
        - Pink
        - Purple
        - Sky
        - Gray
      description: >-
        `1` Red <br/> `2` Green <br/> `3` Blue <br/> `4` Yellow <br/> `5` Orange
        <br/> `6` Pink <br/> `7` Purple <br/> `8` Sky <br/> `9` Gray
      title: BaseColor
  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
  securitySchemes:
    http:
      type: http
      scheme: bearer

````