Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update user alias endpoint documentation #4751

Merged
merged 7 commits into from
Feb 2, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion _docs/_api/api_limits.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ These default limits can be increased upon request. Reach out to your customer s
| --- | --- |
| [`/users/track`][10] | **Requests:** 50,000 requests per minute.<br><br>**Batching:** 75 events, 75 purchases, and 75 attributes per API request. See [Batching User Track requests](#batch-user-track) for more. |
| [`/users/export/ids`][11] | 2,500 requests per minute. |
| [`/users/delete`][12]<br>[`/users/alias/new`][13]<br>[`/users/identify`][14]<br>[`/users/merge`][44] | 20,000 requests per minute, shared between the endpoints. |
| [`/users/delete`][12]<br>[`/users/alias/new`][13]<br>[`/users/alias/update`][45]<br>[`/users/identify`][14]<br>[`/users/merge`][44] | 20,000 requests per minute, shared between the endpoints. |
| [`/users/external_id/rename`][20] | 1,000 requests per minute. |
| [`/users/external_id/remove`][21] | 1,000 requests per minute. |
| [`/events/list`][15] | 1,000 requests per hour, shared with the `/purchases/product_list` endpoint. |
Expand Down Expand Up @@ -134,3 +134,4 @@ Under normal conditions, the time for our data eventual consistency to occur is
[41]: {{site.baseurl}}/api/endpoints/catalogs/catalog_items/synchronous/post_create_catalog_item/
[43]: {{site.baseurl}}/get_search_existing_dashboard_user_email/
[44]: {{site.baseurl}}/api/endpoints/user_data/post_users_merge/
[45]: {{site.baseurl}}/api/endpoints/user_data/post_users_alias_update/
3 changes: 3 additions & 0 deletions _docs/_api/endpoints/user_data.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ guide_featured_list:
- name: "POST: Create a New User Alias"
link: /docs/api/endpoints/user_data/post_user_alias/
fa_icon: fas fa-user
- name: "POST: Update a User Alias"
link: /docs/api/endpoints/user_data/post_users_alias_update/
fa_icon: fas fa-user-edit
Comment on lines +25 to +27
Copy link
Contributor

@davehensley davehensley Feb 1, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like these URLs all changed at some point (they used to live under /docs/developer_guide/rest_api/user_data/). It appears that there are redirects in place from the old URLs to these new ones, but maybe we should go into platform and update the URLs there? At least we should check to make sure the new one we just added will get redirected properly.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yea from the look of it I think the links in braze-doc are correct. We should update the URLs in platform. I can make a card for it if that sounds okay to you. Currently the links point to the page that lists all the users data endpoints so it's kinda okay I think?

- name: "POST: Delete User Data"
link: /docs/api/endpoints/user_data/post_user_delete/
fa_icon: fas fa-user-minus
Expand Down
76 changes: 76 additions & 0 deletions _docs/_api/endpoints/user_data/post_users_alias_update.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
---
nav_title: "POST: Update User Alias"
article_title: "POST: Update User Alias"
search_tag: Endpoint
page_order: 4
layout: api_page
page_type: reference
description: "This article outlines details about the Update User Aliases Braze endpoint."

---
{% api %}
# Update user alias
{% apimethod post %}
/users/alias/update
{% endapimethod %}

Use this endpoint to update existing user aliases.

{% alert note %}
You can update up to 50 user aliases per request.
{% endalert %}

Updating a user alias requires `alias_label`, `old_alias_name`, and `new_alias_name` to be included in the upda te user alias object. If there is no user alias associated with the `alias_label` and `old_alias_name`, no alias will be updated. If the given `alias_label` and `old_alias_name` is found, then the `old_alias_name` will be updated to the `new_alias_name`.

## Rate limit

{% multi_lang_include rate_limits.md endpoint='users alias update' %}

## Request body

```
Content-Type: application/json
Authorization: Bearer YOUR-REST-API-KEY
```

```json
{
"alias_updates" : (required, array of update user alias object)
}
```

### Request parameters

| Parameter | Required | Data Type | Description |
| --------- | ---------| --------- | ----------- |
| `alias_updates` | Required | Array of update user alias objects | See [user alias object]({{site.baseurl}}/api/objects_filters/user_alias_object/).<br><br> For more information on `old_alias_name`, `new_alias_name`, and `alias_label`, refer to [User aliases]({{site.baseurl}}/user_guide/data_and_analytics/user_data_collection/user_profile_lifecycle/#user-aliases).|
{: .reset-td-br-1 .reset-td-br-2 .reset-td-br-3 .reset-td-br-4}

### Endpoint request body with update user alias object specification

```json
{
"alias_label" : (required, string),
"old_alias_name" : (required, string),
"new_alias_name" : (required, string)
}
```

## Example request
```
curl --location --request POST 'https://rest.iad-01.braze.com/users/alias/update' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR-API-KEY-HERE' \
--data-raw '{
"alias_updates" :[
{
"alias_label": "example_alias_label",
"old_alias_name" : "example_old_alias_name",
"new_alias_name" : "example_new_alias_name"
}
]
}'
```

{% endapi %}

82 changes: 43 additions & 39 deletions _docs/_api/home.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,24 +13,24 @@ glossary_filter_text: "Select endpoint type to narrow the glossary:"

glossary_mid_text: "Endpoint Search"
guide_featured_list:
- name: API Overview
fa_icon: fa-solid fa-info
link: /docs/api/basics/
- name: API Identifier Types
link: /docs/api/identifier_types/
fa_icon: fa-solid fa-clipboard-list
- name: Objects & Filters
link: /docs/api/objects_filters/
fa_icon: fa-solid fa-gear
- name: Errors & Responses
link: /docs/api/errors/
fa_icon: fa-solid fa-list-check
- name: Data Retention
link: /docs/api/data_retention/
fa_icon: fa-solid fa-laptop-code
- name: Rate Limits
link: /docs/api/api_limits/
fa_icon: fa-solid fa-hand
- name: API Overview
fa_icon: fa-solid fa-info
link: /docs/api/basics/
- name: API Identifier Types
link: /docs/api/identifier_types/
fa_icon: fa-solid fa-clipboard-list
- name: Objects & Filters
link: /docs/api/objects_filters/
fa_icon: fa-solid fa-gear
- name: Errors & Responses
link: /docs/api/errors/
fa_icon: fa-solid fa-list-check
- name: Data Retention
link: /docs/api/data_retention/
fa_icon: fa-solid fa-laptop-code
- name: Rate Limits
link: /docs/api/api_limits/
fa_icon: fa-solid fa-hand

# channel to icon/fa or image mapping
glossary_tags:
Expand Down Expand Up @@ -58,6 +58,10 @@ glossaries:
description: Add new user aliases for existing identified users, or to create new unidentified users.
tags:
- User Data
- name: <a href='/docs/api/endpoints/user_data/post_users_alias_update/'>/users/alias/update</a>
description: Update existing user alias names to new user alias names.
tags:
- User Data
- name: <a href='/docs/api/endpoints/user_data/post_user_delete/'>/users/delete</a>
description: Delete any user profile by specifying a known user identifier.
tags:
Expand Down Expand Up @@ -115,7 +119,7 @@ glossaries:
- name: <a href='/docs/api/endpoints/messaging/schedule_messages/post_schedule_triggered_campaigns/'>/campaigns/trigger/schedule/create</a>
description: Send dashboard created campaign messages (up to 90 days in advance) via API-triggered delivery.
tags:
- Schedule Messages
- Schedule Messages
- name: <a href='/docs/api/endpoints/messaging/schedule_messages/post_delete_scheduled_triggered_messages/'>/campaigns/trigger/schedule/delete</a>
description: Cancel API-triggered campaign messages that you previously scheduled before it has been sent.
tags:
Expand All @@ -127,31 +131,31 @@ glossaries:
- name: <a href='/docs/api/endpoints/messaging/schedule_messages/post_delete_scheduled_triggered_canvases/'>/canvas/trigger/schedule/delete</a>
description: Cancel a Canvas message that you previously scheduled via API-triggered before it has been sent.
tags:
- Schedule Messages
- Schedule Messages
- name: <a href='/docs/api/endpoints/messaging/schedule_messages/post_schedule_triggered_canvases/'>/canvas/trigger/schedule/create</a>
description: Schedule Canvas messages (up to 90 days in advance) via API-triggered delivery.
tags:
- Schedule Messages
- Schedule Messages
- name: <a href='/docs/api/endpoints/messaging/schedule_messages/post_update_scheduled_messages/'>/messages/schedule/update</a>
description: Update scheduled messages. This endpoint accepts updates to either the <code>schedule</code> or <code>messages</code> parameter or both.
tags:
- Schedule Messages
- Schedule Messages
- name: <a href='/docs/api/endpoints/messaging/schedule_messages/post_delete_scheduled_messages/'>/messages/schedule/delete</a>
description: Cancel a message that you previously scheduled before it has been sent.
tags:
- Schedule Messages
- Schedule Messages
- name: <a href='/docs/api/endpoints/messaging/schedule_messages/post_schedule_messages/'>/messages/schedule/create</a>
description: Schedule a campaign, Canvas, or other message to be sent at a designated time (up to 90 days in the future).
tags:
- Schedule Messages
- Schedule Messages
- name: <a href='/docs/api/endpoints/messaging/schedule_messages/post_update_scheduled_triggered_canvases/'>/canvas/trigger/schedule/update</a>
description: Update scheduled API-triggered Canvases that were created in the dashboard.
tags:
- Schedule Messages
- Schedule Messages
- name: <a href='/docs/api/endpoints/messaging/schedule_messages/get_messages_scheduled/'>/messages/scheduled_broadcasts</a>
description: Return a JSON list of information about scheduled campaigns and entry Canvases between now and a designated <code>end_time</code> specified in the request.
tags:
- Schedule Messages
- Schedule Messages
- name: <a href='/docs/api/endpoints/subscription_groups/post_update_user_subscription_group_status/'>/subscription/status/set</a>
description: Batch update the subscription state of up to 50 users on the Braze dashboard.
tags:
Expand All @@ -171,47 +175,47 @@ glossaries:
- name: <a href='/docs/api/endpoints/email/post_blacklist/'>/email/blacklist</a>
description: Unsubscribe a user from email and mark them as hard bounced.
tags:
- Email List
- Email List
- name: <a href='/docs/api/endpoints/email/post_remove_hard_bounces/'>/email/bounce/remove</a>
description: Remove email addresses from your Braze bounce list.
tags:
- Email List
- name: <a href='/docs/api/endpoints/email/post_remove_spam/'>/email/spam/remove</a>
description: Remove email addresses from your Braze spam list.
tags:
- Email List
- Email List
- name: <a href='/docs/api/endpoints/email/post_email_subscription_status/'>/email/status</a>
description: Set the email subscription state for your users.
tags:
- Email List
- Email List
- name: <a href='/docs/api/endpoints/templates/email_templates/post_create_email_template/'>/templates/email/create</a>
description: Create email templates on the Braze dashboard.
tags:
- Email Templates
- Email Templates
- name: <a href='/docs/api/endpoints/templates/email_templates/post_update_email_template/'>/templates/email/update</a>
description: Update email templates on the Braze dashboard.
tags:
- Email Templates
- Email Templates
- name: <a href='/docs/api/endpoints/email/get_list_hard_bounces/'>/email/hard_bounces</a>
description: Pull a list of email addresses that have "hard bounced" your email messages within a certain time frame.
tags:
- Email List
- Email List
- name: <a href='/docs/api/endpoints/email/get_query_unsubscribed_email_addresses/'>/email/unsubscribes</a>
description: Return emails that have unsubscribed during the time period from <code>start_date</code> to <code>end_date</code>.
tags:
- Email List
- Email List
- name: <a href='/docs/api/endpoints/templates/email_templates/get_see_email_template_information/'>/templates/email/info</a>
description: Get information on your email templates.
tags:
- Email Templates
- Email Templates
- name: <a href='/docs/api/endpoints/templates/email_templates/get_list_email_templates/'>/templates/email/list</a>
description: Get a list of available email templates in your Braze account.
tags:
- Email Templates
- Email Templates
- name: <a href='/docs/api/endpoints/export/campaigns/get_campaign_analytics/'>/campaigns/data_series</a>
description: Retrieve a daily series of various stats for a campaign over time.
tags:
- Campaigns
- Campaigns
- name: <a href='/docs/api/endpoints/export/campaigns/get_campaign_details/'>/campaigns/details</a>
description: Retrieve relevant information on a specified campaign.
tags:
Expand Down Expand Up @@ -350,7 +354,7 @@ glossaries:
- Catalogs
- name: <a href='/docs/api/endpoints/catalogs/catalog_items/asynchronous/patch_catalog_items_bulk/'>/catalogs/catalog_name/items</a>
description: Edit multiple items in your catalog.
tags:
tags:
- Catalogs
- name: <a href='/docs/api/endpoints/catalogs/catalog_items/asynchronous/post_create_catalog_items_bulk/'>/catalogs/catalog_name/items</a>
description: Create multiple items in your catalog.
Expand Down Expand Up @@ -383,7 +387,7 @@ glossaries:
- name: <a href='/docs/api/endpoints/catalogs/catalog_items/synchronous/delete_catalog_item/'>/catalogs/catalog_name/items/item_id</a>
description: Delete an item in a catalog.
tags:
- Catalogs
- Catalogs
- name: <a href='/docs/post_create_user_account/'>/scim/v2/Users</a>
description: Create a new dashboard user account by specifying email, given and family names, permissions (for setting permissions at the company, app group, and team level).
tags:
Expand All @@ -404,4 +408,4 @@ glossaries:
description: Look up an existing dashboard user account by specifying their email.
tags:
- SCIM
---
---
5 changes: 5 additions & 0 deletions _includes/rate_limits.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,11 @@ For customers who onboarded with Braze on or after September 16, 2021, we apply
{% elsif include.endpoint == "users alias new" %}
For customers who onboarded with Braze on or after September 16, 2021, we apply a shared rate limit of 20,000 requests per minute to this endpoint. This rate limit is shared with the `/users/delete`, `/users/identify`, and `/users/merge` endpoints, as documented in [API rate limits]({{site.baseurl}}/api/api_limits/).

<!---/users/alias/update-->

{% elsif include.endpoint == "users alias update" %}
For customers who onboarded with Braze on or after September 16, 2021, we apply a shared rate limit of 20,000 requests per minute to this endpoint. This rate limit is shared with the `/users/delete`, `/users/identify`, and `/users/merge` endpoints, as documented in [API rate limits]({{site.baseurl}}/api/api_limits/).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to update all of these to include all of the endpoints, so in this section we need to add /users/alias/new, and in the ones above we need to add /users/alias/update. Or maybe we need to change how we list these, since the list is starting to get a little long...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That makes sense, will update these to match. Not sure what's the best way to render a list and exclude the current endpoint in markdown. Maybe in the future we should just put a link that points to a list of endpoints that have 20000 rate limit?

<!---/users/identify-->

{% elsif include.endpoint == "users identify" %}
Expand Down