# Parameters

v1 and v2 take their parameters in a JSON request body, and v3 in the URL query string.

<CodeTabs>

```json title="v1"
POST /api/v1/updateRecipient

{
  "email": "recipient@example.com",
  "sms": null,
  "props": { "firstname": "John" }
}
```

```json title="v2"
POST /api/v2/deliveries/batch-send

{
  "letter": { "type": "draft", "id": 95 },
  "lists": [12345]
}
```

```http title="v3"
GET /api/v3/events?type=mailopen&limit=100
```

</CodeTabs>

## v1 and v2

Send the parameters as a JSON object in the request body, with the parameter names from the API
Reference as keys.

In v1, you can leave out optional parameters, as the v1 example above does for
[`updateRecipient`](/api/contacts#update-contact-by-email), but an unknown parameter name causes
an error. v1 also does not accept an empty request body, so send `{}` to endpoints that take no
parameters.

:::note{title="Positional parameters in v1"}

For backwards compatibility, v1 parameters can also be a JSON array, in the same order as in the
API Reference, for example `["recipient@example.com", null, {"firstname": "John"}]`. Do not mix
the two formats in one request.

:::

## v3

All v3 endpoints are `GET` requests, so parameters go in the URL query string and the request body
is empty.

### Paging

v3 endpoints that return lists, such as [`events`](/api/events#get-events) and the delivery
[`openers`](/api/delivery-reports#get-delivery-openers), return them one page at a time:

- `limit` is the number of items on a page. It defaults to `25`.
- `offset` is the number of items to skip. It defaults to `0`.

To get the next page, increase `offset` by `limit`. Stop when a page has fewer than `limit` items.
v3 handles [one request at a time](./restrictions#request-rate) per user, so wait for each
response before you send the next request.

Keep the other parameters the same on every page. Events are returned newest first by default, so
events that arrive while you are paging shift the pages. To avoid this, filter by a time range that
has already ended, or sort oldest first with `sort=+at`.
