@lap v0.3
# Machine-readable API spec. Each @endpoint block is one API call.
@api Braze Endpoints
@auth ApiKey Authorization in header
@endpoints 68
@hint download_for_search
@toc email(6), campaigns(7), sends(2), canvas(8), events(2), kpi(4), feed(3), purchases(1), segments(3), sessions(1), users(9), messages(5), transactional(1), sms(2), subscription(6), content_blocks(4), templates(4)

@group email
@endpoint GET /email/hard_bounces
@optional {start_date: str, end_date: str, limit: str, offset: str, email: str}

@endpoint GET /email/unsubscribes
@optional {start_date: str, end_date: str, limit: str, offset: str, sort_direction: str, email: str}

@endpoint POST /email/status
@required {email: str, subscription_state: str}

@endpoint POST /email/bounce/remove
@required {email: str}

@endpoint POST /email/spam/remove
@required {email: str}

@endpoint POST /email/blacklist
@required {email: [str]}

@endgroup

@group campaigns
@endpoint GET /campaigns/data_series
@optional {campaign_id: str, length: str, ending_at: str}

@endpoint GET /campaigns/details
@optional {campaign_id: str}

@endpoint GET /campaigns/list
@optional {page: str, include_archived: str, sort_direction: str, last_edit.time[gt]: str}

@endgroup

@group sends
@endpoint GET /sends/data_series
@optional {campaign_id: str, send_id: str, length: str, ending_at: str}

@endgroup

@group canvas
@endpoint GET /canvas/data_series
@optional {canvas_id: str, ending_at: str, starting_at: str, length: str, include_variant_breakdown: str, include_step_breakdown: str, include_deleted_step_data: str}

@endpoint GET /canvas/data_summary
@optional {canvas_id: str, ending_at: str, starting_at: str, length: str, include_variant_breakdown: str, include_step_breakdown: str, include_deleted_step_data: str}

@endpoint GET /canvas/details
@optional {canvas_id: str}

@endpoint GET /canvas/list
@optional {page: str, include_archived: str, sort_direction: str, last_edit.time[gt]: str}

@endgroup

@group events
@endpoint GET /events/list
@optional {page: str}

@endpoint GET /events/data_series
@optional {event: str, length: str, unit: str, ending_at: str, app_id: str, segment_id: str}

@endgroup

@group kpi
@endpoint GET /kpi/new_users/data_series
@optional {length: str, ending_at: str, app_id: str}

@endpoint GET /kpi/dau/data_series
@optional {length: str, ending_at: str, app_id: str}

@endpoint GET /kpi/mau/data_series
@optional {length: str, ending_at: str, app_id: str}

@endpoint GET /kpi/uninstalls/data_series
@optional {length: str, ending_at: str, app_id: str}

@endgroup

@group feed
@endpoint GET /feed/data_series
@optional {card_id: str, length: str, unit: str, ending_at: str}

@endpoint GET /feed/details
@optional {card_id: str}

@endpoint GET /feed/list
@optional {page: str, include_archived: str, sort_direction: str}

@endgroup

@group purchases
@endpoint GET /purchases/product_list
@optional {page: str}

@endgroup

@group segments
@endpoint GET /segments/list
@optional {page: str, sort_direction: str}

@endpoint GET /segments/data_series
@optional {segment_id: str, length: str, ending_at: str}

@endpoint GET /segments/details
@optional {segment_id: str}

@endgroup

@group sessions
@endpoint GET /sessions/data_series
@optional {length: str, unit: str, ending_at: str, app_id: str, segment_id: str}

@endgroup

@group users
@endpoint POST /users/export/ids
@required {external_ids: [str], user_aliases: [map], device_id: str, braze_id: str, email_address: str, phone: str, fields_to_export: [str]}

@endpoint POST /users/export/segment
@required {segment_id: str, callback_endpoint: str, fields_to_export: [str], output_format: str}

@endpoint POST /users/export/global_control_group
@required {callback_endpoint: str, fields_to_export: [str], output_format: str}

@endgroup

@group messages
@endpoint GET /messages/scheduled_broadcasts
@optional {end_time: str}

@endpoint POST /messages/schedule/delete
@required {schedule_id: str}

@endgroup

@group campaigns
@endpoint POST /campaigns/trigger/schedule/delete
@required {campaign_id: str, schedule_id: str}

@endgroup

@group canvas
@endpoint POST /canvas/trigger/schedule/delete
@required {canvas_id: str, schedule_id: str}

@endgroup

@group messages
@endpoint POST /messages/schedule/create

@endgroup

@group campaigns
@endpoint POST /campaigns/trigger/schedule/create

@endgroup

@group canvas
@endpoint POST /canvas/trigger/schedule/create
@required {canvas_id: str, recipients: [map], audience: map, broadcast: bool, canvas_entry_properties: map, schedule: map}

@endgroup

@group messages
@endpoint POST /messages/schedule/update
@required {schedule_id: str, schedule: map, messages: map}

@endgroup

@group campaigns
@endpoint POST /campaigns/trigger/schedule/update
@required {campaign_id: str, schedule_id: str, schedule: map}

@endgroup

@group canvas
@endpoint POST /canvas/trigger/schedule/update
@required {canvas_id: str, schedule_id: str, schedule: map}

@endgroup

@group sends
@endpoint POST /sends/id/create
@required {campaign_id: str, send_id: str}

@endgroup

@group messages
@endpoint POST /messages/send

@endgroup

@group campaigns
@endpoint POST /campaigns/trigger/send
@required {campaign_id: str, send_id: str, trigger_properties: str, broadcast: bool, audience: map, recipients: [map]}

@endgroup

@group canvas
@endpoint POST /canvas/trigger/send
@required {canvas_id: str, canvas_entry_properties: map, broadcast: bool, audience: map, recipients: [map]}

@endgroup

@group transactional
@endpoint POST /transactional/v1/campaigns/YOUR_CAMPAIGN_ID_HERE/send

@endgroup

@group sms
@endpoint GET /sms/invalid_phone_numbers
@optional {start_date: str, end_date: str, limit: str, offset: str, phone_numbers: str}

@endpoint POST /sms/invalid_phone_numbers/remove
@required {phone_numbers: [str]}

@endgroup

@group subscription
@endpoint GET /subscription/status/get
@optional {subscription_group_id: str, external_id: str, email: str}

@endpoint GET /subscription/user/status
@optional {external_id: str, email: str, limit: str, offset: str}

@endpoint POST /subscription/status/set
@required {subscription_group_id: str, subscription_state: str, external_id: str, email: [str]}

@endpoint GET /subscription/status/get
@optional {subscription_group_id: str, external_id: str, phone: str}

@endpoint GET /subscription/user/status
@optional {external_id: str, limit: str, offset: str, phone: str}

@endpoint POST /subscription/status/set
@required {subscription_group_id: str, subscription_state: str, external_id: str, phone: [str]}

@endgroup

@group content_blocks
@endpoint GET /content_blocks/list
@optional {modified_after: str, modified_before: str, limit: str, offset: str}

@endpoint GET /content_blocks/info
@optional {content_block_id: str, include_inclusion_data: str}

@endpoint POST /content_blocks/create
@required {name: str, description: str, content: str, state: str, tags: [str]}

@endpoint POST /content_blocks/update
@required {content_block_id: str, name: str, description: str, content: str, state: str, tags: [str]}

@endgroup

@group templates
@endpoint GET /templates/email/list
@optional {modified_after: str, modified_before: str, limit: str, offset: str}

@endpoint GET /templates/email/info
@optional {email_template_id: str}

@endpoint POST /templates/email/create
@required {template_name: str, subject: str, body: str, plaintext_body: str, preheader: str, tags: [str]}

@endpoint POST /templates/email/update
@required {email_template_id: str, template_name: str, subject: str, body: str, plaintext_body: str, preheader: str, tags: [str]}

@endgroup

@group users
@endpoint POST /users/external_ids/remove
@required {external_ids: [str]}

@endpoint POST /users/external_ids/rename
@required {external_id_renames: [map]}

@endpoint POST /users/alias/new
@required {user_aliases: [map]}

@endpoint POST /users/delete
@required {external_ids: [str], user_aliases: [str], braze_ids: [str]}

@endpoint POST /users/identify
@required {aliases_to_identify: [map]}

@endpoint POST /users/track
@required {attributes: [map], events: [map], purchases: [map]}
@optional {: str}

@endgroup

@end
