---
title: "Create Membership Add-To-Group Action"
method: POST
path: "/communities/{community_id}/memberships/add_to_group_actions"
tags: ["Communities::Memberships::AddToGroupAction"]
---

# Create Membership Add-To-Group Action

`POST /communities/{community_id}/memberships/add_to_group_actions`

## Request

- Base URL: `https://myworkspace.myclickfunnels.com/api/v2`
- URL: `https://myworkspace.myclickfunnels.com/api/v2/communities/{community_id}/memberships/add_to_group_actions`
- Auth: one of:
  - HTTP bearer
  - OAuth 2
    - Authorization code: `https://accounts.myclickfunnels.com/oauth/authorize`
    - Token URL: `https://accounts.myclickfunnels.com/oauth/token`
- TypeScript: <https://skmtc.dev/myclickfunnels/apis/clickfunnels-api/docs/communities/:community_id/memberships/add_to_group_actions/post.ts> (a function with typed inputs; its response is checked against the schema)

Enqueue an async background job to add one or more community members to one or more spaces (groups). The action record is returned immediately with `status: queued`. Poll `GET /communities/memberships/add_to_group_actions/{id}` until `status` is `completed`.

## Path parameters

- `community_id` string, required

## Request body

- object
  - `communities_memberships_add_to_group_action` CommunitiesMembershipsAddToGroupActionParameters: Communities::Memberships::AddToGroupAction
    - `target_all` boolean: When true, add all members in the community to the specified spaces (target_ids is ignored)
    - `target_ids` string[]: Array of membership public IDs to add to the spaces. Required when target_all is false.
    - `space_ids` string[]: Array of space public IDs to add the members to

## Response `201`

Created

- CommunitiesMembershipsAddToGroupActionAttributes: Base response shape shared by all community async bulk-action resources. The `status` field progresses from `queued` → `processing` → `completed`. Poll the `show` endpoint until `status` is `completed` or `performed_count` equals `target_count`.
  - `id` integer: Action ID
  - `public_id` string, nullable: Action public ID
  - `community_id` integer: ID of the Community this action belongs to
  - `target_all` boolean: When true the action targets all eligible records in the community rather than the explicit target_ids list
  - `target_ids` integer[]: Integer IDs of the targeted records (memberships or bans)
  - `failed_ids` integer[]: Integer IDs of records that could not be processed
  - `target_count` integer, nullable: Total number of records that will be processed
  - `performed_count` integer, nullable: Number of records processed so far
  - `started_at` string, date-time, nullable: Timestamp when the background job began processing
  - `completed_at` string, date-time, nullable: Timestamp when the background job finished
  - `created_at` string, date-time: Created at
  - `updated_at` string, date-time: Updated at
  - `status` 'queued' | 'processing' | 'completed': Current status of the async action. Progresses: queued → processing → completed.
  - `space_ids` integer[]: Integer IDs of the spaces (groups) members are added to

## Other responses

- `401`: Unauthorized
- `403`: Forbidden — this request's workspace is closed to it. Three cases return this: * The access token is limited to specific workspaces (see the workspace selection made when the key was provisioned, or the workspaces approved on the OAuth consent screen) and the request acts on a workspace outside that set. * The access token is limited to specific workspaces and the request's workspace could not be determined at all. The gate is fail-closed, so a workspace-limited token is denied rather than allowed through when the target workspace is ambiguous. * The workspace's team has no active ClickFunnels subscription: it was canceled, is paused, or is locked out after failed payments. Reads and writes are both refused until the subscription is reactivated, and the body carries `"code": "subscription_inactive"`. A token with no workspace restriction never receives the first two.
- `422`: Unprocessable Entity

## Changes

- **2026-11-03** `511d88b30aea`: 4 info
  - for the `path` request parameter `community_id`, the type was generalized from `integer` to `string`
  - added the non-success response with the status `403`
  - added the optional property `hint` to the response with the `401` status
  - added the optional property `hint` to the response with the `422` status

[Operation history](https://skmtc.dev/myclickfunnels/apis/clickfunnels-api/changes/communities/:community_id/memberships/add_to_group_actions/post.md)

---

[API](https://skmtc.dev/myclickfunnels/apis/clickfunnels-api.md) - [All operations](https://skmtc.dev/myclickfunnels/apis/clickfunnels-api/llms.txt) - [OpenAPI document](https://skmtc.dev/myclickfunnels/apis/clickfunnels-api/revisions/511d88b30aea?raw)
