Skip to content

Commit

Permalink
Merge pull request #6524 from segmentio/maleman842-patch-1
Browse files Browse the repository at this point in the history
Add Audiences API FAQ
  • Loading branch information
pwseg committed May 14, 2024
2 parents 350bedf + 9fe655d commit 3d9c9d5
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/engage/faqs.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,17 @@ redirect_from:

## Do you have an Audiences API?

You can add, remove, and modify audiences only by using the Engage in-app audience builder.
Yes. You can learn more about the Audience API by visiting the [Segment Public API documentation](https://docs.segmentapis.com/tag/Audiences){:target="_blank"}.

However, you can programmatically query the Profile API to determine if a user belongs to a particular audience because Engage creates a trait with the same name as your audience. For example, to determine if the user with an email address of `bob@example.com` is a member of your `high_value_users` audience, you could query the following profile API URL:
## Can I programmatically determine if a user belongs to a particular audience?

Yes. Eecause Engage creates a trait with the same name as your audience, you can query the Profile API to determine if a user belongs to a particular audience. For example, to determine if the user with an email address of `bob@example.com` is a member of your `high_value_users` audience, you could query the following Profile API URL:

```
https://profiles.segment.com/v1/namespaces/<namespace_id>/collections/users/profiles/email:bob@segment.com/traits?include=high_value_users
```

The following response indicates that Bob is indeed a high-value user:
The following response indicates that Bob is a high-value user:

```json
{
Expand Down

0 comments on commit 3d9c9d5

Please sign in to comment.