Grafana API create dashboard API with Python

Sending you snippet of my code below. The folder gets created but I get a ‘400’ error when I try to create dashboard:

import requests
import json

url_dest = ‘URL_DUMMY/api/’
headers_dest = {
‘Accept’: ‘application/json’,
‘Content-Type’: ‘application/json’,
‘Authorization’: ‘Bearer API_KEY_DUMMY’
}

s = requests.Session()
s.headers = headers_dest

new_fldr_data = {
“uid”: “l3KqBxCMz”,
“title”: “Test Folder”
}
r = s.post(url_dest + ‘folders’, headers=headers_dest, data = json.dumps(new_fldr_data))

db_data = {
“dashboard”: {
“id”: None,
“uid”: None,
“title”: “Production Overview”,
“tags”: [ “templated” ],
“timezone”: “browser”,
“schemaVersion”: 16,
“version”: 0,
“refresh”: “25s”
},
“folderId”: 0,
“folderUid”: “l3KqBxCMz”,
“message”: “Made changes to xyz”,
“overwrite”: False
}

r = s.post(url_dest + ‘dashboards/db’, headers=headers_dest, json = json.dumps(db_data))
print(r.status_code)