Payload issue with App Script and PATCH

I’m trying to update submitted data via google sheets. I’m doing some initial testing with the follow code but it does not work.

function apiPatch() {

var payload = {‘_id’:‘235834200’,‘data’:{‘teacher’:‘teacher2’}};

// API Endpoint options, including header options.
var apiOptions = {
“muteHttpExceptions”: true,
“method” : “PATCH”,
“headers” : {
“Authorization” : “Token MY UNIQUE TOKEN”,
“Content-Type”: “application/json”
“payload”: JSON.stringify(payload)

// Fetch contents from API endpoint.
var apiResponse = UrlFetchApp.fetch(‘**MYUNIQUEFORMID**/data/bulk/’, apiOptions);


The log enties from this are as follows

  1. {“_id”:“235834200”,“data”:{“teacher”:“teacher2”}}
  2. {method=PATCH, payload={“_id”:“235834200”,“data”:{“teacher”:“teacher2”}}, headers={Authorization=Token MY UNIQUE TOKEN, Content-Type=application/json}, muteHttpExceptions=true}
  3. {“payload”:[“This field is required.”]}

I’m new to API calls and JSON and my hunt for info on why this response is given is proving to be fruitless. Does anyone know what I’m missing?