Skip to content

新しいユーザーエイリアスを作成する

post

/users/alias/new

このエンドポイントを使用して、既存の識別されたユーザーの新しいユーザー別名を追加したり、新しい識別されていないユーザーを作成したりします。

要求ごとに最大 50 のユーザーエイリアスを指定できます。

** 既存のユーザ** にユーザエイリアスを追加するには、新しいユーザエイリアスオブジェクトにexternal_id を含める必要があります。external_id がオブジェクトに存在するが、そのexternal_id を持つユーザが存在しない場合、エイリアスはどのユーザにも追加されません。external_id が存在しない場合でも、ユーザは作成されますが、後で識別する必要があります。これを行うには、”Identifying Users”およびusers/identify エンドポイントを使用します。

新しいエイリアスのみのユーザを作成するには、新しいユーザエイリアスオブジェクトからexternal_id を省略する必要があります。ユーザーが作成されたら、/users/track エンドポイントを使用して、エイリアスのみのユーザーを属性、イベント、購入に関連付け、/users/identify エンドポイントを使用して、external_id でユーザーを識別します。

前提条件

このエンドポイントを使用するには、users.alias.new 権限を持つAPI キー が必要です。

レート制限

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, /users/merge, and /users/alias/update endpoints, as documented in API rate limits.

リクエスト本文

1
2
Content-Type: application/json
Authorization: Bearer YOUR_REST_API_KEY
1
2
3
{
  "user_aliases" : (required, array of new user alias object)
}

要求パラメータ

パラメータ 必須 データ型 説明  
user_aliases 必須 新しいユーザエイリアスオブジェクトの配列 ユーザエイリアスオブジェクト を参照してください。

alias_name およびalias_label の詳細については、User Aliases documentation.
を参照してください。

新しいユーザーエイリアスオブジェクト指定を持つエンドポイントリクエストボディ

1
2
3
4
5
{
  "external_id" : (optional, string),
  "alias_name" : (required, string),
  "alias_label" : (required, string)
}

リクエスト例

1
2
3
4
5
6
7
8
9
10
11
12
curl --location --request POST 'https://rest.iad-01.braze.com/users/alias/new' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_REST_API_KEY' \
--data-raw '{
  "user_aliases" :[
    {
      "external_id": "external_identifier",
      "alias_name" : "example_name",
      "alias_label" : "example_label"
    }
  ]
}'

レスポンス

1
2
3
4
5
6
Content-Type: application/json
Authorization: Bearer YOUR_REST_API_KEY
{
    "aliases_processed": 1,
    "message": "success"
}
「このページはどの程度役に立ちましたか?」
New Stuff!