import requests
url = "https://api.keywordsai.co/api/request-logs/batch-update/"
api_key = "YOUR_KEY" # Replace with your actual Keywords AI API key
data = {
"logs": [
{ "unique_id": "xxxxxx",
"metadata": {
"metadata_key": "updated_value"
},
"note": "updated note"
}
# other logs to update
]
}
headers = {
"Authorization": f"Bearer {api_key}",
"Content-Type": "application/json"
}
response = requests.patch(url, headers=headers, json=data)
print(response.json())