Audiences
Audiences are a used to group Members based on a given set identifiable fields. They operate on filtering terms that can be as broad or as specific as required, and respond dynamically to changes in Member data.
Create an Audience
POST https://api.orbiit.ai/v0/workspaces/:workspaceId/audiences
Create a new Audience within a given Workspace with an empty filter, and therefore no Members.
Path Parameters
workspaceId*
String
Your workspace ID
Request Body
name*
String
The name you want to give to your new audience
{
"id": "620cc7724efb16eb371f2e7f"
}Retrieve an Audience
GET https://api.orbiit.ai/v0/workspaces/:workspaceId/audiences/:audienceId
Retrieve an Audience belonging to a given Workspace by its ID.
Path Parameters
workspaceId*
String
Your Workspace ID
audienceId*
String
The audience ID you are requesting
{
"id": "620cc7724efb16eb371f2e7f",
"name": "Product Leaders"
}Archive an Audience
DELETE https://api.orbiit.ai/v0/workspaces/:workspaceId/audiences/:audienceId
Archive an Audience, removing it from view within the parent Workspace, and preventing it from being used in future Engagements.
Path Parameters
workspaceId*
String
Your Workspace ID
audienceId*
String
The ID of the Audience to be deleted
List Audiences
GET https://api.orbiit.ai/v0/workspaces/:workspaceId/audiences
Retrieve a list of all available Audiences belonging to a given Workspace. By default, only unarchived Audiences will be returned.
Path Parameters
workspaceId*
String
Your Workspace ID
{
"results": [
{
"id": "736b32756b62647671386111",
"createdAt": "1999-10-09T08:54:59.000Z",
"name": "Audience #1",
"isArchived": false
},
{
"id": "6f3468387834356136636222",
"createdAt": "1999-11-06T16:35:15.000Z",
"name": "My Audience #2",
"isArchived": false
},
]
}Add Members to an Audience
POST https://api.orbiit.ai/v0/workspaces/:workspaceId/audiences/:audienceId/members
Add one or more Members to a given Audience. Members that do not exist within the parent Workspace will be created, and Members that do exist but have differing information will be merged with their existing counterparts.
Path Parameters
workspaceId*
String
Your Workspace ID
audienceId*
String
The ID of the target Audience
Request Body
memberIds*
Array[String]
The list of Member IDs to be added
Remove Members from an Audience
DELETE https://api.orbiit.ai/v0/workspaces/:workspaceId/audiences/:audienceId/members
Remove one or more Members from a given Audience. The Members will not be removed from the parent Workspace.
Path Parameters
workspaceId*
String
Your Workspace ID
audienceId*
String
The ID of the target Audience
Request Body
memberIds*
The list of Member IDs to be removed
Merge Audience
POST https://api.orbiit.ai/v0/workspaces/:workspaceId/audiences/merge
Merge two Audiences together, forming a new Audience with a given name.
Path Parameters
workspaceId*
String
Your Workspace ID
Request Body
name*
String
The name of the new Audience
audienceIds*
Array
The IDs of the two Audiences to be merged, presented as a list
{
"id": "620cc7724efb16eb371f2e7f"
}Get Members for an Audience
GET https://api.orbiit.ai/v0/workspaces/:workspaceId/audiences/:audienceId/members
Endpoint supports pagination.
Path Parameters
workspaceId*
String
audienceId*
String
```json
{
"totalCount": 1,
"pageInfo": {
"hasNextPage": false,
"hasPreviousPage": false,
"startCursor": "...",
"endCursor": "..."
},
"results": [
{
"id": "...",
"createdAt": "2023-10-13T11:07:44.120Z",
"email": "[email protected]",
"fields": {
"firstName": "Timmy",
"lastName": "Tester",
"role": "Developer",
"company": "Orbiit"
},
"alternativeEmails": []
}
]
}
```Last updated