Directory

List directories

Retrieve a list of all directories.

POST https://api.coupontools.com/v3/directory/list

Authentication:

API Keys

Example

Loading...

Response

Loading...

Get directory

Retrieve directory information by ID.

POST https://api.coupontools.com/v3/directory/info

Authentication:

API Keys

Parameters

Required directory Directory ID
Can be found in the list of all directories

Example

Loading...

Response

Loading...

Possible errors

301: Invalid character in parameter: directory
507: Directory ID not found

Directory users

List users

Retrieve a list of all registered users for a directory. The API response returns the registrations in a reverse-chronologically ordered array limited to max. 100 registrations. Use the "page" parameter in order to retrieve "older" registrations.

POST https://api.coupontools.com/v3/directoryusers/list

Authentication:

API Keys

Parameters

Required directory Directory ID
Can be found in the list of all directories
Optional page Page number
Page is limited to 100 registrations

Example

Loading...

Response

Loading...

Possible errors

301: Invalid character in parameter: directory
507: Directory ID not found

Distribution

Send directory by email

You need to have an email marketing platform connected to be able to send out marketing emails (check out: integrations -> email marketing).

POST https://api.coupontools.com/v3/send/email

Authentication:

API Keys

Parameters

Required campaign Directory ID (dir_XXXXXX)
Can be found in the list of all directories
Required email Email address
Recipient of the directory email
Optional subject String
Subject of email

Example

Loading...

Response

Loading...

Possible errors

104: No Email integration has been setup in your Coupontools account. Go to 'integrations' and 'Email marketing' to setup an Email provider
200: Missing parameter: campaign
301: Invalid character in parameter: campaign
305: Email address is not valid
502: Directory ID not found
604: Email not sent to 'john@doe.com'. Reason: X

Send directory by text message

You need to have an SMS marketing platform connected to be able to send out SMS messages (check out: integrations -> SMS marketing).

E.164 phone number format:
First of all, in the international E.164 notation, a leading '0' is removed.
The UK mobile phone number '07911 123456' in international format is '+44 7911 123456', so without the leading zero.
Secondly, in the E.164 notation, all spaces, dashes ['-'] and parentheses [ '(' and ')'] are removed, besides the leading '+', all characters should be numeric.
Example: +447911123456

POST https://api.coupontools.com/v3/send/sms

Authentication:

API Keys

Parameters

Required campaign Directory ID (dir_XXXXXX)
Can be found in the list of all directories
Required phone Phone number
Phone number receiving directory. International E.164 notation
Optional body String
SMS body text. The directory URL will be added to each message

Example

Loading...

Response

Loading...

Possible errors

103: No SMS integration has been setup in your Coupontools account. Go to 'integrations' and 'SMS marketing' to setup an SMS provider
200: Missing parameter: campaign
301: Invalid character in parameter: campaign
301: Phone number not valid
502: Directory ID not found
602: SMS not sent to 'X'. Reason: Y
605: SMS not sent to 'X'. Reason: This number is on the blacklist or opt-out list.