title: Python /Json - KeyError 'Body' when creating
body: <p>im getting the error</p>
  
  <pre><code>&gt;&gt;&gt; appt = CreateEvent(authentication, result[0].calendarId, subject_text, start_time, end_time, subscribers, content)
  Traceback (most recent call last):
    File "&lt;stdin&gt;", line 1, in &lt;module&gt;
    File "&lt;stdin&gt;", line 9, in CreateEvent
  KeyError: 'Body'
  </code></pre>
  
  <p>for the below, code, im new to json so dont understand why this isnt working. all the others work but i see errors on the Body, is it because im using two []?
  this is to be sent to the office 365 API so it expects it in that format.</p>
  
  <p>Thanks</p>
  
  <pre><code>def CreateEvent(auth, calendar, subject, start_time, end_time, attendees, content):
      create_url = 'https://outlook.office365.com/api/v1.0/me/calendars/{0}/events'.format(calendar)
      headers = {'Content-type': 'application/json', 'Accept': 'application/json'}
      data = {}
      data['Subject'] = subject
      data['Start'] = start_time
      data['End'] = end_time
      data['Attendees'] = attendees
      data['Body']['Content'] = content
      data['Body']['ContentType'] = 'Text'
      content_data = json.dumps(data)
  </code></pre>