Skip to main content

Overview

The Activation API switches the SEARCH duplicate check off or on for the traffic you specify. This guide shows how to send the request with POST, passing the parameters as a JSON body. Only Type is required. Like the Activity API, the Activation API runs on resdefio.com and is authorized with an authorization key that you send in the x-api-key header. See ACTIVATION for how the values combine and when a change takes effect.

Authentication

Send your authorization key in the x-api-key header of every request.
string
required
Your Research Defender authorization key.
Your authorization key is a secret. The sample on this page calls the API from the browser for demonstration, but anything in client-side code can be read. If you can, call the Activation API from your server and keep the key there.

Endpoint

string
POST https://{environment}.resdefio.com/activation
In the sample, set ENVIRONMENT to "prod" or "stage".

Request body

Send the parameters as a JSON object. Separate several values in one parameter with commas.
string
required
1 deactivates the matching traffic from the duplicate check. 2 activates it.
string
The API the change applies to. search (SEARCH API) is the default.
string
Survey numbers, separated by commas. For example "111,222,333".
string
Session IDs. Optional.
string
IP address. Optional.
Cookie value. Optional.
string
Panel ID. Optional.
string
Hashed email address. Optional.
string
User agent. Optional.
When you send more than one parameter, the values are combined and a record must match all of them. A request processes at most 500 combined records. To check values independently, send them in separate requests. See How the values combine.

Sending more parameters

The sample sends Route, Type, and Survey_Number. To match on sessions or other values, set them at the top of the script and add them to the object in buildPayload(). For example, this body deactivates three sessions on any survey:

Response

Action reports what was done, and Message reports how many records were processed.

Example

activation-post.js
The JavaScript example builds the body with buildPayload(), which leaves out empty values. setActivation() sends the request with the Content-Type and x-api-key headers and shows the API’s message if the request fails.

Full HTML page

If you want a complete page you can open in a browser, use the sample below. Replace the placeholder values at the top of the script.
activation-post-integration.html

Troubleshooting