Add Contact
You can add a new contact to your account by sending a PUT request to the API endpoint. Your request must include the contact's email address and any additional fields you want to include.
Endpoint Information
Endpoint: https://manage.maileroo.app/v1/contact/[:list_id]
Method: PUT
Content Type: application/json
You can find your list ID in your when you to go to your 'Contacts' section within your organization. There it will display the list-id that you can use in this endpoint.
Request
The request body should contain a JSON object representing the contact you want to add. The contact object should include the contact's email address and any additional fields you want to include.
Request Headers
Content-Type: application/json
X-API-Key: YOUR_API_KEY_HERE
Request Body
{
"subscriber_name": "John Doe",
"subscriber_email": "[email protected]",
"subscriber_timezone": "America/New_York",
"subscriber_tags": "tag1,tag2",
"subscriber_status": "UNCONFIRMED",
"custom_field1": "value1",
"custom_field2": "value2"
}
Required Fields
A contact object represents a contact in your Maileroo account. It contains information about the contact, such as their name, email address, and status. It is represented as a JSON object with the following fields:
Field | Type | Description |
---|---|---|
subscriber_email | string | The email address of the contact (required) |
subscriber_name | string | The name of the contact (optional) |
subscriber_timezone | string | The timezone of the contact (optional) |
subscriber_tags | string | Comma-separated list of tags for the contact (optional) |
subscriber_status | string | The status of the contact (optional, default is "SUBSCRIBED") |
Custom Fields
In addition to the standard fields, you can include custom fields in your request. Custom fields should be specified as key-value pairs in the request body.
Subscriber Status Options
Status | Description |
---|---|
SUBSCRIBED | The contact is currently subscribed to the list. |
UNSUBSCRIBED | The contact is currently unsubscribed from the list. |
UNCONFIRMED | The contact has not yet confirmed their subscription. |
BOUNCED | The contact has been bounced by an email provider. |
COMPLAINED | The contact has marked an email as spam. |
Response
The response will be a JSON object containing the following fields:
Field | Type | Description |
---|---|---|
success | boolean | Boolean indicating whether the request was successful |
message | string | Message describing the result of the request |