Documentation
API v1
Groups
The groups of people that a rule keeps current. List them, read the sync destinations of one, and sync one to Slack channels. The orgorg CLI uses these endpoints for its groups commands.
Working with an AI agent?or point it at the Groups markdown or the full-API markdown.
List groups
GET
/api/v1/groupsList the groups you can see, with the rule and the member count of each. Requires groups:read (or :write).
Response:
{
data: {
id: string;
name: string;
rule: string;
memberCount: number;
isUnlisted: boolean;
lastSuccessfulRun: number | null;
createdAt: number;
updatedAt: number;
}[]
}List sync destinations of a group
GET
/api/v1/groups/destinationsThe sync destinations of one group (Slack channels, Google Groups, badges), with the last run of each. A Slack destination names its channel when the OrgOrg Slack app can see it. Requires groups:read (or :write).
| Parameter | Type | Description |
|---|---|---|
| group | string required | The group: its id (the last segment of its URL, /groups/<id>) or its exact name. |
Response:
{
data: {
id: string;
type: 'SlackBot' | 'SlackUser' | 'GoogleGroups' | 'OrgOrgBadge';
destinationId: string;
channel: string | null;
addOnly: boolean;
lastRun: number | null;
lastSuccessfulRun: number | null;
lastRunSucceeded: boolean | null;
}[]
}Sync a group to Slack channels
POST
/api/v1/groups/sync-slackMake each matching Slack channel a sync destination of the group, through the OrgOrg Slack app, then run the sync. The app invites each member of the group to each channel. Without addOnly it also removes everyone else from the channel, except bots. The app sees a private channel only after /invite. Run it again to take up a channel made later. You must be able to edit the group. Requires groups:write.
| Parameter | Type | Description |
|---|---|---|
| group | string required | The group: its id (the last segment of its URL, /groups/<id>) or its exact name. |
| channels | string required | Channel names, comma-separated. A * matches any text: internal_* names every channel whose name starts with internal_. |
| addOnly | boolean optional | True keeps everyone who is in a channel already. Default false: the channel becomes the group. |
Response:
{
data: {
group: { id: string; name: string };
addOnly: boolean;
destinations: {
destinationId: string;
channelId: string;
channel: string;
isPrivate: boolean;
created: boolean;
}[];
unmatched: string[];
members: number;
}
}