Mailrelay API Reference

Update a subscriber

PATCH https://{account}/api/v1/subscribers/{id}

Authentication

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

Update a subscriber

Parameters

NameTypeRequiredDescription
id integer Yes ID of the record
sms_phone string No SMS phone
whatsapp_phone string No WhatsApp phone
name string No Name
address string No Address
city string No City
state string No State
country string No Country of the subscriber. The value should be in ISO 3166-1 alpha-2 format
birthday string No Birthday
website string No Website
locale string No Locale
time_zone string No Time zone
group_ids array No An array of group IDs that this subscriber should be assigned to. Example: [1, 4, 5]

Responses

StatusDescription
200 Success
400 The request is invalid. Check if the field names in the request and the request data is valid.
422 A validation error occurred. Check the response body for more information.
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
name string Name
email string Email
status string Status
sms_phone string SMS phone
sms_status string SMS status
whatsapp_phone string WhatsApp phone
whatsapp_status string WhatsApp status
subscribed_at string Subscribed at
subscribed_with_acceptance boolean Subscribed with acceptance
subscribe_ip string Subscribe ip
unsubscribed boolean Unsubscribed
unsubscribed_at string Unsubscribed at
unsubscribe_ip string Unsubscribe ip
unsubscribe_sent_email_id integer Unsubscribe sent email
score integer Score
address string Address
city string City
state string State
country string Country of the subscriber. The value should be in ISO 3166-1 alpha-2 format
birthday string Birthday
website string Website
time_zone string Time zone
locale string Locale
bounced boolean Bounced
bounce_category string Bounce category
reported_spam boolean Reported spam
local_ban boolean Local ban
global_ban boolean Global ban
created_at string Created at
updated_at string Updated at
groups array Groups
tags array Tags
custom_fields object Custom fields