blacklists
Creates, updates, deletes, gets or lists a blacklists resource.
Overview​
| Name | blacklists |
| Type | Resource |
| Id | ovh.sms.blacklists |
Fields​
The following fields are returned by SELECT queries:
- get
- list
successful operation
| Name | Datatype | Description |
|---|---|---|
batch_id | string (uuid) | ID of the batch responsible of the blacklist (wire: batchID) |
sms_outgoing_id | integer | ID of the outgoing SMS responsible of the blacklist (wire: smsOutgoingID) |
date_creation | string (date-time) | (wire: dateCreation) |
number | string | The sms number blacklisted |
SMS blacklist
| Name | Datatype | Description |
|---|---|---|
batch_id | string (uuid) | ID of the batch responsible of the blacklist (wire: batchID) |
sms_outgoing_id | integer | ID of the outgoing SMS responsible of the blacklist (wire: smsOutgoingID) |
date_creation | string (date-time) | (wire: dateCreation) |
number | string | The sms number blacklisted |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | number, service_name | Get a blacklisted number. Returns a blacklisted number, the date it was added, and the sent SMS or batch whose STOP reply added it. | |
list | select | service_name | batch_id, sms_outgoing_id, x_pagination_mode | List blacklisted numbers. Returns the numbers that replied STOP and no longer receive SMS from the account. |
delete | delete | number, service_name | Delete a blacklisted number. Removes the number from the blacklist of the account, so it can receive SMS from the account again. |
Parameters​
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
api_host | string | The OVHcloud API host. Selected by OVH_ENDPOINT (ovh-eu, ovh-ca or ovh-us; default ovh-eu). (default: api.eu.ovhcloud.com, x-stackQL-envVarSelector: {"envVar":"OVH_ENDPOINT","default":"ovh-eu","values":{"ovh-eu":"api.eu.ovhcloud.com","ovh-ca":"api.ca.ovhcloud.com","ovh-us":"api.us.ovhcloud.com"}}) |
number | string | The sms number blacklisted |
service_name | string | The internal name of your SMS offer (wire: serviceName) |
batch_id | string (uuid) | Filter the value of batchID property (=) (wire: batchID) |
sms_outgoing_id | integer | Filter the value of smsOutgoingID property (=) (wire: smsOutgoingID) |
x_pagination_mode | string | Sent as CachedObjectList-Pages by default so the list returns the full objects rather than their identifiers. (wire: X-Pagination-Mode) |
SELECT examples​
- get
- list
Get a blacklisted number. Returns a blacklisted number, the date it was added, and the sent SMS or batch whose STOP reply added it.
SELECT
batch_id,
sms_outgoing_id,
date_creation,
number
FROM ovh.sms.blacklists
WHERE number = '{{ number }}' -- required
AND service_name = '{{ service_name }}' -- required
;
List blacklisted numbers. Returns the numbers that replied STOP and no longer receive SMS from the account.
SELECT
batch_id,
sms_outgoing_id,
date_creation,
number
FROM ovh.sms.blacklists
WHERE service_name = '{{ service_name }}' -- required
AND batch_id = '{{ batch_id }}'
AND sms_outgoing_id = '{{ sms_outgoing_id }}'
AND x_pagination_mode = '{{ x_pagination_mode }}'
;
DELETE examples​
- delete
Delete a blacklisted number. Removes the number from the blacklist of the account, so it can receive SMS from the account again.
DELETE FROM ovh.sms.blacklists
WHERE number = '{{ number }}' --required
AND service_name = '{{ service_name }}' --required
;