Skip to content

キャンペーンの詳細のエクスポート

get

/campaigns/details

このエンドポイントを使用して、campaign_id で識別できる、指定されたキャンペーンの関連情報を取得します。

キャンバスデータを取得する場合は、「キャンバス詳細のエクスポート」エンドポイントを参照してください。

前提条件

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

レート制限

API レート制限に記載されているように、このエンドポイントにはデフォルトの Braze レート制限(1時間あたり250,000リクエスト)が適用されます。

リクエストパラメーター

リクエスト例

1
2
curl --location -g --request GET 'https://rest.iad-01.braze.com/campaigns/details?campaign_id={{campaign_identifier}}' \
--header 'Authorization: Bearer YOUR-REST-API-KEY'

応答

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
{
    "message": (required, string) the status of the export, returns 'success' when completed without errors,
    "created_at" : (string) the date created as ISO 8601 date,
    "updated_at" : (string) the date last updated as ISO 8601 date,
    "archived": (boolean) whether this campaign is archived,
    "draft": (boolean) whether this campaign is a draft,
    "enabled": (boolean) whether this campaign is active or not,
    "has_post_launch_draft": (boolean) whether this campaign has a post-launch draft,
    "name" : (string) the campaign name,
    "description" : (string) the campaign description,
    "schedule_type" : (string) the type of scheduling action,
    "channels" : (array) the list of channels to send via,
    "first_sent" : (string) the date and hour of first sent as ISO 8601 date,
    "last_sent" : (string) the date and hour of last sent as ISO 8601 date,
    "tags" : (array) the tag names associated with the campaign,
    "teams" : (array) the names of the Teams associated with the campaign,
    "messages": {
        "message_variation_id": (string) { // <=This is the actual id
            "channel": (string) the channel type of the message, must be either email, ios_push, webhook, content_card, in-app_message, or sms,
            "name": (string) the name of the message in the dashboard (for example, "Variation 1"),
            "has_translatable_content": (boolean) whether the message has translatable content (only present if `include_has_translatable_content` is true); `true` if locales are configured and the message contains at least one translation tag; `false` if no locales are configured or no translation tags detected; `null` if detection could not be completed,
            ... channel-specific fields for this message, see the following messages section ...
        }
    },
    "conversion_behaviors": (array) the conversion event behaviors assigned to the campaign, see the following conversions behavior section.
}

チャネル別のメッセージ

messages レスポンスには、各メッセージに関する情報が含まれます。チャネルごとのメッセージレスポンスの例を次に示します。

1
2
3
4
5
{
    "channel": "content_cards",
    "name": (string) the name of variant,
    "extras": (hash) any key-value pairs provided; only present if at least one key-value pair has been set
}

レスポンスの形式は、アプリ内メッセージのタイプによって異なります。アンケートのアプリ内メッセージは typedata フィールドを返します。その他のアプリ内メッセージタイプ (スライドアップ、モーダル、フルスクリーン) は namemessageextras フィールドを返します。

アンケート

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
{
    "type": (string) the description of in-app message type, such as "survey",
    "data": {
        "pages": [
            {
                "header":
                    {
                         "text":(string) the display text for the header of the survey
                    }
                "choices": [
                    {
                       "choice_id": (string) the choice identifier,
                       "text": (string) the display text,
                       "custom_attribute_key": (string) the custom attribute key,
                       "custom_attribute_value": (sting) the custom attribute value,
                       "deleted": (boolean) deleted from live campaign
                    },
                    ...
                ]
            }
        ]
    }
}

スライドアップ、モーダル、フルスクリーンアプリ内メッセージ

1
2
3
4
5
6
{
    "channel": "in_app_message",
    "name": (string) the name of the variant,
    "message": (string, optional) the body text,
    "extras": (hash, optional) any key-value pairs provided; only present if at least one key-value pair has been set
}
1
2
3
4
5
6
7
8
9
10
{
    "channel": (string) the description of the channel, such as "ios_push" or "android_push",
    "name": (string) the name of the variant,
    "alert": (string) the alert body text,
    "extras": (hash) any key-value pairs provided,
    "title": (string) the alert title text,
    "action": (string) action link from click,
    "image_url": (string) the image URL for an Android notification image, an iOS notification image, or a Web push icon image,
    "large_image_url": (string) the web notification image URL for Android Chrome and Windows web push actions; null in other cases
}
1
2
3
4
5
6
{
  "channel": "sms",
  "body": (string) the payload body,
  "from": (string) the list of numbers associated with the subscription group,
  "subscription_group_id": (string) the API id of the subscription group targeted in the SMS message
}
1
2
3
4
5
6
7
8
{
    "channel": "webhook",
    "url": (string) the URL for webhook,
    "body": (string) the payload body,
    "type": (string) the body content type,
    "headers": (hash) the specified request headers,
    "method": (string) the HTTP method, either POST or GET
}

テンプレートメッセージ

1
2
3
4
5
6
7
8
9
10
{
  "channel": "whats_app",
  "subscription_group_id": (string) the API ID of the subscription group selected in the WhatsApp message
  "from": (array) the list of strings of the numbers associated with the subscription group,
  "template_name": (string) the name of the WhatsApp template being sent,
  "template_language_code": (string) the language code of the WhatsApp template being sent,
  "header_variables": (array) the list of strings, if present, of Liquid variables being inserted into header of WhatsApp template being sent,
  "body_variables": (array) the list of strings, if present, of Liquid variables being inserted into body of WhatsApp template being sent,
  "button_variables": (array) the list of strings, if present, of Liquid variables being inserted into buttons of WhatsApp template being sent
}

応答メッセージ

1
2
3
4
5
6
7
8
9
10
{
  "channel": "whats_app",
  "subscription_group_id": (string) the API ID of the subscription group selected in the WhatsApp message,
  "from": (array) list of strings of the numbers associated with the subscription group,
  "layout": (string) the name of the WhatsApp template being sent (text or media or quick-reply),
  "header_text": (string, optional) the text, if present, of the header of the message being sent,
  "body_text": (string, optional) the text, if present, of the body of the message being sent,
  "footer_text": (string, optional) the text, if present, of the footer of the message being sent,
  "buttons": (array) list of button objects in the message being sent ({"text": (string) the text of the button})
}
1
2
3
4
{
    "channel": (string) the description of the channel that the control is for,
    "type": "control"
}

コンバージョン動作

conversion_behaviors 配列には、キャンペーンに設定された各コンバージョンイベントの動作に関する情報が含まれます。これらの動作は、キャンペーンで設定された順序で並んでいます。たとえば、コンバージョンイベント A は配列の最初の項目、コンバージョンイベント B は2番目の項目、というようになります。以下に、コンバージョンイベント動作のレスポンスの例を示します。

1
2
3
4
{
    "type": "Clicks Email",
    "window": (integer) the number of seconds during which the user can convert on this event, such as 86400, which is 24 hours
}
1
2
3
4
{
    "type": "Opens Email",
    "window": (integer) the number of seconds during which the user can convert on this event, such as 86400, which is 24 hours
}
1
2
3
4
{
    "type": "Makes Any Purchase",
    "window": (integer) the number of seconds during which the user can convert on this event, such as 86400, which is 24 hours
}
1
2
3
4
5
{
    "type": "Makes Specific Purchase",
    "window": (integer) the number of seconds during which the user can convert on this event, such as 86400, which is 24 hours,
    "product": (string) the name of the product, such as "Feline Body Armor"
}
1
2
3
4
5
{
    "type": "Performs Custom Event",
    "window": (integer) the number of seconds during which the user can convert on this event, such as 86400, which is 24 hours,
    "custom_event_name": (string) the name of the event, such as "Used Feline Body Armor"
}
1
2
3
4
5
{
    "type": "Upgrades App",
    "window": (integer) the number of seconds during which the user can convert on this event, such as 86400, which is 24 hours,
    "app_ids": (array or null) array of app ids, such as ["12345", "67890"], or `null` if "Track sessions for any app" is selected in the UI
}
1
2
3
4
5
{
    "type": "Starts Session",
    "window": (integer) the number of seconds during which the user can convert on this event, such as 86400, which is 24 hours,
    "app_ids": (array or null) array of app ids, such as ["12345", "67890"], or `null` if "Track sessions for any app" is selected in the UI
}
New Stuff!