title: Calling Curl API on Python
body: <p>I want to call CURL API on python. </p>
  
  <pre><code>curl -X POST -H "Authorization:Token 00d2e3a10c82420414b2d36d28fb5afc2cd8e8a5" \
  -H "Content-Type: application/json" \
  -d '{"module_id":"[MODULE_ID]", "text": "example text"}' \
  -D - \
  https://api.tocall.com/
  </code></pre>
  
  <p>I used <code>requests</code> module for making request and <code>json</code> module for converting object to string. But I'm getting 404. </p>
  
  <p>Where am I wrong? </p>
  
  <pre><code>import requests
  import json
  headers = {
      'Authorization': 'Token 00d2e3a10c82420414b2d36d28fb5afc2cd8e8a5',
      'Content-Type': 'application/json',
  }
  url = "https://api.tocall.com/"
  data = '{"module_id":"[MODULE_ID]", "text": "example text"}'
  response= requests.post(url, data=json.dumps(data), headers=headers)
  print(response.status_code)
  </code></pre>