> For the complete documentation index, see [llms.txt](https://apidocs.api19.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://apidocs.api19.com/numbers-ordering/disable-messaging.md).

# Disable Messaging

## GET or POST Request

{% hint style="info" %}
<https://v1.api19.com/dids/sms/disable_messaging>
{% endhint %}

Send us a GET or POST request with your key and the number (in the URI as key or as http password).

This will immediately turn off SMS/MMS on the number. It works for P2P and A2P numbers. A P2P number is released from SMS, and an A2P number is removed from its 10DLC campaign. Any email-to-text addresses on the number are removed as well.

To turn messaging back on later, the number has to be enabled again (P2P or assigned to a campaign).

{% tabs %}
{% tab title="Curl Post" %}

```php
curl -X POST https://v1.api19.com/dids/sms/disable_messaging \
  -d 'did=3038821111' \
  -d 'key=your-api-key'
 OR
curl -X POST https://v1.api19.com/dids/sms/disable_messaging \
   -H 'Content-Type: application/json' \
   -d '{"did": "3038821111", "key": "your-api-key"}'
  
```

{% endtab %}
{% endtabs %}

Responses

{% tabs %}
{% tab title="Success" %}

```javascript
{
    "status": "ok"
}
```

{% endtab %}

{% tab title="Invalid" %}

<pre class="language-php"><code class="lang-php">The did field is missing, or the number is not on your account:
<strong>{
</strong>    "status": "error",
    "error": "Invalid DID"
}
The number is not in our system:
{
    "status": "error",
    "error": "did not found"
}

Messaging is already off on the number, or it is not assigned to a campaign:
{
    "status": "error",
    "error": "campaign from did not found"
}

The number's campaign belongs to another account:

{
    "status": "error",
    "error": "you do not own this campaign"
}

</code></pre>

{% endtab %}
{% endtabs %}
