Skip to main content

mailing_list_subscribers

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

Overview​

Namemailing_list_subscribers
TypeResource
Idovh.email_domain.mailing_list_subscribers

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
domainstring
emailstring
mailingliststring

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectdomain, email, nameGet a subscriber. Returns the email address of the subscriber and the mailing list and domain it is subscribed to.
listselectdomain, nameemail, x_pagination_modeList subscribers. Returns the email addresses of the subscribers of the mailing list. Filter them by email.
createinsertdomain, name, emailAdd a subscriber. Subscribes the email address to the mailing list, so that it receives its messages, and returns the task.
deletedeletedomain, email, nameRemove a subscriber. Unsubscribes the email address from the mailing list, which it no longer receives, and returns the task.

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"}})
domainstringName of your domain name
emailstring
namestringName of mailing list
emailstringSubscriber email
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 subscriber. Returns the email address of the subscriber and the mailing list and domain it is subscribed to.

SELECT
domain,
email,
mailinglist
FROM ovh.email_domain.mailing_list_subscribers
WHERE domain = '{{ domain }}' -- required
AND email = '{{ email }}' -- required
AND name = '{{ name }}' -- required
;

INSERT examples​

Add a subscriber. Subscribes the email address to the mailing list, so that it receives its messages, and returns the task.

INSERT INTO ovh.email_domain.mailing_list_subscribers (
email,
domain,
name
)
SELECT
'{{ email }}' /* required */,
'{{ domain }}',
'{{ name }}'
RETURNING
id,
account,
action,
date,
domain,
language
;

DELETE examples​

Remove a subscriber. Unsubscribes the email address from the mailing list, which it no longer receives, and returns the task.

DELETE FROM ovh.email_domain.mailing_list_subscribers
WHERE domain = '{{ domain }}' --required
AND email = '{{ email }}' --required
AND name = '{{ name }}' --required
;