How to correctly format API requests for Mandrill using Fetch plugin? Getting error "you must specify a key value"
Two things I'm noticing about your code snippet:


You'll want to use POST per the Mandrill API docs.


  All API calls should be made with HTTP POST.

The options object should only contain valid Guzzle request options (key is not an actual request option); I think what you're trying to do is pass your key parameter in the request body. There are multiple options for sending data in the request body (form_params, body, json, or multipart), but since the Mandrill API is expecting a json request body we'll use the json option like so:

{% set options = {
  json: {
    key: 'REDACTED',
  }
} %}





All together, this should give you a working API call:

{% set client = {
  base_uri: 'https://mandrillapp.com/api/1.0/',
  timeout: 10
} %}


{% set options = {
  json: {
    key: 'REDACTED',
  }
} %}

{% set destination = 'users/ping.json' %}

{% set request = fetch(client, 'POST', destination, options) %}