Committees API

Manage committee channels synced from external systems. Supports hierarchical committees with Chair and Secretary roles.

The Committees API allows external systems to manage committee channels in Loop. Committees support hierarchical structures with parent/child relationships and specialized roles (Chair, Secretary).

Get Committee Channel

Retrieve information about a committee channel.

Endpoint

GET /api/v1/integration/committees/{uniqueId}

Path Parameters

ParameterTypeDescription
uniqueIdstringThe unique identifier for the committee in the external system

Success Response

{
  "channel": {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "name": "Finance Committee",
    "slug": "finance-committee",
    "privacy": "private",
    "channel_type": "committee",
    "is_archived": false,
    "member_count": 8
  }
}

Error Response - Not Found

{
  "error": {
    "code": "committee_not_found",
    "message": "No committee found with unique ID finance-2024"
  }
}

Create / Update Committee

Sync a committee from an external system.

Endpoint

PUT /api/v1/integration/committees/{uniqueId}

Path Parameters

ParameterTypeDescription
uniqueIdstringThe unique identifier for the committee in the external system

Request Body

{
  "name": "Finance Committee",
  "chair_wp_id": 123,
  "secretary_wp_id": 456,
  "member_wp_ids": [123, 456, 789, 101, 102],
  "color": "#3B82F6",
  "is_active": true
}

Body Parameters

ParameterTypeRequiredDescription
namestringNoCommittee name (updates existing if changed)
chair_wp_idintegerNoWordPress user ID of the Chair (becomes channel owner)
secretary_wp_idintegerNoWordPress user ID of the Secretary (becomes channel moderator)
member_wp_idsinteger[]NoArray of WordPress user IDs for committee members
colorstringNoHex color code for the committee (e.g., "#3B82F6")
is_activebooleanNoWhether the committee is active (false = archived)

Success Response

{
  "success": true,
  "channel": {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "name": "Finance Committee",
    "slug": "finance-committee",
    "privacy": "private",
    "channel_type": "committee",
    "is_archived": false
  },
  "message": "Committee channel updated successfully"
}

Archive Committee

Archive a committee channel with visibility control.

Endpoint

DELETE /api/v1/integration/committees/{uniqueId}

Path Parameters

ParameterTypeDescription
uniqueIdstringThe unique identifier for the committee

Request Body (Optional)

{
  "visibility": "hidden" | "readonly"
}

Body Parameters

ParameterTypeRequiredDefaultDescription
visibilitystringNo"hidden"Archive visibility mode

Archive Visibility Modes

ModeBehavior
hiddenCommittee channel is completely hidden from members
readonlyCommittee channel is visible but members cannot post. Useful for preserving historical discussions.

Example Request - Archive as Read-Only

curl -X DELETE https://your-domain.com/api/v1/integration/committees/finance-2024 \
  -H "x-api-key: your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "visibility": "readonly"
  }'

Example Request - Archive as Hidden (Default)

curl -X DELETE https://your-domain.com/api/v1/integration/committees/finance-2024 \
  -H "x-api-key: your_api_key_here"

Success Response

{
  "success": true,
  "message": "Committee archived successfully",
  "visibility": "readonly"
}

Sync Committee (Full Sync)

Create a new committee or fully sync an existing one.

Endpoint

POST /api/v1/integration/committees

Request Body

{
  "imk_unique_id": "finance-2024",
  "name": "Finance Committee",
  "parent_unique_id": "board-2024",
  "chair_wp_id": 123,
  "secretary_wp_id": 456,
  "member_wp_ids": [123, 456, 789, 101, 102],
  "color": "#3B82F6",
  "is_active": true
}

Body Parameters

ParameterTypeRequiredDescription
imk_unique_idstringYesUnique identifier for the committee
namestringYesCommittee name
parent_unique_idstringNoParent committee's unique ID (for sub-committees)
chair_wp_idintegerNoWordPress user ID of the Chair
secretary_wp_idintegerNoWordPress user ID of the Secretary
member_wp_idsinteger[]NoArray of member WordPress user IDs
colorstringNoHex color code
is_activebooleanNoWhether the committee is active

Success Response - Created

{
  "success": true,
  "created": true,
  "data": {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "name": "Finance Committee",
    "slug": "finance-committee",
    "privacy": "private",
    "channel_type": "committee",
    "is_archived": false
  }
}

Success Response - Updated

{
  "success": true,
  "created": false,
  "data": {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "name": "Finance Committee",
    "slug": "finance-committee",
    "privacy": "private",
    "channel_type": "committee",
    "is_archived": false
  }
}

Committee Roles

Committees have specialized roles that map to channel membership roles:

Committee RoleChannel RolePermissions
ChairOwnerFull administrative control
SecretaryModeratorCan pin messages, moderate content
MemberMemberCan read and post messages

Hierarchical Committees

Committees can be organized hierarchically using parent_unique_id:

Board of Directors (board-2024)
├── Finance Committee (finance-2024)
│   └── Budget Subcommittee (budget-2024)
├── HR Committee (hr-2024)
└── Technology Committee (tech-2024)

When creating a sub-committee, ensure the parent committee exists first.

Use Cases

Annual Committee Renewal

When committee terms end, archive previous year's committees as read-only to preserve discussions:

# Archive 2023 committees as read-only
curl -X DELETE .../committees/finance-2023 \
  -d '{"visibility": "readonly"}'

# Create 2024 committees
curl -X POST .../committees \
  -d '{"imk_unique_id": "finance-2024", "name": "Finance Committee 2024", ...}'

Disbanding a Committee

When a committee is permanently dissolved:

curl -X DELETE .../committees/special-task-force \
  -d '{"visibility": "hidden"}'

Updating Committee Leadership

When Chair or Secretary changes:

curl -X PUT .../committees/finance-2024 \
  -d '{"chair_wp_id": 999, "secretary_wp_id": 888}'

The previous Chair is automatically demoted to moderator, and the new Chair is promoted to owner.