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

# Update group

> Updates an existing group. \n\nThis is a PUT request, all fields must be included in the request body.



## OpenAPI

````yaml /public/api.json put /groups/{group}
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:
  /groups/{group}:
    put:
      tags:
        - Groups
      summary: Update group
      description: >-
        Updates an existing group. \n\nThis is a PUT request, all fields must be
        included in the request body.
      operationId: group.update
      parameters:
        - name: group
          in: path
          required: true
          description: The group ID
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateGroupRequest'
      responses:
        '200':
          description: '`GroupData`'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GroupData'
        '400':
          $ref: '#/components/responses/GeneralJsonException'
        '401':
          $ref: '#/components/responses/AuthenticationException'
        '403':
          $ref: '#/components/responses/AuthorizationException'
        '404':
          $ref: '#/components/responses/ModelNotFoundException'
        '422':
          $ref: '#/components/responses/ValidationException'
components:
  schemas:
    UpdateGroupRequest:
      type: object
      properties:
        name:
          type: string
          maxLength: 50
        type:
          $ref: '#/components/schemas/GroupType'
        timezone:
          type: string
          description: Must be a valid timezone
          example: Europe/Prague
        week_start_day:
          $ref: '#/components/schemas/WeekDay'
        note:
          type:
            - string
            - 'null'
          maxLength: 500
        country:
          type:
            - string
            - 'null'
        max_social_accounts:
          type:
            - number
            - 'null'
          description: Limit the max number of accounts in this group.
          minimum: 1
        default_everyone_must_approve:
          type: boolean
          description: Does not apply for API.
        default_assignee_ids:
          type:
            - array
            - 'null'
          description: >-
            Does not apply for API. List of user IDs. These users will be
            preselected as assignees when creating a new post in the post
            composer.
          items:
            type: string
      required:
        - name
        - timezone
      title: UpdateGroupRequest
    GroupData:
      type: object
      properties:
        id:
          type: string
        organization_id:
          type: string
        author_id:
          type:
            - string
            - 'null'
          description: The ID of the user who created the group
        name:
          type: string
        timezone:
          type: string
        approval_workflow:
          anyOf:
            - $ref: '#/components/schemas/ApprovalWorkflow'
              description: >-
                Approval workflow for this group. If null, the organization's
                default approval workflow is used


                `0` None <br/> `1` Loose <br/> `2` Strict
            - type: 'null'
        week_start_day:
          $ref: '#/components/schemas/WeekDay'
        note:
          type:
            - string
            - 'null'
          description: Internal note
        country:
          type:
            - string
            - 'null'
        color:
          $ref: '#/components/schemas/BaseColor'
        type:
          $ref: '#/components/schemas/GroupType'
        avatar:
          type:
            - string
            - 'null'
          description: URL to the profile image of the group
        default_assignee_ids:
          type: array
          description: >-
            Does not apply for API. Selected users will be pre-selected as
            assignees in new posts
          items:
            type: string
        default_everyone_must_approve:
          type: boolean
        post_task_templates_enabled:
          type: boolean
          description: |-
            When false, post task templates (global or group-scoped) are not
            applied to posts created in this group
        max_social_accounts:
          type:
            - integer
            - 'null'
          description: Max number of accounts in this group. Unlimited if null
        is_default:
          type: boolean
        created_at:
          type:
            - string
            - 'null'
          format: date-time
        updated_at:
          type:
            - string
            - 'null'
          format: date-time
        socialAccounts:
          type: array
          description: >-
            List of social accounts in the group.


            Data on request, you must add `socialAccounts` to the `include`
            parameter
          items:
            $ref: '#/components/schemas/SocialAccountData'
        socialAccountsCount:
          type:
            - integer
            - 'null'
          description: >-
            Data on request, you must add `socialAccountsCount` to the `include`
            parameter
      required:
        - id
        - organization_id
        - author_id
        - name
        - timezone
        - approval_workflow
        - week_start_day
        - note
        - country
        - color
        - type
        - avatar
        - default_assignee_ids
        - default_everyone_must_approve
        - post_task_templates_enabled
        - max_social_accounts
        - is_default
        - created_at
        - updated_at
        - socialAccounts
        - socialAccountsCount
      title: GroupData
    GroupType:
      type: integer
      enum:
        - 1
        - 2
        - 3
        - 4
        - 5
        - 6
      x-enum-varnames:
        - Group
        - Brand
        - Client
        - Agency
        - Campaign
        - Project
      description: >-
        `1` Group <br/> `2` Brand <br/> `3` Client <br/> `4` Agency <br/> `5`
        Campaign <br/> `6` Project
      title: GroupType
    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
    ApprovalWorkflow:
      type: integer
      enum:
        - 0
        - 1
        - 2
      x-enum-varnames:
        - None
        - Loose
        - Strict
      description: '`0` None <br/> `1` Loose <br/> `2` Strict'
      title: ApprovalWorkflow
    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
    SocialAccountData:
      type: object
      properties:
        id:
          type: string
        socialNetwork:
          $ref: '#/components/schemas/SocialNetwork'
        organization_id:
          type: string
        user_id:
          type:
            - string
            - 'null'
          description: ID of user who connected social account
        group_id:
          type:
            - string
            - 'null'
          description: The ID of the group to which the social account belongs
        name:
          type:
            - string
            - 'null'
          description: Display name of the social media account
        custom_name:
          type:
            - string
            - 'null'
          description: Custom name to easily recognize this account in PostFlow
        username:
          type:
            - string
            - 'null'
          description: Username for the social media account
        headline:
          type:
            - string
            - 'null'
          description: Headline / bio of the social media account
        followers_count:
          type:
            - integer
            - 'null'
          description: Number of followers, updated once a day
        verified:
          type: boolean
          description: Checks whether the account is verified on the network
        profile_link:
          type:
            - string
            - 'null'
          description: URL to the profile
        avatar_link:
          type:
            - string
            - 'null'
          description: URL to the profile picture of the social account
        social_id:
          type:
            - string
            - 'null'
          description: Unique identifier for the account on the social network
        pi_boards:
          type: array
          description: Pinterest boards for this account
          items:
            $ref: '#/components/schemas/PinterestBoardData'
        pi_default_board_id:
          type:
            - string
            - 'null'
          description: Default Pinterest board ID
        pi_default_section_id:
          type:
            - string
            - 'null'
          description: Default Pinterest board section ID
        ig_shopping_product_tag_eligibility:
          type: boolean
          description: >-
            Determines whether an Instagram account is eligible to tag products
            from the catalog
        yt_playlists:
          type:
            - array
            - 'null'
          description: YouTube playlists for this account
          items:
            type: string
        yt_categories:
          type:
            - array
            - 'null'
          description: YouTube categories for this account
          items:
            type: string
        connection_expired_at:
          type:
            - string
            - 'null'
          format: date-time
          description: >-
            The date on which the access token expired. If this value is not
            null, you must manually refresh the connection for the account
        external_sync_enabled:
          type: boolean
          description: >-
            Automatically sync posts that were published on this account outside
            of PostFlow
        created_at:
          type: string
          format: date-time
          description: The date the account was first connected to PostFlow
        user:
          anyOf:
            - $ref: '#/components/schemas/UserData'
              description: >-
                User who connected social account. This data is not always
                available, depends on the endpoint and the `include` parameter
            - type: 'null'
      required:
        - id
        - socialNetwork
        - organization_id
        - user_id
        - group_id
        - name
        - custom_name
        - username
        - headline
        - followers_count
        - verified
        - profile_link
        - avatar_link
        - social_id
        - pi_boards
        - pi_default_board_id
        - pi_default_section_id
        - ig_shopping_product_tag_eligibility
        - yt_playlists
        - yt_categories
        - connection_expired_at
        - external_sync_enabled
        - created_at
        - user
      title: SocialAccountData
    SocialNetwork:
      type: string
      enum:
        - twitter
        - linkedin
        - linkedin_page
        - facebook
        - instagram
        - tiktok
        - bluesky
        - pinterest
        - google_business_profile
        - youtube
        - threads
        - snapchat
        - dribbble
        - tumblr
      x-enum-varnames:
        - Twitter
        - LinkedIn
        - LinkedInPage
        - FacebookPage
        - Instagram
        - TikTok
        - Bluesky
        - Pinterest
        - GoogleBusinessProfile
        - YouTube
        - Threads
        - Snapchat
        - Dribbble
        - Tumblr
      title: SocialNetwork
    PinterestBoardData:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        privacy:
          type: string
        description:
          type:
            - string
            - 'null'
        image_cover_url:
          type:
            - string
            - 'null'
        sections:
          type: array
          default: []
          items:
            $ref: '#/components/schemas/PinterestBoardSectionData'
      required:
        - id
        - name
        - privacy
        - description
        - image_cover_url
        - sections
      title: PinterestBoardData
    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
    PinterestBoardSectionData:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
      required:
        - id
        - name
      title: PinterestBoardSectionData
    UserRole:
      type: string
      enum:
        - owner
        - manager
        - member
        - viewer
      x-enum-varnames:
        - Owner
        - Manager
        - Member
        - Viewer
      title: UserRole
    DateFormat:
      type: integer
      enum:
        - 1
        - 2
        - 3
      x-enum-varnames:
        - DMY
        - MDY
        - YMD
      description: '`1` DMY <br/> `2` MDY <br/> `3` YMD'
      title: DateFormat
  responses:
    GeneralJsonException:
      description: Bad request - Client error
      content:
        application/json:
          schema:
            type: object
            properties:
              title:
                type: string
                description: Error title
              message:
                type: string
                description: Error overview.
              e_code:
                type: string
                description: Error code
                default: GENERAL
    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
    ModelNotFoundException:
      description: Not found
      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
  securitySchemes:
    http:
      type: http
      scheme: bearer

````