> ## Documentation Index
> Fetch the complete documentation index at: https://developers.phonovation.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Compliance

> Irish regulatory requirements for SMS marketing and promotional messaging.

> [!WARNING]
>
> This page provides a developer-focused summary of key compliance requirements. It is not legal advice. Consult a legal professional for full regulatory guidance.

## Opt-out handling

For all **marketing and promotional SMS messages** sent to Irish numbers, recipients must be given the ability to opt out. The standard opt-out mechanism in Ireland is:

```mermaid title="Opt-out handling flow" theme={"dark"}
flowchart TD
  Message["Send marketing SMS with opt-out text"] --> Reply["Recipient replies STOP or OPTOUT"]
  Reply --> Relay["Inbound relay receives opt-out"]
  Relay --> Suppress["Add number to suppression list"]
  Suppress --> Block["Do not send further marketing messages"]
```

```text title="Opt-out keywords" icon="ban" wrap theme={"dark"}
OPTOUT to 50123
  or
STOP to 50123
```

You are responsible for including opt-out instructions in your marketing messages and for honouring opt-out requests. Once a recipient has opted out, you must not send them further marketing messages.

### Example compliant message

```text title="Compliant marketing message" icon="message" wrap theme={"dark"}
Phonovation: 20% off this weekend only. Shop now at phonovation.com.
To opt out reply STOP to 50123.
```

### Handling inbound STOP messages

Set up [Inbound Message Relays](https://developers.phonovation.com/interactsms-api/guides/inbound-messages.md) to receive opt-out replies. When you receive a `STOP` or `OPTOUT` keyphrase, remove that number from your active sending list immediately.

```bash title="cURL" icon="terminal" wrap theme={"dark"}
curl -X POST https://example.com/sms/inbound \
  -H "Content-Type: application/x-www-form-urlencoded" \
  -d "SMS-Keyphrase=STOP&SMS-From=353861234567"
```

```python title="Python" icon="python" lines focus={5-8} theme={"dark"}
from flask import Flask, request

app = Flask(__name__)

@app.post("/sms/inbound")
def inbound():
    keyphrase = request.form.get("SMS-Keyphrase", "").upper()
    sender = request.form.get("SMS-From")

    if keyphrase in ["STOP", "OPTOUT"]:
        suppression_list.add(sender)

    return "", 200
```

```csharp title="C#" icon="code" lines focus={5-9} theme={"dark"}
app.MapPost("/sms/inbound", async (HttpRequest request) =>
{
    var form = await request.ReadFormAsync();
    var keyphrase = form["SMS-Keyphrase"].ToString().ToUpperInvariant();
    var from = form["SMS-From"].ToString();

    if (keyphrase is "STOP" or "OPTOUT")
    {
        suppressionList.Add(from);
    }

    return Results.Ok();
});
```

```java title="Java" icon="java" lines focus={4-8} theme={"dark"}
post("/sms/inbound", (req, res) -> {
    String keyphrase = req.queryParams("SMS-Keyphrase").toUpperCase();
    String from = req.queryParams("SMS-From");

    if (keyphrase.equals("STOP") || keyphrase.equals("OPTOUT")) {
        suppressionList.add(from);
    }

    res.status(200);
    return "";
});
```

```php title="PHP" icon="php" lines focus={4-7} theme={"dark"}
$keyphrase = strtoupper($_POST['SMS-Keyphrase'] ?? '');
$from = $_POST['SMS-From'] ?? '';

if ($keyphrase === 'STOP' || $keyphrase === 'OPTOUT') {
    $suppressionList->add($from);
}

http_response_code(200);
```

```js title="JavaScript" icon="js" lines focus={5-7} theme={"dark"}
app.post('/sms/inbound', (req, res) => {
  const keyphrase = req.body['SMS-Keyphrase']?.toUpperCase();
  const from = req.body['SMS-From'];

  if (keyphrase === 'STOP' || keyphrase === 'OPTOUT') {
    suppressionList.add(from); // add to your opt-out list
  }

  res.sendStatus(200);
});
```

## Sender ID registration

All alphanumeric Sender IDs used to send to Irish numbers must be **registered with ComReg** (Commission for Communications Regulation).

## Transactional vs marketing messages

| Type | Opt-out required | ComReg Sender ID required |
| - | - | - |
| Marketing / promotional | Yes | Yes |
| Transactional (order confirmations, alerts, OTPs) | Recommended | Yes (for Irish numbers) |

## Data protection

SMS campaigns targeting Irish recipients are subject to **GDPR** and the **ePrivacy Regulations**. Key obligations include:

* You must have a valid legal basis (typically consent) for sending marketing messages
* You must maintain records of consent
* You must honour opt-out requests promptly
* Personal data (phone numbers) must be processed lawfully and securely

Contact [support@phonovation.com](mailto:support@phonovation.com) if you have questions about compliance requirements for your specific use case.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.