Mailrelay API Reference

Get an A/B test by id

GET https://{account}/api/v1/ab_tests/{id}

Authentication

Requires an API key sent in the X-AUTH-TOKEN header.

Get an A/B test by id

Parameters

NameTypeRequiredDescription
id integer Yes ID of the record

Responses

StatusDescription
200 Success
404 Couldn't find record with provided ID.
401 The API key wasn't sent or is invalid
429 Too many requests. You have exceeded the rate limit, wait and try again later.
500 An internal error happened. Try again later.

Response fields

NameTypeDescription
id integer ID
campaign_id integer The campaign ID that will be used as a base for this A/B test
test_type string Test type
percentage integer Which percentage of the subscribers should receive the A/B tests?
decide_with string How should we decide which combination won? "manual" means that you will choose it manually
wait_unit string Wait unit
wait_time integer How long should we wait until the winning combination is selected? Eg.: if you want to wait 2 days, set wait_time = 2 and wait_unit = "days"
number_of_combinations integer Number of combinations
winning_combination string Winning combination
sender_a_id integer Sender A ID. Required if test_type is "sender"
sender_b_id integer Sender B ID. Required if test_type is "sender"
sender_c_id integer Sender C ID. Required if test_type is "sender" and number_of_combinations is 3
subject_a string Subject A. Required if test_type is "subject"
subject_b string Subject B. Required if test_type is "subject"
subject_c string Subject C. Required if test_type is "subject" and number_of_combinations is 3
sent_campaign_a_id integer Sent campaign a
sent_campaign_b_id integer Sent campaign b
sent_campaign_c_id integer Sent campaign c
remaining_sent_campaign_id integer Remaining sent campaign
target string To whom would you like to send this A/B test?
segment_id integer Segment
group_ids array Group ids