Skip to main content

Create a contact

API reference
const response = await fetch("https://app.loops.so/api/v1/contacts/create", {
  method: "POST",
  headers: {
    "Authorization": "Bearer <your-api-key>",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    email: "test@example.com",
    firstName: "John",
    lastName: "Doe",
  }),
});

const data = await response.json();

Create a contact and add them to a mailing list

API reference
const response = await fetch("https://app.loops.so/api/v1/contacts/create", {
  method: "POST",
  headers: {
    "Authorization": "Bearer <your-api-key>",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    email: "test@example.com",
    firstName: "John",
    lastName: "Doe",
    mailingLists: {
      "<mailing-list-id>": true
    },
  }),
});

const data = await response.json();

Update a contact

When updating a contact you must provide an email or userId value to identify the contact.
You can use the “update” endpoint to update or create contacts. If the provided email or user ID does not exist, a new contact will be created.
API reference
const response = await fetch("https://app.loops.so/api/v1/contacts/update", {
  method: "PUT",
  headers: {
    "Authorization": "Bearer <your-api-key>",
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
    email: "test@example.com",
    planName: "Pro",
  }),
});

const data = await response.json();

Update a contact’s email address

For this the contact will need to already have a userId value set. API reference
const response = await fetch("https://app.loops.so/api/v1/contacts/update", {
  method: "PUT",
  headers: {
    "Authorization": "Bearer <your-api-key>",
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
    userId: "12345",
    email: "new-email@example.com",
  }),
});

const data = await response.json();

Subscribe a contact to a mailing list

API reference
const response = await fetch("https://app.loops.so/api/v1/contacts/update", {
  method: "PUT",
  headers: {
    "Authorization": "Bearer <your-api-key>",
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
    email: "test@example.com",
    mailingLists: {
      "<mailing-list-id>" => true
    },
  }),
});

const data = await response.json();

Unsubscribe a contact from a mailing list

This removes a contact from a specific mailing list. See below to see how to fully unsubscribe a contact. Use false to unsubscribe a contact from a mailing list. API reference
const response = await fetch("https://app.loops.so/api/v1/contacts/update", {
  method: "PUT",
  headers: {
    "Authorization": "Bearer <your-api-key>",
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
    email: "test@example.com",
    mailingLists: {
      "<mailing-list-id>" => false
    },
  }),
});

const data = await response.json();

Unsubscribe a contact

Set subscribed to false to unsubscribe a contact. The contact will no longer receive campaign or loop emails, but will remain listed in your audience. API reference
const response = await fetch("https://app.loops.so/api/v1/contacts/update", {
  method: "PUT",
  headers: {
    "Authorization": "Bearer <your-api-key>",
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
    email: "test@example.com",
    subscribed: false,
  }),
});

const data = await response.json();

Delete a contact

You can delete contacts by email or user ID. API reference
const response = await fetch("https://app.loops.so/api/v1/contacts/delete", {
  method: "POST",
  headers: {
    "Authorization": "Bearer <your-api-key>",
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
    email: "test@example.com",
  }),
});

const data = await response.json();

Check contact suppression status

API reference
const params = new URLSearchParams({ email: "test@example.com" });

const response = await fetch(
  `https://app.loops.so/api/v1/contacts/suppression?${params.toString()}`,
  {
    method: "GET",
    headers: {
      "Authorization": "Bearer <your-api-key>",
    },
  },
);

const data = await response.json();

Remove suppression for a contact

API reference
const params = new URLSearchParams({ email: "test@example.com" });

const response = await fetch(
  `https://app.loops.so/api/v1/contacts/suppression?${params.toString()}`,
  {
    method: "DELETE",
    headers: {
      "Authorization": "Bearer <your-api-key>",
    },
  },
);

const data = await response.json();
Last modified on March 25, 2026