Skip to main content

blacklists

Creates, updates, deletes, gets or lists a blacklists resource.

Overview​

Nameblacklists
TypeResource
Idovh.sms.blacklists

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
batch_idstring (uuid)ID of the batch responsible of the blacklist (wire: batchID)
sms_outgoing_idintegerID of the outgoing SMS responsible of the blacklist (wire: smsOutgoingID)
date_creationstring (date-time) (wire: dateCreation)
numberstringThe sms number blacklisted

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectnumber, service_nameGet a blacklisted number. Returns a blacklisted number, the date it was added, and the sent SMS or batch whose STOP reply added it.
listselectservice_namebatch_id, sms_outgoing_id, x_pagination_modeList blacklisted numbers. Returns the numbers that replied STOP and no longer receive SMS from the account.
deletedeletenumber, service_nameDelete 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.

NameDatatypeDescription
api_hoststringThe 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"}})
numberstringThe sms number blacklisted
service_namestringThe internal name of your SMS offer (wire: serviceName)
batch_idstring (uuid)Filter the value of batchID property (=) (wire: batchID)
sms_outgoing_idintegerFilter the value of smsOutgoingID property (=) (wire: smsOutgoingID)
x_pagination_modestringSent as CachedObjectList-Pages by default so the list returns the full objects rather than their identifiers. (wire: X-Pagination-Mode)

SELECT examples​

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
;

DELETE examples​

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
;