Sending requests

There are a variety of requests that you can make to access, add, update, and delete data using our REST APIs. For example, you can submit requests to access and update inventory, such as site tags and placements. You can also access and update passbacks and floors. You can retrieve information about demand (campaigns) and earnings. You can also access and change private exchange information, such as deals and deal sections.

HTTP methods

You can submit requests to Index APIs with the following HTTP verbs:

  • GET: Returns resources when you submit a request with data specified in the URL. The response returns the requested information in the body.
  • POST: Updates resources when you submit a request with the URL and data specified in the body. The response returns the requested information in the body.

📘

Note:

For the Publisher API, a POST HTTP request returns resources when you submit a request with data specified in the URL.

  • PUT: Replaces the resource with the information you specify and submit in the request body. The response contains the information you updated or added in the return body.

📘

Note:

For the Publisher API, a PUT HTTP request creates or updates a resource when you submit a request.

  • PATCH: Modifies the existing resource with the information you specify and submit in the request body. The response contains the information you updated in the return body.

📘

Note:

For the Publisher API, a PATCH HTTP request updates resource when you submit a request.

  • DELETE: Deletes the data you specify and submit in the URL. The response contains the information you deleted in the return body.

Request format

You can submit PUT, PATCH and POST requests in JSON.

To use JSON format in the body of your request, add the following to the Content-Type header: application/json; charset=utf-8

📘

Note:

GET and DELETE request parameters must be URL-encoded.