# Compliance Keywords Messages

SMS Compliance keywords messages  endpoints allow you to manage answers that are sent to compliance keywords (as STOP for unsubscription )&#x20;

{% hint style="warning" %}
Compliance Keyword messages are only available for SMS
{% endhint %}

### Types of KeyWords (KW field)&#x20;

In order to set customized compliance keyword messages you will need to associate them with a type of keyword ( `kw` ) . Several types exist&#x20;

```
type: string
enum:
  - "optin"
  - "optout"
  - "help"
```

#### OPT IN

Categories all keywords that indicate a subscriber's intention to subscribe or resubscribe to a service (ex START)

#### OPT-OUT

Categories all keywords that indicate a subscriber's intention to unsubscribe  from a service (ex STOP)

#### HELP

Categories all keywords intended to provide simplified instructions to subscribers (ex HELP) .&#x20;

{% hint style="info" %}
Good practices require structuring HELP messages as follows

`brand_name` , `support_contact` (both URL or TFN or email ) followed by `common_keywords` . For example:

`Bird CRM: you can contact us at support@bird.com, send START to subscribe, STOP to unsbscribe. Msg & data charges may applies`&#x20;
{% endhint %}

### Languages&#x20;

Compliance Keywords Messages are always associated with the language; so for example. `optin:en` Identify all keywords in English ( `en` ) that are used to identify a contact opting in to receive communications from a brand

When the filed `lang` Is required, please specify a language using [ISO639-1](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) language codes <br>

### Default Keywords&#x20;

Bird CRM system always listens for predetermined keywords categorized by type and language as below. Via the Compliance Keywords Messages endpoint you can customize the acknowledgment message each category will trigger otherwise the default response will be sent&#x20;

| Type   | Language | Keywords                                      | Default Response                                                                                                                                                                                     |
| ------ | -------- | --------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| help   | de       | HILFE                                         | Verwalten Sie Ihre Einstellungen. Senden Sie HALT, um sich abzumelden. Standardnachrichten- und Datentarife gelten.                                                                                  |
| help   | en       | HELP, INFO                                    | Manage your preferences. Reply STOP to opt out. Msg\&Data rates may apply.                                                                                                                           |
| help   | es       | AYUDA                                         | Administre sus preferencias. Envíe DETENER para cancelar la suscripción. Se pueden aplicar tarifas estándar de mensajes y datos.                                                                     |
| help   | fr       | AIDE                                          | Gerez vos preferences. Repondez ARRET pour vous desabonner. Frais std de mgs et donnees appl.                                                                                                        |
| help   | it       | AIUTO                                         | Gestisci le tue preferenze. Invia FERMA per annullare l'iscrizione. Si applicano le tariffe standard per messaggi e dati.                                                                            |
| help   | nl       | HULP                                          | Beheer uw voorkeuren. Stuur STOP om u af te melden. Standaard bericht- en datatarieven zijn van toepassing.                                                                                          |
| help   | pl       | POMOCY                                        | Zarządzaj swoimi preferencjami. Wyślij ZATRZYMAJ, aby anulować subskrypcję. Obowiązują standardowe opłaty za wiadomości i dane.                                                                      |
| help   | pt       | AJUDA                                         | Gerencie suas preferências. Envie PARAR para cancelar a inscrição. Podem ser aplicadas taxas padrão de mensagens e dados.                                                                            |
| help   | ru       | ПОМОЩЬ                                        | Управляйте своими предпочтениями. Отправьте ОСТАНОВИТЬ, чтобы отказаться от подписки. Применяются стандартные тарифы за сообщения и данные.                                                          |
| help   | zh       | 帮助                                            | 管理您的偏好。回复 停止 退订。可能会收取标准消息和数据费用。                                                                                                                                                                      |
| optin  | de       | START                                         | INFO: Sie haben sich für Marketingnachrichten angemeldet. Senden Sie HALT, um sich abzumelden. Senden Sie HILFE für Informationen. Standardnachrichten- und Datentarife gelten.                      |
| optin  | en       | START, BEGIN, RESUME, REVERT, UNSTOP          | INFO: You have opted in for marketing messages. REPLY STOP to opt out. Reply HELP for info. Msg\&Data rates may apply.                                                                               |
| optin  | es       | START                                         | INFO: Se ha suscrito a mensajes de marketing. Envíe DETENER para cancelar la suscripción. Responda AYUDA para obtener información. Se pueden aplicar tarifas estándar de mensajes y datos.           |
| optin  | fr       | NONARRET                                      | INFO: Vous avez opte pour recevoir des messages. Repondez ARRET pour vous desabonner. Frais std de mgs et donnees appl.                                                                              |
| optin  | it       | START                                         | INFO: Ti sei iscritto per ricevere messaggi di marketing. Invia FERMA per annullare l'iscrizione. Rispondi AIUTO per informazioni. Si applicano le tariffe standard per messaggi e dati.             |
| optin  | nl       | START                                         | INFO: U heeft zich aangemeld voor marketingberichten. Stuur STOP om u af te melden. Stuur HULP voor info. Standaardbericht- en datatarieven zijn van toepassing.                                     |
| optin  | pl       | START                                         | INFO: Zapisano się na wiadomości marketingowe. Wyślij ZATRZYMAJ, aby anulować subskrypcję. Odpowiedz POMOCY, aby uzyskać dodatkowe informacje. Obowiązują standardowe opłaty za wiadomości i dane.   |
| optin  | pt       | START                                         | INFO: Você se inscreveu para receber mensagens de marketing. Envie PARAR para cancelar a inscrição. Responda AJUDA para obter informações. Podem ser aplicadas taxas padrão de mensagens e dados.    |
| optin  | ru       | START                                         | INFO: Вы подписались на маркетинговые сообщения. Отправьте ОСТАНОВИТЬ, чтобы отказаться от подписки. Ответьте ПОМОЩЬ для получения информации. Применяются стандартные тарифы за сообщения и данные. |
| optin  | zh       | 起头                                            | INFO: 您已选择接收营销消息。回复 停止 退订。回复 帮助 获取信息。可能会收取标准消息和数据费用。                                                                                                                                                 |
| optout | de       | HALT                                          | Sie haben sich abgemeldet und erhalten keine weiteren Nachrichten. Senden Sie START, um sich erneut anzumelden. Standardnachrichten- und Datentarife gelten.                                         |
| optout | en       | STOP, STOPALL, END, QUIT, CANCEL, UNSUBSCRIBE | You replied STOP and will be opted-out of further marketing messages. REPLY START to opt-in again or HELP for info. Msg\&Data rates may apply.                                                       |
| optout | es       | DETENER                                       | Se ha dado de baja y no recibirá más mensajes. Envíe START para volver a suscribirse. Se pueden aplicar tarifas estándar de mensajes y datos.                                                        |
| optout | fr       | ARRET                                         | Vous avez ete desabonne et ne recevrez plus de messages. Envoyez START pour vous réabonner Frais std de mgs et donnees appl.                                                                         |
| optout | it       | FERMA                                         | Ti sei disiscritto e non riceverai più messaggi. Invia START per iscriverti nuovamente. Si applicano le tariffe standard per messaggi e dati.                                                        |
| optout | nl       | STOP                                          | U bent afgemeld en ontvangt geen berichten meer. Stuur START om u opnieuw aan te melden. Standaardbericht- en datatarieven zijn van toepassing.                                                      |
| optout | pl       | ZATRZYMAJ                                     | Zrezygnowałeś i nie otrzymasz więcej wiadomości. Wyślij START, aby ponownie się zarejestrować. Obowiązują standardowe opłaty za wiadomości i dane.                                                   |
| optout | pt       | PARAR                                         | Você foi removido e não receberá mais mensagens. Envie START para se inscrever novamente. Podem ser aplicadas taxas padrão de mensagens e dados.                                                     |
| optout | ru       | ОСТАНОВИТЬ                                    | Вы отписались и больше не будете получать сообщения. Отправьте START, чтобы подписаться снова. Применяются стандартные тарифы за сообщения и данные.                                                 |
| optout | zh       | 停止                                            | 您已退订，将不再收到消息。回复 起头 重新订阅。可能会收取标准消息和数据费用。                                                                                                                                                              |

## Endpoints

### List all messages&#x20;

## List all keyword messages

> List all keyword messages for this workspace

```json
{"openapi":"3.0.3","info":{"title":"Channels","version":"v1"},"tags":[],"servers":[{"url":"https://api.bird.com","description":"Production API"}],"security":[{"accessKey":[]}],"components":{"securitySchemes":{"accessKey":{"description":"Uses the Authorization header: 'AccessKey ' followed by your access key token","scheme":"AccessKey","type":"http"}},"schemas":{"KeywordMessageList":{"type":"object","title":"KeywordMessageList","properties":{"results":{"type":"array","items":{"$ref":"#/components/schemas/KeywordMessage"}}}},"KeywordMessage":{"type":"object","title":"KeywordMessage","properties":{"Key":{"type":"string"},"KW":{"$ref":"#/components/schemas/KW"},"Lang":{"type":"string"},"Value":{"type":"string"}}},"KW":{"type":"string","enum":["optin","optout","help","subscriptionRequest"]},"error.detailed":{"additionalProperties":false,"description":"An error returned from the API that includes additional details about the error. The `details` property can contain any additional information about the error that may be helpful for debugging or understanding the error.\n","properties":{"code":{"description":"A unique code that identifies the error. This code can be used to programmatically identify the error.","minLength":3,"type":"string"},"details":{"additionalProperties":true,"description":"Any additional information about the error that may be helpful for debugging or understanding the error.","type":"object"},"message":{"description":"A human-readable message that describes the error.","minLength":1,"type":"string"}},"required":["code","message"],"title":"DetailedError","type":"object"}},"responses":{"requestError":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.detailed"}}},"description":"An error"}}},"paths":{"/workspaces/{workspaceId}/keyword-messages":{"get":{"summary":"List all keyword messages","operationId":"listKeywordMessages","description":"List all keyword messages for this workspace","tags":["keyword","keywords","compliance","compliance_keywords","consent","consents"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/KeywordMessageList"}]}}}},"404":{"$ref":"#/components/responses/requestError"}}}}}}
```

This endpoint will return all the costume messages you have set in the target workspace&#x20;

```
{
	"results": [
		{
			"key": "optout:en",
			"kw": "optout",
			"lang": "en",
			"value": "We are sorry to see you go, please send OOPS if that was a mistake"
		}
}
```

### Define a message for a given keyword&#x20;

## Set keyword message

> Set a keyword message

```json
{"openapi":"3.0.3","info":{"title":"Channels","version":"v1"},"tags":[],"servers":[{"url":"https://api.bird.com","description":"Production API"}],"security":[{"accessKey":[]}],"components":{"securitySchemes":{"accessKey":{"description":"Uses the Authorization header: 'AccessKey ' followed by your access key token","scheme":"AccessKey","type":"http"}},"schemas":{"SetKeywordMessage":{"type":"object","title":"SetKeywordMessage","additionalProperties":false,"properties":{"kw":{"$ref":"#/components/schemas/KW"},"lang":{"type":"string"},"value":{"type":"string"}},"required":["kw","lang","value"]},"KW":{"type":"string","enum":["optin","optout","help","subscriptionRequest"]},"error.detailed":{"additionalProperties":false,"description":"An error returned from the API that includes additional details about the error. The `details` property can contain any additional information about the error that may be helpful for debugging or understanding the error.\n","properties":{"code":{"description":"A unique code that identifies the error. This code can be used to programmatically identify the error.","minLength":3,"type":"string"},"details":{"additionalProperties":true,"description":"Any additional information about the error that may be helpful for debugging or understanding the error.","type":"object"},"message":{"description":"A human-readable message that describes the error.","minLength":1,"type":"string"}},"required":["code","message"],"title":"DetailedError","type":"object"}},"responses":{"requestError":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.detailed"}}},"description":"An error"}}},"paths":{"/workspaces/{workspaceId}/keyword-messages":{"post":{"summary":"Set keyword message","operationId":"setKeywordMessage","description":"Set a keyword message","tags":["keyword","keywords","compliance","compliance_keywords","consent","consents"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetKeywordMessage"}}}},"responses":{"200":{"description":"Keyword message was created"},"400":{"$ref":"#/components/responses/requestError"},"422":{"$ref":"#/components/responses/requestError"}}}}}}
```

```
{
    "kw":    "optout",
    "lang":  "en",
    "value": "We are sorry to see you go, please send OOPS if that was a mistake",
}
```

{% hint style="warning" %}
You can only define a message for a type of keyword and language (`keywordMessageKey ).` You cannot have multiple messages for the same combination of type and language
{% endhint %}

{% hint style="info" %}
If you want to revert to the default message, use the below methods with an empty value "value": ""
{% endhint %}

### Check a Singel Compliance Keyword Message&#x20;

## Get keyword message

> Get keyword messages for this workspace and key (keyword:lang)

```json
{"openapi":"3.0.3","info":{"title":"Channels","version":"v1"},"tags":[],"servers":[{"url":"https://api.bird.com","description":"Production API"}],"security":[{"accessKey":[]}],"components":{"securitySchemes":{"accessKey":{"description":"Uses the Authorization header: 'AccessKey ' followed by your access key token","scheme":"AccessKey","type":"http"}},"schemas":{"KeywordMessage":{"type":"object","title":"KeywordMessage","properties":{"Key":{"type":"string"},"KW":{"$ref":"#/components/schemas/KW"},"Lang":{"type":"string"},"Value":{"type":"string"}}},"KW":{"type":"string","enum":["optin","optout","help","subscriptionRequest"]},"error.detailed":{"additionalProperties":false,"description":"An error returned from the API that includes additional details about the error. The `details` property can contain any additional information about the error that may be helpful for debugging or understanding the error.\n","properties":{"code":{"description":"A unique code that identifies the error. This code can be used to programmatically identify the error.","minLength":3,"type":"string"},"details":{"additionalProperties":true,"description":"Any additional information about the error that may be helpful for debugging or understanding the error.","type":"object"},"message":{"description":"A human-readable message that describes the error.","minLength":1,"type":"string"}},"required":["code","message"],"title":"DetailedError","type":"object"}},"responses":{"requestError":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.detailed"}}},"description":"An error"}}},"paths":{"/workspaces/{workspaceId}/keyword-messages/{keywordMessageKey}":{"get":{"summary":"Get keyword message","operationId":"getKeywordMessages","description":"Get keyword messages for this workspace and key (keyword:lang)","tags":["keyword","keywords","compliance","compliance_keywords","consent","consents"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/KeywordMessage"}]}}}},"404":{"$ref":"#/components/responses/requestError"}}}}}}
```

`keywordMessageKey` indicates the keyword type and languages, for example for the example above it would be `optout:en`


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.bird.com/api/channels-api/api-reference/compliance-keywords-messages.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
