Create Contact
1import { Reloop } from "reloop-email";2
3const reloop = new Reloop({ apiKey: "rl_123456789" });4
5const { contact, contactError } = await reloop.contacts.create({6 email: "john.doe@example.com",7 firstName: "John",8 lastName: "Doe",9 status: "subscribed",10 properties: { company: "Reloop", role: "Developer" },11 groupIds: ["grp_123456789"],12 channels: [{ channelId: "chn_123456789", subscription: "opt_in" }],13});14if (contactError) throw contactError;1{2 "object": "contact",3 "id": "con_123456789",4 "email": "john.doe@example.com",5 "firstName": "John",6 "lastName": "Doe",7 "status": "subscribed",8 "properties": {9 "company": "Reloop",10 "role": "Developer"11 },12 "groups": [13 {14 "id": "grp_123456789",15 "name": "Beta Testers"16 }17 ],18 "channels": [19 {20 "id": "channel_123456789",21 "name": "Newsletter",22 "subscription": "opt_in"23 }24 ],25 "suppressionReason": null,26 "suppressedAt": null,27 "createdAt": "2026-03-23T10:00:00.000Z",28 "updatedAt": "2026-03-23T10:00:00.000Z",29 "event": "evt_123456789"30}Body Parameters
emailstringRequired
Contact email address
firstNamestring
Contact first name
lastNamestring
Contact last name
status"subscribed" | "unsubscribed" | "blocked"
Possible values: subscribed | unsubscribed | blocked
propertiesobject
Contact properties as key-value pairs
Custom properties
keystringRequired
The property key.
valuestringRequired
The property value.
groupIdsstring[]
Array of group IDs to add the contact to
Example: ["value1", "value2"]
channelsobject[]
Array of channels to enroll the contact in
channels properties
channelIdstringRequired
Channel identifier
subscription"opt_in" | "opt_out"Required
Possible values: opt_in | opt_out
Was this page helpful?
- Need help? Contact Support.
- Chat with Reloop developers on Discord.
- Check out our changelog.
- Questions? Contact Sales.
- LLM? Read llms.txt.