Skip Main Navigation
Page Content

Parameters

The API accepts parameters in several ways:

  • As query string parameters (commonly called “GET parameters”). These are just simple string keys with urlencoded values.
  • As form-urlencoded POST body data. Keys here are usually dotted (for example event.name.html - you should include the dots as well.
  • As JSON-format POST body data. This is accepted wherever form-encoded POST data is; it’s a series of nested objects with the keys matching the dotted paths of the variable names.

For example, submitting this as a urlencoded POST body:

event.name.html=Awesome%20Event&event.listed=true

is the same as submitting this JSON body (notice how the keys match):

{
    "event": {
        "name": {
            "html": "Awesome Event"
        },
        "listed": true
    }
}

You cannot mix and match JSON-style inputs and GET/POST style; if you pass a JSON body (or any request body with a Content-Type header set to application/json), all GET and POST parameters will be ignored.

Internally, we always convert to the JSON format before sending things on to our backend, so we recommend you use that if you are able; while we try and do type conversion (e.g. the string "true" turns into a true value for a boolean-type parameter), the JSON format gives you more precise control.

Additionally, most POST endpoints will accept a JSON structure that is very similar to or identical to the response you get from their associated GET endpoint, so you can round-trip objects easily.