Skip to main content

senders_documents

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

Overview​

Namesenders_documents
TypeResource
Idovh.sms.senders_documents

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
namestringDocument name
document_idstring (uuid)Document ID (wire: documentID)
created_atstring (date-time)Creation datetime (wire: createdAt)
descriptionstringDocument description
get_urlstringURL to get document (wire: getUrl)
put_urlstringURL to upload document (wire: putUrl)
sizeintegerDocument size (in bytes)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectdocument_id, sender, service_nameGet a validation document. Returns the validation document: name, description, size, creation date and the URL to download it.
listselectsender, service_namex_pagination_modeList validation documents. Returns the identifiers of the documents sent to validate the sender. Get a validation document for its name, size and download URL.
createinsertsender, service_name, nameCreate a validation document. Creates an empty validation document with a name and a description. Returns the URL to upload the file.
updateupdatedocument_id, sender, service_nameUpdate a validation document. Updates the name and the description of the validation document. The file itself is uploaded with the URL given at creation.

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"}})
document_idstring (uuid)Document ID (wire: documentID)
senderstringThe sms sender
service_namestringThe internal name of your SMS offer (wire: serviceName)
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 validation document. Returns the validation document: name, description, size, creation date and the URL to download it.

SELECT
name,
document_id,
created_at,
description,
get_url,
put_url,
size
FROM ovh.sms.senders_documents
WHERE document_id = '{{ document_id }}' -- required
AND sender = '{{ sender }}' -- required
AND service_name = '{{ service_name }}' -- required
;

INSERT examples​

Create a validation document. Creates an empty validation document with a name and a description. Returns the URL to upload the file.

INSERT INTO ovh.sms.senders_documents (
description,
name,
sender,
service_name
)
SELECT
'{{ description }}',
'{{ name }}' /* required */,
'{{ sender }}',
'{{ service_name }}'
RETURNING
name,
document_id,
created_at,
description,
get_url,
put_url,
size
;

UPDATE examples​

Update a validation document. Updates the name and the description of the validation document. The file itself is uploaded with the URL given at creation.

UPDATE ovh.sms.senders_documents
SET
description = '{{ description }}',
name = '{{ name }}'
WHERE
document_id = '{{ document_id }}' --required
AND sender = '{{ sender }}' --required
AND service_name = '{{ service_name }}' --required;