API Methods

Here are the methods supported by the API grouped by the primary entity they operate on.

system methods

system.listMethods()

List system methods. Part of XML-RPC introspection.

Returns:Returns a list of method names.
Return type:array
system.methodHelp(method)

Gets help about a method. Part of XML-RPC introspection.

Parameters:method (string) – method name
Returns:Returns a text describing the method.
Return type:string
Raises :6002: No such method

subscription methods

ubivox.cancel_all_subscriptions(email_address)

Cancel all subscriptions for a given subscriber.

Parameters:email_address (string) – The e-mail address of the subscriber.
Returns:True on success.
Return type:boolean
Raises :1001: Invalid e-mail address
ubivox.cancel_subscription(email_address, lists)

Cancel a subscription for the lists specified.

Parameters:
  • email_address (string) – The address of the subscriber
  • lists (array) – A list of mailinglist IDs
Returns:

True on success.

Return type:

boolean

Raises :

1001: Invalid e-mail address

Raises :

1002: The user is not subscribed

Raises :

2001: Invalid mailing list

Note

If the user was not subscribed some of the lists, the NotSubscribed fault is raised.

ubivox.course_force_stage(subscriber, list, stage)

Forces the subscriber to the specified stage on the course of the list.

Parameters:
  • subscriber (string) – The e-mail address of a subscriber.
  • list (integer) – A mailing list ID.
  • stage (integer) – An integer ID of a stage on the mailing list.
Returns:

True on success.

Return type:

boolean

Raises :

1001: Invalid e-mail address

Raises :

1002: The user is not subscribed

Raises :

2001: Invalid mailing list

Raises :

2003: Invalid stage.

ubivox.course_next_stage(subscriber, list)

Advances the subscriber to the next stage on the course of the list.

Parameters:
  • subscriber (string) – The e-mail address of a subscriber.
  • list (integer) – A mailing list ID.
Returns:

True on success.

Return type:

boolean

Raises :

1001: Invalid e-mail address

Raises :

1002: The user is not subscribed

Raises :

2001: Invalid mailing list

Raises :

2002: The course has already ended (no stage to advance to)

ubivox.create_subscription(email_address, lists, optin)

Create a subscription for the lists specified.

Parameters:
  • email_address (string) – The address of the subscriber
  • lists (array) – A list of mailinglist IDs
  • optin (boolean) – Should we send a optin e-mail
Returns:

True on success.

Return type:

boolean

Raises :

1001: Invalid e-mail address

Raises :

1003: The user is already subscribed

Raises :

2001: Invalid mailing list

Raises :

2004: Opt-in not configured (on one or more lists).

ubivox.create_subscription_with_data(email_address, lists, optin, data)

Create a subscription for the lists specified with data from the data struct.

Parameters:
  • email_address (string) – The e-mail address of the subscriber
  • lists (array) – A list of mailing list IDs
  • optin (boolean) – Should we send a optin e-mail
  • data (struct) – A struct of subscriber data, see Subscriber data
Returns:

True on success.

Return type:

boolean

Raises :

1001: Invalid e-mail address

Raises :

1003: The user is already subscribed

Raises :

1004: Invalid data field

Raises :

2001: Invalid mailing list

ubivox.delete_subscriber(email_address)

Note

This method is an alias for: ubivox.cancel_all_subscriptions()

ubivox.set_subscription_reference(subscriber, list, reference)

Updates the reference field for a given subscription.

Parameters:
  • subscriber (string) – The e-mail address of a subscriber.
  • list (int) – A mailing list ID.
  • reference (string) – The reference to be used.
Returns:

True on success.

Return type:

boolean

Raises :

1001: Invalid e-mail address

Raises :

1002: The user is not subscribed

Raises :

2001: Invalid mailing list

ubivox.set_subscription_testrecipient(subscriber, list, test_recipient)

Updates the subscription with test recipient status.

Parameters:
  • subscriber (string) – The email address of a subscriber.
  • list (integer) – A mailing list ID.
  • test_recipient (boolean) – A boolean indicating if the subscriber should receive tests.
Returns:

True on success.

Return type:

boolean

Raises :

1001: Invalid e-mail address

Raises :

1002: The user is not subscribed

Raises :

2001: Invalid mailing list

subscriber methods

ubivox.get_subscriber(subscriber)

Fetches information about a given subscriber.

Parameters:subscriber (string) – The e-mail address of a subscriber.
Returns:A struct of:
  • subscriptions: A list of structs:
    • list_title: Mailing list title
    • list_id: Mailing list ID
    • state: The subscription state. One of the following: pending (Pending end-user authorization), active (Active and receiving deliveries), suspended (Suspended due to bounces), unsubscribed (Unsubscribed by user), removed (Unsubscribed by client), deleted (Deleted)
    • added: When was the subscription added
    • unsubscribed: When was the subscription cancelled
    • deleted: When was the subscription suspended
    • test_recipient: A boolean indicating if the subscriber is a test recipient on this list
  • data: A struct of subscriber data, see Subscriber data
Return type:struct
Raises :1001: Invalid e-mail address
ubivox.list_all_subscribers()

Retrieve all subscribers (up to 10000 only).

Returns:A list e-mail-adresses.
Return type:array
ubivox.list_all_subscribers_with_data()

Retrieve all subscribers (up to 10000 only).

Returns:A list of structs of:
  • email: E-mail address of the subscriber
  • data: Data associated with the subscriber, see Subscriber data
Return type:array
ubivox.list_subscribers(offset)

Retrieve the first 50 subscribers from the offset specified.

Parameters:offset (integer) – (0-indexed) Offset.
Returns:A list e-mail-adresses.
Return type:array
Raises :5003: Invalid offset
ubivox.list_subscribers_with_data(offset)

Retrieve the first 50 subscribers from the offset specified.

Parameters:offset (integer) – (0-indexed) Offset.
Returns:A list of structs of:
  • email: E-mail address of the subscriber
  • data: Data associated with the subscriber, see Subscriber data
Return type:array
Raises :5003: Invalid offset
ubivox.set_subscriber_data(subscriber, data)

Updates the subscribers data.

Parameters:
  • subscriber (string) – The email address of a subscriber.
  • data (struct) – A struct of subscriber data, see Subscriber data
Returns:

True on success.

Return type:

boolean

Raises :

1001: Invalid e-mail address

Raises :

1004: Invalid data field

delivery methods

ubivox.create_delivery(subject, html_body, text_body, list)

Create a new delivery for the the specified list.

Parameters:
  • subject (string) – Subject for the delivery.
  • html_body (string) – The HTML body of the delivery including logic for merging.
  • text_body (string) – The text body of the delivery including logic for merging.
  • list (integer) – The mailing list to be used. (integer ID)
Returns:

The new delivery ID on success.

Rtype integer:
Raises :

2001: Invalid mailing list

Raises :

3004: Problem with delivery content

ubivox.delete_delivery(delivery)

Deletes a delivery and everything related to it (statistics, ...).

Parameters:delivery (integer) – ID of the delivery.
Returns:True on success.
Return type:boolean
Raises :3001: Invalid delivery
ubivox.get_delivery(delivery)

Get information about a delivery.

Parameters:delivery (integer) – ID of the delivery.
Returns:A struct of:
  • id: Id of the delivery.
  • subject: Subject of the delivery.
  • send_time: The send time of the delivery (if available)
  • html_body: The HTML body of the delivery including logic for merging.
  • text_body: The text body of the delivery including logic for merging.
  • archive_html_body: The HTML body of an archive version of the newsletter.
  • list: The maillist to be used. (integer ID)
  • state: Delivery state. One of: edit (Editing), standby (Standby), active (Processing), queued (Delivering), done (Delivered)
Return type:struct
Raises :3001: Invalid delivery
ubivox.get_delivery_stats(delivery)

Get the simple statistics of the delivery.

Parameters:delivery (integer) – ID of the delivery.
Returns:A struct of:
  • delivered_ok: Mails delivered.
  • delivered_fail: Mails bounced.
  • delivered_pending: Mails awaiting delivery.
Return type:struct
Raises :3001: Invalid delivery
ubivox.list_all_deliveries()

Get list of all deliveries.

Returns:A list of structs of:
  • id: ID if the delivery. (integer ID)
  • subject: Subject of the delivery.
  • send_time: The send time of the delivery (if available)
  • list: The list ID. (integer ID)
  • state: Delivery state. One of: edit (Editing), standby (Standby), active (Processing), queued (Delivering), done (Delivered)
Return type:array
ubivox.list_deliveries(state, offset)

Get list of deliveries (the first 50 after offset).

Parameters:
  • state (string) – Delivery state filter. One of: edit (Editing), standby (Standby), active (Processing), queued (Delivering), done (Delivered)
  • offset (integer) – (0-indexed) Offset.
Returns:

A list of structs of:

  • id: ID if the delivery. (integer ID)
  • subject: Subject of the delivery.
  • send_time: The send time of the delivery (if available)
  • list: The list ID. (integer ID)
  • state: Delivery state. One of: edit (Editing), standby (Standby), active (Processing), queued (Delivering), done (Delivered)

Return type:

array

Raises :

5003: Invalid offset

ubivox.send_delivery(delivery, send_time)

Queues the delivery for delivery.

Parameters:
  • delivery (integer) – ID of the delivery.
  • send_time (string) – When should the delivery start (YYYY-MM-DD HH:MM:SS).
Returns:

True on success.

Return type:

boolean

Raises :

3001: Invalid delivery

Raises :

3002: Delivery not in edit state

Raises :

5001: Invalid date/time format

ubivox.set_delivery_subset_rules(delivery, subset_rules)

Sets the subset (segmentation) rules for a delivery.

Parameters:
  • delivery (integer) – ID of the delivery.
  • subset_rules (string) – JSON string of subset rules.
Returns:

True on success.

Return type:

boolean

Raises :

3001: Invalid delivery

Raises :

3002: Delivery not in edit state

Raises :

5008: Invalid rule set

Raises :

9995: Account type upgrade needed (contact sales)

Important

If used, it must be called before send_delivery.

ubivox.suspend_delivery(delivery)

Suspends a delivery in the standby state and reverts to the edit state.

Parameters:delivery (integer) – ID of the delivery.
Returns:True on success.
Return type:boolean
Raises :3001: Invalid delivery
Raises :3003: Delivery not in standby state
ubivox.update_delivery(delivery, subject, html_body, text_body, list)

Updates a delivery.

Parameters:
  • delivery (integer) – ID of the delivery.
  • subject (string) – Subject for the delivery.
  • html_body (string) – The HTML body of the delivery including logic for merging.
  • text_body (string) – The text body of the delivery including logic for merging.
  • list (integer) – The mailing list to be used. (integer ID)
Returns:

The new delivery ID on success.

Return type:

integer

Raises :

2001: Invalid mailing list

Raises :

3001: Invalid delivery

Raises :

3002: Delivery not in edit state

Raises :

3004: Problem with delivery content

maillist methods

ubivox.course_list_stages(maillist)

Get information about stages on a course for a given mailing list.

Parameters:maillist (integer) – The ID of the mailing list.
Returns:An ordered array of structs of:
  • id: ID of the stage. (integer ID)
  • subject: Subject of the stage.
  • next_stage_interval: The interval before the next stage (in hours)
Return type:array
Raises :2001: Invalid mailing list
ubivox.create_maillist(title, language, delivery_sender_name, delivery_sender_email, primary_data_fields)

Create a new maillist.

Parameters:
  • title (string) – The name of the maillist.
  • language (string) – The language of the maillist.
  • delivery_sender_name (string) – Name of the sender on deliveries.
  • delivery_sender_email (string) – E-mail addresss of the sender on deliveries.
  • primary_data_fields (array) – A list of data fields primary for this maillist.
Returns:

The new maillist ID on success.

Return type:

integer

Raises :

1004: Invalid data field

Raises :

5006: Invalid language

ubivox.delete_maillist(maillist)

Deletes a maillist.

Parameters:maillist (integer) – The ID of the maillist
Returns:True on success.
Return type:boolean
Raises :2001: Invalid mailing list
ubivox.get_maillists()

Note

This method is an alias for: ubivox.list_maillists()

ubivox.list_maillists()

Get a list of available mailing lists.

Returns:A list of structs:
  • id: Maillist ID
  • title: The title of the mailing list
Return type:array
ubivox.maillist_archive(maillist, count)

Find the most recently archived newsletters for a given list.

Parameters:
  • maillist (integer) – The ID of the mailing list.
  • count (integer) – The amount of newsletters to return.
Returns:

An ordered (by newsletter send time in descending order) array of structs of:

  • id: ID of the newsletter. (integer ID)
  • subject: Subject of the newsletter.
  • archive_url: URL to the newsletter in the archive.
  • archive_html: HTML version of the archived newsletter.
  • send_time: When was the newsletter sent.

Return type:

array

Raises :

2001: Invalid mailing list

ubivox.update_maillist(maillist, title, language, delivery_sender_name, delivery_sender_email, primary_data_fields)

Updates an existing maillist.

Parameters:
  • maillist (integer) – The ID of the maillist.
  • title (string) – The name of the maillist.
  • language (string) – The language of the maillist.
  • delivery_sender_name (string) – Name of the sender on deliveries.
  • delivery_sender_email (string) – E-mail addresss of the sender on deliveries.
  • primary_data_fields (array) – A list of data fields primary for this maillist.
Returns:

True on success.

Return type:

boolean

Raises :

1004: Invalid data field

Raises :

2001: Invalid mailing list

Raises :

5006: Invalid language

ubivox.update_maillist_optin_optout_settings(maillist, optin_subject, optin_body, optin_success_url, optin_failure_url, optout_success_url)

Updates the opt-in/opt-out settings of an existing maillist.

Parameters:
  • maillist (integer) – The ID of the maillist.
  • optin_subject (string) – Subject of the opt-in e-mail.
  • optin_body (string) – Body of the opt-in e-mail (remember %(link)s for the opt-in link).
  • optin_success_url (string) – Success URL for opt-in.
  • optin_failure_url (string) – Failure URL for opt-in.
  • optout_success_url (string) – Success URL for opt-out.
Returns:

True on success.

Return type:

boolean

Raises :

2001: Invalid mailing list

email methods

ubivox.send_email(recipient_email, send_time, reference, sender_email, subject, html_body, text_body)

Create a new e-mail and schedule it for delivery at send_time.

Parameters:
  • recipient_email (string) – The recipient e-mail address.
  • send_time (string) – The send time.
  • reference (string) – A preferably unique reference for this e-mail.
  • sender_email (string) – The sender e-mail address.
  • subject (string) – The subject of the e-mail.
  • html_body (string) – The HTML body of the e-mail.
  • text_body (string) – The text body of the e-mail.
Returns:

The reference of the e-mail on success.

Return type:

string

Raises :

1001: Invalid e-mail address

Raises :

5001: Invalid date/time format

Raises :

5004: Invalid reference (only a-z, A-Z, 0-9, - and _ allowed)

Raises :

9995: Account type upgrade needed (contact sales)

Raises :

9996: Not approved for this call

Hint

Leave the reference as the empty string to have Ubivox create one for you.

ubivox.send_email_from_newsletter(recipient_email, data, send_time, reference, sender_email, sender_name, subject, delivery)

Create a new e-mail and schedule it for delivery at send_time.

Parameters:
  • recipient_email (string) – The recipient e-mail address.
  • data (struct) – Extra data for the mail merging
  • send_time (string) – The send time.
  • reference (string) – A preferably unique reference for this e-mail.
  • sender_email (string) – The sender e-mail address.
  • sender_name (string) – The sender name.
  • subject (string) – The subject of the e-mail.
  • delivery (integer) – The (integer) ID of a newsletter in Ubivox
Returns:

The reference of the e-mail on success.

Return type:

string

Raises :

1001: Invalid e-mail address

Raises :

3001: Invalid delivery

Raises :

3004: Problem with delivery content

Raises :

3005: Mail merging error

Raises :

5001: Invalid date/time format

Raises :

5004: Invalid reference (only a-z, A-Z, 0-9, - and _ allowed)

Raises :

9995: Account type upgrade needed (contact sales)

Raises :

9996: Not approved for this call

Hint

Leave the reference as the empty string to have Ubivox create one for you.

If the recipient is known to Ubivox, we will use their data as a base and overwrite the final mail merging context with any data you supply in data.

If any of sender_email, sender_name or subject is left blank, we will use the defaults from the list associated with the newsletter.

ubivox.send_email_rfc2822(recipient_email, send_time, reference, message)

Create a new e-mail and schedule it for delivery at send_time.

Parameters:
  • recipient_email (string) – The recipient e-mail address.
  • send_time (string) – The send time.
  • reference (string) – A preferably unique reference for this e-mail.
  • message (string) – The raw (RFC2822) message.
Returns:

The reference of the e-mail on success.

Return type:

string

Raises :

1001: Invalid e-mail address

Raises :

5001: Invalid date/time format

Raises :

5004: Invalid reference (only a-z, A-Z, 0-9, - and _ allowed)

Raises :

9995: Account type upgrade needed (contact sales)

Raises :

9996: Not approved for this call

Hint

Leave the reference as the empty string to have Ubivox create one for you.

ubivox.send_email_with_names(recipient_email, recipient_name, send_time, reference, sender_email, sender_name, subject, html_body, text_body)

Create a new e-mail and schedule it for delivery at send_time.

Parameters:
  • recipient_email (string) – The recipient e-mail address.
  • recipient_name (string) – The recipient name.
  • send_time (string) – The send time.
  • reference (string) – A preferably unique reference for this e-mail.
  • sender_email (string) – The sender e-mail address.
  • sender_name (string) – The sender name.
  • subject (string) – The subject of the e-mail.
  • html_body (string) – The HTML body of the e-mail.
  • text_body (string) – The text body of the e-mail.
Returns:

The reference of the e-mail on success.

Return type:

string

Raises :

1001: Invalid e-mail address

Raises :

5001: Invalid date/time format

Raises :

5004: Invalid reference (only a-z, A-Z, 0-9, - and _ allowed)

Raises :

9995: Account type upgrade needed (contact sales)

Raises :

9996: Not approved for this call

Hint

Leave the reference as the empty string to have Ubivox create one for you.

media methods

ubivox.media_delete(filename)

Deletes a media file on the server.

Parameters:filename (string) – Relative filename of the media file (including directories).
Returns:True on success.
Return type:boolean
Raises :5007: Invalid filename
ubivox.media_upload(filename, data)

Writes a media file on the server. Will overwrite existing files.

Parameters:
  • filename (string) – Relative filename of the media file (including directories).
  • data (base64) – The data of the media file.
Returns:

True on success.

Return type:

boolean

Raises :

5007: Invalid filename

data methods

ubivox.create_data_field(key, title, data_type, access, required, sort, archive_value)

Create a data field.

Parameters:
  • key (string) – The key of the data field.
  • title (string) – The title of the data field.
  • data_type (string) – The data type. One of the following: text (Text field: Single line), textarea (Text field: Multi line), checkbox (Checkbox: Single), select (Select: Single), select_multiple (Select: Multiple), select_radio (Select: Radio buttons (single)), select_checkbox (Select: Check boxes (multiple))
  • access (string) – Access level: public (Shown to users) or private (Only visible to administrators).
  • required (boolean) – Is this field required.
  • sort (integer) – An integer indicating the sort order.
  • string (archive_value) – Default value for archive displays
Returns:

True on success.

Return type:

boolean

Raises :

1005: Invalid data field key

Raises :

1006: Invalid data field type

Raises :

1007: Invalid data field access

ubivox.get_data_keys()

Note

This method is an alias for: ubivox.list_data_fields()

ubivox.hide_data_field(key)

Hide the data field.

Parameters:key (string) – The key of the data field
Returns:True on success.
Return type:boolean
Raises :1004: Invalid data field
ubivox.list_data_fields()

Retrieve the available data fields for user data.

Returns:A list of keys.
Return type:array
ubivox.list_data_fields_details()

Retrieve the available data fields for user data with data field details.

Returns:A list of structs of:
  • id - A unique integer ID for the data field
  • key - The key of the data field
  • title - The title of the data field
  • datatype - The type of the data field (currenly only text (single line text field))
  • access - Who can see the data field (public or private)
  • required - Is the data field required (boolean)
  • archive_value - The archive value of the data field
  • choices - Predefined choices for the data field
  • sort - Sort order (priority)
Return type:struct
ubivox.update_data_field(key, title, data_type, access, required, sort, archive_value)

Update a data field.

Parameters:
  • key (string) – The key of the data field (cannot be changed).
  • title (string) – The new title of the data field.
  • data_type (string) – The data type. One of the following: text (Text field: Single line), textarea (Text field: Multi line), checkbox (Checkbox: Single), select (Select: Single), select_multiple (Select: Multiple), select_radio (Select: Radio buttons (single)), select_checkbox (Select: Check boxes (multiple))
  • access (string) – Access level: public (Shown to users) or private (Only visible to administrators).
  • required (boolean) – Is this field required.
  • sort (integer) – An integer indicating the sort order.
  • string (archive_value) – Default value for archive displays
Returns:

True on success.

Return type:

boolean

Raises :

1004: Invalid data field

Raises :

1006: Invalid data field type

Raises :

1007: Invalid data field access

imports methods

ubivox.import_history()

Retrieve a list of past imports. Refer to the web interface for details.

Returns:A list of structs:
  • filename - Filename of the import
  • uploaded - Date and time for the upload
  • imported - Date and time when finished
  • maillist - Maillist ID import to
Return type:array
ubivox.import_new(filename, data, maillist, consent_details, update_data, ignore_empty_data, activate_suspended, unsubscribe_other)

Create new import job and starts the processing immediately.

Parameters:
  • filename (string) – The filename of the import.
  • data (base64) – The data of the import file.
  • maillist (integer) – The ID of the maillist the subscriptions should be imported to.
  • consent_details (string) – The cirsumstances under which consent was given for these addresses. Will be public to the subscriber.
  • update_data (boolean) – Update data on existing subscriptions?
  • ignore_empty_data (boolean) – Ignore empty values when updating data fields?
  • activate_suspended (boolean) – Activate suspended subscriptions?
  • unsubscribe_other (boolean) – Unsubscribe subscribers not in the import file?
Returns:

True on success.

Return type:

boolean

Raises :

1005: Invalid data field key

Raises :

2001: Invalid mailing list

Raises :

4002: Too many invalid addresses in import file

Raises :

4003: Another import already exists with this filename

Raises :

4004: Invalid import filename

Warning

A common pitfall of this method is that the data parameter must be of the base64 XML-RPC data type, and not just a base64 encoded string. Refer to your XML-RPC library documentation for implementation notes.

ubivox.import_queue()

Retrieve a list of currently processing and queued imports. Refer to the web interface for details.

Returns:A list of structs:
  • filename - Filename of the import
  • uploaded - Date and time for the upload
  • started - Date and time when processing started (0000-00-00T00:00:00 if not started yet)
  • maillist - Maillist ID import to
  • progress - The progress expressed as an integer percentage
Return type:array

target methods

ubivox.create_target(title, description)

Create a new target.

Parameters:
  • title (string) – The name of the target.
  • description (string) – The description of the target.
Returns:

The new target ID on success.

Return type:

integer

ubivox.list_targets()

Get a list of available targets.

Returns:A list of structs:
  • id: Target ID
  • title: The title of the target
  • description: The description of the target
Return type:array
ubivox.target_statistics(target)

Fetches statistics for an existing target.

Parameters:target (integer) – The ID of the target.
Returns:A struct of:
  • title: Title of the target.
  • description: Description of the target.
  • hits: Hits to this target.
  • time: Average time in seconds to reach target.
Return type:struct
Raises :5010: Invalid target
ubivox.update_target(target, title, description)

Updates an existing target.

Parameters:
  • target (integer) – The ID of the target.
  • title (string) – The name of the target.
  • description (string) – The description of the target.
Returns:

True on success.

Return type:

bool

Raises :

5010: Invalid target

webhook methods

ubivox.create_webhook(hook, url, throttle_per_minute, max_retries)

Create a new webhook.

Parameters:
  • hook (string) – The hook to attach to, see Supported hooks for webhooks.
  • url (string) – The URL to call.
  • throttle_per_minute (integer) – How many calls will we attempt per minute.
  • max_retries (integer) – How many times will we retry a call.
Returns:

The (integer) ID of the new webhook on success.

Return type:

int

Raises :

5012: Invalid hook

ubivox.delete_webhook(id)

Delete an existing webhook.

Parameters:id (integer) – The ID of the webhook.
Returns:True on success.
Return type:boolean
Raises :5011: Invalid webhook
ubivox.list_webhooks()

Retrieve the available, configured webhooks.

Returns:A list of structs of:
  • id - A unique integer ID for the webhook
  • hook - The configured hook
  • url - The configured URL to call
  • throttle_per_minute - How many calls will we attempt per minute
  • max_retries - How many times will we retry a call
Return type:array
ubivox.update_webhook(id, hook, url, throttle_per_minute, max_retries)

Update an existing webhook.

Parameters:
  • id (integer) – The ID of the webhook.
  • hook (string) – The hook to attach to, Supported hooks for webhooks.
  • url (string) – The URL to call.
  • throttle_per_minute (integer) – How many calls will we attempt per minute.
  • max_retries (integer) – How many times will we retry a call.
Returns:

True on success.

Return type:

boolean

Raises :

5011: Invalid webhook

Raises :

5012: Invalid hook

account methods

ubivox.account_status()

Get an account status struct suitable for producing an account dashboard.

Returns:struct:
  • lists: Your lists (limited to 25)
    • title: List title
    • url: URL for the list details in Ubivox
    • stats: List statistics, a list of structs:
      • date: The date
      • new_subscriptions: New subscriptions (on this day)
      • unsubscribed: Unsubscribed (on this day)
      • removed: Removed (on this day)
      • unsubscribed_removed: Unsubscribed or removed (on this day)
      • suspended: Suspended (on this day)
      • growth: Net growth (on this day)
      • active_total: Total active subscriptions (as of this day)
      • pending_total: Total pending subscriptions (as of this day)
      • unsubscribed_total: Total unsubscribed subscriptions (as of this day)
      • removed_total: Total removed subscriptions (as of this day)
      • unsubscribed_removed_total: Total unsubscribed or removed subscriptions (as of this day)
      • suspended_total: Total suspended subscriptions (as of this day)
  • drafts: Your newsletter drafts (latest 25 only)
    • subject: Subject of the newsletter
    • edit_time: Last edited time
    • url: URL for the newsletter details in Ubivox
    • list_title: The title of the list of the newsletter
    • list_url: URL the the list details of the list of the newsletter
  • published: Your published, sent newsletters (latest 25 only)
    • subject: Subject of the newsletter
    • send_time: Last edited time
    • url: URL for the newsletter details in Ubivox
    • list_title: The title of the list of the newsletter
    • list_url: URL the the list details of the list of the newsletter
    • recipients: Total number of recipients
    • delivered: Total number of successful deliveries
    • views: Total number of views (opens) on this newsletter
    • clicks: Total number of clicks on this newsletter
Return type:struct

Note

List statistics are cached for up to half an hour.

misc methods

ubivox.ping()

Note

This method is an alias for: ubivox.server_time()

ubivox.server_time()

Returns the current server time.

Returns:The server time
Return type:string
ubivox.time_zones()

Get information on the supported time zones.

Returns:An array of supported time zones
Return type:array