Workplace from Meta is going away. You will be able to continue using Workplace until 31 August 2025. Visit our Help Center to find out more.
Create, update and delete dynamic people sets on Workplace via Graph API.
POST /community/people_sets
Creates a new dynamic people set with the specified configuration.
Fields passed in the request body as an object:
Field Name | Description | Data Type |
---|---|---|
| Required. A name for the people set being created. |
|
| Required. A set of conditions to be used by the dynamic people set. |
|
Not all combinations of field
& operator
are supported, so it is best to consult with the People Sets UI in the Admin Panel on Workplace if you’re not sure whether a specific combination is supported or not.
{
"id": {id_of_people_set}
}
POST
/community/people_sets?name=TSet2&conditions=[
{
"field": "TITLE",
"operator": "CONTAINS",
"values": [
"Software"
]
}
]
GET /{people_set_id}
Retrieves the configuration of the dynamic people set by its id.
people_set_id
- path param - id of a people setAn object containing the following fields (later referred to as People Set Object):
Field Name | Description | Data Type |
---|---|---|
| The id of the people set being retrieved. |
|
| The name of the people set being retrieved. |
|
| The set of conditions used by the people set being retrieved. | Array of objects containing the following fields:
|
GET
/{people_set_id}?fields=name,conditions
POST /{people_set_id}
Update a people set using the specified configuration.
Path parameters:
people_set_id
(int): Required. The id of the people set to update.Fields passed in the request body as an object should match the fields outlined in the request parameters for the create endpoint.
{
"success":"true"
}
POST /{people_set_id}?name=TSet3&conditions=[
{
"field": "TITLE",
"operator": "CONTAINS",
"values": [
"Software"
]
},
{
"field": "LOCATION",
"operator": "CONTAINS",
"values": [
"London"
]
}
]
DELETE /{people_set_id}
Delete the dynamic people set with the specified id
Path parameters:
people_set_id
(int): Required. The id of the people set to delete {
"success":"true"
}
DELETE /{people_set_id}
GET /community/people_sets?name={people_set_name}
Retrieves the configuration of the dynamic people set by its name.
name
- query string param - name of a people setIf there is a dynamic people set with an exact name match, it returns an object with the following field:
GET /community/people_sets?name=TSet3
GET /community/people_sets
Endpoint to get all existing dynamic people sets.
Returns an object with the following field:
data
- an array containing People Set Objects.GET /community/people_sets
People Set API supports sending updates via the people_sets
webhook topic. See Webhooks for more information on subscribing to Workplace webhooks.
When a people set is created, updated or deleted, a request is sent containing an object with the following fields:
object
(string): “workplace_community”
entry
: array of the objects with the following fields:
changes
: array of the objects with the following fields:
field
(string): “people_sets”
value
: Object with the following fields:
people_set
: People Set Object. If the People Set was deleted, this object will contain only the `id` field.verb
(string): One of {“add”
, “update”
, “delete”
}. Denotes the action that happened