Skip to content

Generate an SMAK

GET
/api.cgi?action=submailer_gen
curl --request GET \
--url 'https://one.optizmo.net/api.cgi?ref=pqmpg&access_link=m-tbjt-j53-b4f8dfbb7f76d3bd0fd92a9f39ba5387&submailer_id=AFF-8821&check_hash=7583f2e660997b8d1c224a8d74260c51&return_format=csv&test_only=success&action=submailer_gen%3Fref%3Dpqmpg'

Issues an SMAK (sm-..., the key of an affiliate on a linked list) and Opt-Out link for one of your affiliates on a campaign that another account gave you access to, without creating any records in a SUPPRESS account of your own. The affiliate downloads the source’s list with the key, and opt-outs collected through the link are stored in the source’s list and attributed to the affiliate.

Send the access key you were given as access_link and your id for the affiliate as submailer_id. Repeating the request for the same key and id returns the same key. No onid is needed.

A campaign move that changes the key the campaign’s linked list chain hangs from (onto or off a linked list, or onto a list linked from a different key) replaces this key. Optizmo emails the affiliate its replacement key directly, capped at once per affiliate per campaign per 24 hours unless the key the last such email carried has itself since been replaced, and only once the replacement is itself confirmed servable; presenting the replaced key to this action afterwards answers failed,The 'access_link' provided has expired, the same as any other expired key. A move between two standard lists leaves the key as it is. A later move back to the original shape restores the original key and takes the replacement out of service, again by email; there is no need to call this action again to pick up either change.

Values in the check_hash

action, ref, access_link, submailer_id.

Failures

Response Meaning
failed,Invalid 'access_link' type The value is not an m-... or sm-... key.
failed,Failed integrity check on 'access_link' The key does not belong to any campaign.
failed,The 'access_link' provided has expired The source has stopped, expired or deleted the campaign, or revoked the affiliate’s access by hand: ask the issuing account for a current key. For a key a move replaced (see above), the replacement was already sent by email; presenting the old key after that still answers this, but there is nothing to ask the issuing account for.
failed,Invalid Access Key / failed,Failed Integrity Check The key could not be used to issue the SMAK.
failed,The opt-out link for this access key could not be created just now. Please retry. A read that the affiliate’s Opt-Out link needs failed. Nothing was written for the link.
failed,The opt-out link for this access key could not be created, because the linked list chain it belongs to records into no live Opt-Out List. The linked list chain’s source link has no live list left for a new Opt-Out link to record into. Contact support.
failed,Check Hash Failed. check_hash does not match.
ref
required
string
<= 5 characters

Your tracking platform’s Reference Code (PRC), issued by Optizmo when the integration was set up.

Example
pqmpg
access_link
required
string

A Mailer Access Key (MAK, m-...) or an SMAK (sm-...) issued to this account by another SUPPRESS account for one of its campaigns. The full access URL or the key on its own is accepted; surrounding whitespace is removed.

Example
m-tbjt-j53-b4f8dfbb7f76d3bd0fd92a9f39ba5387
submailer_id
required
string
<= 40 characters

Your platform’s id for the affiliate on the source campaign. Sending the same id for the same key returns the same SMAK.

Example
AFF-8821
check_hash
required
string
/^[0-9a-f]{32}$/

MD5 hex digest of the request’s hashed values, in the order they are listed for this action, followed by your Access Key (PAK). See Authentication for the rules.

Example
7583f2e660997b8d1c224a8d74260c51
return_format
string
default: csv
Allowed values: csv xml json

Sets the format of the success or failed answer on the synchronisation and status actions, and of the failure answer on every action. It does not change the success answer of the report and list actions, which is always their own XML document, or of the actions that answer with a page or a redirect. csv, xml and json are the only recognised values; anything else is answered in the csv format, the default. Not included in the check_hash.

test_only
string
Allowed values: success failed

Only honoured by Sync an advertiser, list, campaign and affiliate, Sync onto a linked list, Generate an SMAK, Account report, Get Opt-Out Lists, Advertiser and list settings page and Add opt-outs page; every other action ignores it and runs as normal, so sending it there does not stop the real change. On the actions that honour it, once the request has authenticated, it answers without creating or changing anything, and before the page renders on the two pages actions: failed,Test Failed Output for test_only=failed everywhere it is honoured. For test_only=success: the sync actions return a fixed key pair (https://TESTONLY.optizmo.net/m-test-a00-410324axc3e1eb7a and https://TESTONLY.optoutsystem.net/o-test-a00-546c4dxa10df19b8) in place of real ones, in the same body shape a real success with keys would have; the account report returns that same fixed key pair, not a report document; Get Opt-Out Lists returns a fixed two-entry list document; and the two pages actions return a bare success with no keys, the same shape as a real one with no campaign_id/mailer_id pair. Not included in the check_hash.

The request was processed. The body says whether it succeeded; failures are also returned with HTTP 200.

  • success,<mailer_url>,<optout_url>: the affiliate’s access URL and Opt-Out link. The access URL’s last path segment is a MAK (m-...) on a standard list or an SMAK (sm-...) on a linked list.
  • success,<mailer_url>,: an access URL with no Opt-Out link, a deliberate trailing comma rather than a shorter body.
  • success: the records were created or updated, but no campaign_id and mailer_id pair was sent, so no keys were issued.
  • failed,<message>: nothing was changed by the failing step. The messages are listed with each action.

A client_sub_sync call healed onto a replacement key (see Sync onto a linked list) carries a fourth value, access_link, and is never served from the cache; every other response served from the cache carries the header X-Status: cached.

string
Examples

Access key and Opt-Out link issued

success,https://www.affiliateaccesskey.com/m-tbjt-j53-b4f8dfbb7f76d3bd0fd92a9f39ba5387,https://www.optout-tbjt.net/o-tbjt-j53-eeedade91ab3043dea9edcc260d983ef

The system is in maintenance mode. Retry later. The answer follows return_format: csv (also the answer to a return_format that is neither xml nor json) as text/plain, xml as text/xml, json as application/json.

string
Example
failed,System currently under maintenance