Methods

Objects

Method Description
.append_file_async Append addressbook content from a temporary file. You need to call med...
.create Create addressbook
.delete Delete addressbook
.edit Edit addressbook name
.export_async Export addressbook as a file
.get Get addressbook
.get_headers Get addressbook headers only
.preview Preview addressbook
.search Search addressbooks

Methods

.append_file_async

Description

Append addressbook content from a temporary file. You need to call media.import_file_from_url_async or media.import_file_from_base64_async first to create a temporary file from a CSV on our platform.

This method is DEPRECATED and may be removed in the future.
Relying on this method is highly discouraged.

Signature

method: .append_file_async

params: [string hash, string tmp_file, int column_index, string calling_country_code, object webhook]

Parameters

Parameter Type Description NULL
hash string Addressbook id
Format: hash (Unique object identifier)
NO
tmp_file string Temporary filename generated by media.import_file_from_url_async or media.import_file_from_base64_async NO
column_index int Zero-based index of the column containing the phone number in your CSV file NO
calling_country_code string ISO 3166-1 two-letter country code corresponding to the country of the phone numbers in the addressbook. NO
webhook object Dynamic webhook for this import. Status updates (e.g. when the append is done) will be sent to this specific webhook. You only need to set 'endpoint' and optionally 'options'.
Object: Webhook
YES

Result

Type Description Format/Object
string Job ID Format: hid (Unique object identifier)

See Also

.create

Description

Create addressbook

This method is DEPRECATED and may be removed in the future.
Relying on this method is highly discouraged.

Signature

method: .create

params: [string name, string description]

Parameters

Parameter Type Description NULL
name string Addressbook name NO
description string Addressbook description NO

Result

Type Description Format/Object
object Addressbook Object: Sendr.10.Addressbook

.delete

Description

Delete addressbook

This method is DEPRECATED and may be removed in the future.
Relying on this method is highly discouraged.

Signature

method: .delete

params: [string hash]

Parameters

Parameter Type Description NULL
hash string Addressbook ID
Format: hash (Unique object identifier)
NO

Result

Type Description Format/Object
bool True if deletion suceeded.

.edit

Description

Edit addressbook name

This method is DEPRECATED and may be removed in the future.
Relying on this method is highly discouraged.

Signature

method: .edit

params: [string hash, string name, string description]

Parameters

Parameter Type Description NULL
hash string Addressbook ID
Format: hash (Unique object identifier)
NO
name string Addressbook name NO
description string Addressbook description NO

Result

Type Description Format/Object
object Addressbook Object: Sendr.10.Addressbook

.export_async

Description

Export addressbook as a file

This method is DEPRECATED and may be removed in the future.
Relying on this method is highly discouraged.

Signature

method: .export_async

params: [string hash, string format, object webhook]

Parameters

Parameter Type Description NULL
hash string Addressbook ID
Format: hash (Unique object identifier)
NO
format string File format wanted. For now can only be CSV_UTF8. NO
webhook object Dynamic webhook for this export. Status updates (e.g. when the export is available) will be sent to this specific webhook. You only need to set 'endpoint' and optionally 'options'.
Object: Webhook
YES

Result

Type Description Format/Object
string Job ID Format: hid (Unique object identifier)

.get

Description

Get addressbook

This method is DEPRECATED and may be removed in the future.
Relying on this method is highly discouraged.

Signature

method: .get

params: [string hash]

Parameters

Parameter Type Description NULL
hash string Addressbook ID
Format: hash (Unique object identifier)
NO

Result

Type Description Format/Object
object Addressbook Object: Sendr.10.Addressbook

.get_headers

Description

Get addressbook headers only

This method is DEPRECATED and may be removed in the future.
Relying on this method is highly discouraged.

Signature

method: .get_headers

params: [string hash]

Parameters

Parameter Type Description NULL
hash string Addressbook ID
Format: hash (Unique object identifier)
NO

Result

Type Description Format/Object
object Headers (key/value object)

.preview

Description

Preview addressbook

This method is DEPRECATED and may be removed in the future.
Relying on this method is highly discouraged.

Signature

method: .preview

params: [string hash, int count]

Parameters

Parameter Type Description NULL
hash string Addressbook ID
Format: hash (Unique object identifier)
NO
count int Number of lines to retrieve NO

Result

Type Description Format/Object
object Preview

.search

Description

Search addressbooks

This method is DEPRECATED and may be removed in the future.
Relying on this method is highly discouraged.

Signature

method: .search

params: [object filters, object options]

Parameters

Parameter Type Description NULL
filters object Search filters
Object: Sendr.10.Addressbook.SearchFilters
NO
options object Search options
Object: Search.Options
NO

Result

Type Description Format/Object
object Results Object: Search.Results