API 트리거 전달을 사용하여 트랜잭션 이메일 보내기
/transactional/v1/campaigns/{campaign_id}/send
이 엔드포인트를 사용하여 지정된 사용자에게 즉각적인 일회성 트랜잭션 메시지를 보낼 수 있습니다.
이 엔드포인트는 Braze 트랜잭션 이메일 Campaign 생성 및 해당 Campaign ID와 함께 사용됩니다.

트랜잭션 이메일은 현재 일부 Braze 패키지의 일부로 제공됩니다. 자세한 내용은 Braze 고객 성공 매니저에게 문의하세요.
트리거 Campaign 전송 엔드포인트와 마찬가지로, 이 Campaign 유형을 사용하면 메시지 콘텐츠를 Braze 대시보드 내에 보관하면서 API를 통해 메시지를 언제, 누구에게 보낼지 지정할 수 있습니다. 메시지를 보낼 오디언스 또는 Segment를 허용하는 트리거 Campaign 전송 엔드포인트와 달리, 이 Campaign 유형은 주문 확인 또는 비밀번호 재설정과 같은 1:1 알림 메시징을 위해 특별히 제작된 것이므로 이 엔드포인트에 대한 요청은 external_user_id 또는 user_alias로 단일 사용자를 지정해야 합니다.
필수 조건
이 엔드포인트를 사용하려면 transactional.send 권한으로 API 키를 생성해야 합니다.
사용량 제한
/transactional/v1/campaigns/{campaign_id}/send 엔드포인트는 시간당 단위로 요금이 부과되는 유료 엔드포인트입니다(예: 패키지에 따라 시간당 50,000건). 엔드포인트별 별도의 사용량 제한은 없습니다. 할당된 용량을 초과하여 전송할 수 있지만, SLA 적용 대상은 할당된 용량에 한합니다. 이 엔드포인트에 대한 요청은 전체 외부 API 사용량 제한에 포함됩니다. 해당 한도(예: 모든 엔드포인트에서 시간당 250,000건의 요청)를 초과할 경우, Braze는 429를 반환하고 요청이 제한됩니다. 트랜잭션 볼륨 카운트는 매시간 초기화되므로, 1시간 후에는 새로운 할당량이 제공됩니다. SLA 적용 범위 내에서 이메일의 99.9%는 1분 이내에 발송됩니다.
경로 매개변수
| 매개변수 | 필수 | 데이터 유형 | 설명 |
|---|---|---|---|
campaign_id |
필수 | 문자열 | Campaign의 ID |
요청 본문
1
2
Content-Type: application/json
Authorization: Bearer YOUR-REST-API-KEY
1
2
3
4
5
6
7
8
9
10
11
{
"external_send_id": (optional, string) see the following request parameters,
"trigger_properties": (optional, object) personalization key-value pairs that apply to the user in this request,
"recipient": (required, object)
{
// Either "external_user_id" or "user_alias" is required. Requests must specify only one.
"user_alias": (optional, User alias object) User alias of the user to receive message,
"external_user_id": (optional, string) External identifier of user to receive message,
"attributes": (optional, object) fields in the attributes object create or update an attribute of that name with the given value on the specified user profile before the message is sent and existing values are overwritten
}
}
요청 매개변수
| 매개변수 | 필수 | 데이터 유형 | 설명 |
|---|---|---|---|
external_send_id |
선택 사항 | 문자열 | Base64 호환 문자열입니다. 다음 정규식에 대해 유효성을 검사합니다./^[a-zA-Z0-9-_+\/=]+$/ 이 선택적 필드를 사용하면 이 특정 전송에 대한 내부 식별자를 전달할 수 있으며, 이는 트랜잭션 HTTP 이벤트 포스트백에서 전송된 이벤트에 포함됩니다. 전달된 경우, 이 식별자는 중복 제거 키로도 사용되며, Braze는 이를 24시간 동안 저장합니다. 다른 요청에서 동일한 식별자를 전달하면 Braze에서 24시간 동안 새로운 전송 인스턴스가 생성되지 않습니다. |
trigger_properties |
선택 사항 | 오브젝트 | 트리거 등록정보를 참조하세요. 이 요청에서 사용자에게 적용되는 개인화 키-값 페어입니다. |
recipient |
필수 | 오브젝트 | 이 메시지를 타겟팅하는 사용자입니다. attributes 및 단일 external_user_id 또는 user_alias를 포함할 수 있습니다.Braze에 아직 존재하지 않는 외부 사용자 ID를 제공하는 경우, attributes 오브젝트에 필드를 전달하면 Braze에 이 고객 프로필이 생성되고 새로 생성된 사용자에게 이 메시지가 전송됩니다. 동일한 사용자에게 attributes 오브젝트에 서로 다른 데이터를 포함하여 여러 요청을 보내면 first_name, last_name, email 속성이 동기적으로 업데이트되고 메시지에 템플릿화됩니다. 커스텀 속성에는 이와 같은 보호 기능이 없으므로 이 API를 통해 사용자를 업데이트하고 서로 다른 커스텀 속성 값을 빠르게 연속해서 전달할 때는 주의해서 진행하세요. |
예시 요청
1
2
3
4
5
6
7
8
9
10
11
12
13
14
curl -X POST \
-H 'Content-Type:application/json' \
-H 'Authorization: Bearer YOUR-REST-API-KEY' \
-d '{
"external_send_id" : YOUR_BASE64_COMPATIBLE_ID
"trigger_properties": {
"example_string_property": YOUR_EXAMPLE_STRING,
"example_integer_property": YOUR_EXAMPLE_INTEGER
},
"recipient": {
"external_user_id": TARGETED_USER_ID_STRING
}
}' \
https://rest.iad-01.braze.com/transactional/v1/campaigns/{campaign_id}/send
응답
트랜잭션 이메일 전송 엔드포인트는 이 메시지 전송의 인스턴스를 나타내는 메시지의 dispatch_id로 응답합니다. 이 식별자는 트랜잭션 HTTP 이벤트 포스트백의 이벤트와 함께 단일 사용자에게 전송된 개별 이메일의 상태를 추적하는 데 사용할 수 있습니다.
응답 예시
1
2
3
4
5
{
"dispatch_id": A randomly-generated unique ID of the instance of this send
"status": Current status of the message
"metadata" : Object containing additional information about the send instance
}
문제 해결
엔드포인트는 경우에 따라 오류 코드와 사람이 읽을 수 있는 메시지를 반환할 수도 있으며, 대부분은 유효성 검사 오류입니다. 다음은 잘못된 요청을 할 때 발생할 수 있는 몇 가지 일반적인 오류입니다.
| 오류 | 문제 해결 |
|---|---|
The campaign is not a transactional campaign. Only transactional campaigns may use this endpoint |
제공된 Campaign ID는 트랜잭션 Campaign용이 아닙니다. |
The external reference has been queued. Please retry to obtain send_id. |
최근에 external_send_id가 생성되었습니다. 새 메시지를 전송하려는 경우 새 external_send_id를 시도하세요. |
Campaign does not exist |
제공한 Campaign ID가 기존 Campaign과 일치하지 않습니다. |
The campaign is archived. Unarchive the campaign in order for trigger requests to take effect. |
제공된 Campaign ID는 아카이브된 Campaign에 해당합니다. |
The campaign is paused. Resume the campaign in order for trigger requests to take effect. |
제공된 Campaign ID는 일시 중지된 Campaign에 해당합니다. |
campaign_id must be a string of the campaign api identifier |
제공한 Campaign ID가 올바른 형식이 아닙니다. |
Error authenticating credentials |
제공된 API 키가 유효하지 않습니다. |
Invalid whitelisted IPs |
요청을 전송하는 IP 주소가 IP 화이트리스트에 없습니다(사용 중인 경우). |
You do not have permission to access this resource |
사용된 API 키에 이 작업을 수행할 수 있는 권한이 없습니다. |
Braze의 대부분의 엔드포인트는 너무 많은 요청을 할 경우 429 응답 코드를 반환하는 사용량 제한 구현을 가지고 있습니다. 트랜잭션 전송 엔드포인트는 패키지에 따라 시간당 단위로 측정된 유료 시간 할당량을 가지고 있습니다(예: 시간당 50,000 단위). 이 엔드포인트에 대한 별도의 엔드포인트별 사용량 제한은 없습니다. 할당된 볼륨을 초과하여 전송할 수 있지만, SLA에 의해 보장되는 것은 할당된 볼륨만 해당됩니다. 그 할당량을 초과한 요청은 여전히 전송되지만 SLA에 의해 보장되지 않습니다. 이 엔드포인트에 대한 요청은 전체 외부 API 사용량 제한에 포함됩니다. 그 한도를 초과하면(예: 모든 엔드포인트에서 시간당 250,000 요청) Braze는 429를 반환하고 한도가 재설정될 때까지 요청을 제한합니다. 트랜잭션 볼륨 카운트는 매시간 재설정됩니다. 이 기능에 대한 추가 정보가 필요하면 Braze 고객지원팀에 문의하세요.
트랜잭션 HTTP 이벤트 포스트백
모든 트랜잭션 이메일은 지정된 URL로 HTTP 요청 형태로 전송되는 이벤트 상태 포스트백으로 보완됩니다. 이를 통해 실시간으로 메시지 상태를 평가하고, 메시지가 전달되지 않은 경우 다른 채널을 통해 사용자에게 도달하기 위한 조치를 취하거나, Braze에 지연이 발생하는 경우 내부 시스템으로 대체할 수 있습니다.
고유 식별자를 사용하여 이러한 업데이트를 개별 메시지에 연결할 수 있습니다:
dispatch_id: Braze가 각 메시지에 대해 자동으로 생성하는 고유 ID입니다.external_send_id: 주문 번호와 같이 업데이트를 내부 시스템과 매칭하기 위해 제공하는 커스텀 식별자입니다.
예를 들어, 주문 확인 이메일을 보낼 때 요청에 external_send_id: 1234를 포함하면, 해당 이메일에 대한 모든 후속 이벤트 포스트백(예: Sent 또는 Delivered)에 external_send_id: 1234가 포함됩니다. 이를 통해 주문 #1234의 고객이 주문 확인 이메일을 수신했는지 확인할 수 있습니다.
포스트백 설정하기
Braze 대시보드에서:
- 설정 > 이메일 환경설정으로 이동합니다.
- 트랜잭션 이벤트 상태 포스트백 아래에서, Braze가 트랜잭션 이메일에 대한 상태 업데이트를 보낼 URL을 입력합니다.
- 포스트백을 테스트합니다.

포스트백 본문
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
{
"dispatch_id": (string, a randomly-generated unique ID of the instance of this send),
"status": (string, Current status of message from the following message status table,
"metadata" : (object, additional information relating to the execution of an event)
{
"external_send_id" : (string, If provided at the time of the request, Braze will pass your internal identifier for this send for all postbacks),
"campaign_api_id" : (string, API identifier of this transactional campaign),
"received_at": (ISO 8601 DateTime string, Timestamp of when the request was received by Braze, only included for events with "sent" status),
"enqueued_at": (ISO 8601 DateTime string, Timestamp of when the request was enqueued by Braze, only included for events with "sent" status),
"executed_at": (ISO 8601 DateTime string, Timestamp of when the request was processed by Braze, only included for events with "sent" status),
"sent_at": (ISO 8601 DateTime string, Timestamp of when the request was sent to the ESP by Braze, only included for events with "sent" status),
"processed_at" : (ISO 8601 DateTime string, Timestamp the event was processed by the ESP, only included for events with "processed" status),
"delivered_at" : (ISO 8601 DateTime string, Timestamp the event was delivered to the user's inbox provider, only included for events with "processed" status),
"bounced_at" : (ISO 8601 DateTime string, Timestamp the event was bounced by the user's inbox provider, only included for events with "bounced" status),
"aborted_at" : (ISO 8601 DateTime string, Timestamp the event was Aborted by Braze, only included for events with "aborted" status),
"reason" : (string, The reason Braze or the Inbox provider was unable to process this message to the user, only included for events with "aborted" or "bounced" status),
}
}
메시지 상태
| 상태 | 설명 |
|---|---|
sent |
Braze 이메일 발송 파트너에게 메시지가 성공적으로 전달되었습니다 |
processed |
이메일 발송 파트너가 사용자의 받은편지함 제공업체로 보낼 메시지를 성공적으로 수신하고 준비했습니다 |
aborted |
사용자에게 이메일 가능한 주소가 없거나 메시지 본문에서 Liquid 중단 로직이 호출되어 Braze가 메시지를 성공적으로 발송할 수 없었습니다. 중단된 모든 이벤트에는 메시지가 중단된 이유를 나타내는 메타데이터 오브젝트 내의 reason 필드가 포함됩니다 |
delivered |
사용자의 이메일 받은편지함 제공업체에서 메시지를 수락했습니다 |
bounced |
사용자의 이메일 받은편지함 제공업체에서 메시지를 거부했습니다. 모든 반송 이벤트에는 받은편지함 제공업체가 제공한 반송 오류 코드를 반영하는 메타데이터 오브젝트 내의 reason 필드가 포함됩니다 |
포스트백 예시
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
// Sent Event
{
"dispatch_id": "acf471119f7449d579e8089032003ded",
"status": "sent",
"metadata": {
"received_at": "2020-08-31T18:58:41.000+00:00",
"enqueued_at": "2020-08-31T18:58:41.000+00:00",
"executed_at": "2020-08-31T18:58:41.000+00:00",
"sent_at": "2020-08-31T18:58:42.000+00:00",
"campaign_api_id": "417220e4-5a2a-b634-7f7d-9ec891532368",
"external_send_id" : "34a2ceb3cf6184132f3d816e9984269a"
}
}
// Processed Event
{
"dispatch_id": "acf471119f7449d579e8089032003ded",
"status": "processed",
"metadata": {
"processed_at": "2020-08-31T18:58:42.000+00:00",
"campaign_api_id": "417220e4-5a2a-b634-7f7d-9ec891532368",
"external_send_id" : "34a2ceb3cf6184132f3d816e9984269a"
}
}
// Aborted
{
"dispatch_id": "acf471119f7449d579e8089032003ded",
"status": "aborted",
"metadata": {
"reason": "User not emailable",
"aborted_at": "2020-08-31T19:04:51.000+00:00",
"campaign_api_id": "417220e4-5a2a-b634-7f7d-9ec891532368",
"external_send_id" : "34a2ceb3cf6184132f3d816e9984269a"
}
}
// Delivered Event
{
"dispatch_id": "acf471119f7449d579e8089032003ded",
"status": "delivered",
"metadata": {
"delivered_at": "2020-08-31T18:27:32.000+00:00",
"campaign_api_id": "417220e4-5a2a-b634-7f7d-9ec891532368",
"external_send_id" : "34a2ceb3cf6184132f3d816e9984269a"
}
}
// Bounced Event
{
"dispatch_id": "acf471119f7449d579e8089032003ded",
"status": "bounced",
"metadata": {
"bounced_at": "2020-08-31T18:58:43.000+00:00",
"reason": "550 5.1.1 The email account that you tried to reach does not exist",
"campaign_api_id": "417220e4-5a2a-b634-7f7d-9ec891532368",
"external_send_id" : "34a2ceb3cf6184132f3d816e9984269a"
}
}