# Supplier Compliance & Opt-Out Management

Dripcel provides a comprehensive set of API endpoints designed to help third-party suppliers remain fully compliant with your internal marketing rules and regulatory obligations.  
These tools ensure **seamless synchronization of opt-outs**, **consistent customer experiences**, and **centralized compliance control** across all campaigns and integrations.


---

## 🔑 Getting Started: API Keys & Permissions

Before integrating, [create a unique](/doc/profile-GlSmxT5jUG) **API key** for each supplier under your **Profile → API Keys** section.  
Assign [**permissions**](/doc/martech-api-sNUZHSmfyk) that define which resources they can access and what operations they’re allowed to perform.


:::tip
 **Tip:** Always grant the **minimum required permissions** for each supplier to maintain compliance and security.

:::


---

## 🔄 Keeping Opt-Outs in Sync

Maintaining synchronized opt-out data between Dripcel and your suppliers prevents non-compliant sends to users who have opted out of marketing communications — whether in your own campaigns or your suppliers’.

There are two key processes to manage opt-outs:


1. **Suppliers notifying Dripcel** when contacts opt out on their side.
2. **Suppliers retrieving** opt-out data from Dripcel to update their systems.


---

## 🚫 Adding Opt-Outs to Dripcel

When a contact opts out through a supplier’s system, the supplier must notify Dripcel to update that contact’s status.  
There are two main ways to do this: via the **Opt-Out API** or using **Tags**.


---

### 1. Using the Opt-Out API

Dripcel [automatically tracks opt-outs](/doc/supplier-compliance-opt-out-management-31s2KtVfU7) from inbound SMS replies containing keywords such as “STOP”.  
Suppliers can replicate this behavior using the following endpoint:

```yaml
POST /contacts/{cell}/optOut

{
  // The campaign IDs to opt-out from
  "campaign_ids": ["123"],
  // Create the contact if they don't exist
  "create_missing_contact": true
}
```


---

### 2. Using Tags

Alternatively, suppliers can add a tag to opt-out contacts — for example, a `#DNC` (Do Not Contact) tag — and exclude this tag in future campaign sends.

`PUT /contacts/{cell}/tag/add `


```yaml
PUT /contacts/{cell}/tag/add
{
  "tag_ids": ["DNC_tag_id"],
  // Create the contact if they don't exist
  "create_missing_contact": true
}
```

**Usage example:**  
Exclude `#DNC`-tagged contacts in your campaign’s **Recipients → Exclude Tags** filter.


---

## 📥 Pulling Opt-Outs from Dripcel

To ensure your suppliers are aligned with your compliance status, they can periodically fetch opt-outs from Dripcel using the [**Contacts Search**](/doc/contacts-OmgWadaH8T) **API**.

This allows suppliers to dynamically exclude opted-out contacts before running their campaigns.

### Example: Pull Contacts Tagged as “Do Not Contact”

```yaml
POST /contacts/search

{
  "find": {
    "tag_ids": {
      "$all": ["DNC_tag_id"]
    },
    "updatedAt": {
      /** 24 hours ago */
      "$gte": "2021-01-01T00:00:00.000Z"
    }
  },

  "projection": {
    "cell": 1
  }
}
```


---

## 📊 Checking Compliance: Query a Campaign

Suppliers can verify contact eligibility before sending by querying a list of cell numbers against a campaign’s targeting and compliance rules.

### Endpoint

`POST /compliance/send `

**Example:**

`{   "country": "ZA",   "cell": ["1234567890", "1234567234"] } `

**Response:**

`{   "ok": true,   "data": {     "campaign_id": "abc123",     "credits_used": 2,     "results": [       { "cell": "1234567890", "can_send": true },       { "cell": "1234567234", "can_send": false }     ]   } } `


---

## 🧩 How to Use Compliance Checks Effectively

* You can **use an existing campaign** or **create a dedicated compliance campaign** for supplier checks.
* Campaigns used for compliance checks can leverage **tags, segments, and opt-out rules** — giving you fine-grained control over who suppliers are permitted to message.
* Dripcel automatically deducts **0.14 credits per number queried**, ensuring fairness and visibility.


---


:::success
###  Benefits of Centralized Compliance

* Prevents double messaging across multiple partners
* Ensures brand reputation and legal compliance
* Automates synchronization of opt-outs between your CRM and supplier systems
* Enables auditable, real-time verification for every message sent

:::