Cannot Perform “PATCH” Request Using Google App Script

When attempting to use the PATCH method in Google Apps Script , I get an error INVALID_REQUEST_UNKNOWN .

I’m able to do a POST and GET request. Tested my credentials using CURL and this worked. Tried the “HTTP Override” hack and that did not work.

function postToAirtable() {
  var url = 'https://api.airtable.com/v0/appxs9P0mXsqcXs5R/Outreach';
  var data = {
    'fields': {

      'Task': '<Task Name>',
      'Outreacher': '<Person>',
      'Month': 'May ',
      'Status': 'In Progress',
      'Go Live Date': '2016-03-01',
      'Copy Card Link': [
        'recONM5ul2oaG6yKi'
      ],
      'Label': 'DET'
    }
  };

  var headers = {'Authorization':'Bearer ' + '<API KEY>'};

  var options = {
    'contentType':'application/json',
    'method' : 'PATCH',
    'headers': headers,
    // Convert the JavaScript object to a JSON string.
    'payload' : JSON.stringify(data),
  };
  //Logger.log(options);   

  Logger.log(UrlFetchApp.fetch(url, options));


};

Every record in Airtable has a unique record ID. You receive this record ID whenever you perform a GET or POST request.

When doing an update (PUT or PATCH) or delete (DELETE) operation, you must provide the Airtable record ID for the record you are trying to modify. The record ID should be in the URL path after the table name.

For example, if you are trying to do a PATCH on your record with an record ID “rec123ABC987”, your URL would look like:

    var url = 'https://api.airtable.com/v0/appxs9P0mXsqcXs5R/Outreach/rec123ABC987';

That worked perfect. Thanks for your help