Getting response [ "{\"message\":\"Not found\"}" ] while trying to create a dashboard using python requests

hello. i have grafana 8.0.0 currently installed locally. i have a django view where i want to use it to create a dashboard in grafana. this is my code:

url = “http://localhost:3000/api/dashboards/db
apiKey = request.META.get(‘HTTP_API_KEY’)
headers = {
“Content-Type”: “application/json”,
“Authorization”: "Bearer " + apiKey
body = {
“dashboard”: {
response =, headers=headers,, verify=False)
return Response(response,status=response.status_code)

but i currently get this response:
“{“message”:“bad request data”}”

any ideas what is it that i’m doing wrong?