diff --git a/service_desk/handlers.py b/service_desk/handlers.py index 86ca470..3ffb71e 100644 --- a/service_desk/handlers.py +++ b/service_desk/handlers.py @@ -178,7 +178,7 @@ async def create_ticket_in_sd(requester_email: str, subject: str, description: s if template_id: req_payload["request"]["request_template"] = {"id": template_id} async with httpx.AsyncClient(verify=False) as client: - resp = await client.post(endpoint, headers=headers, content=json.dumps({"input_data": req_payload}), timeout=15.0) + resp = await client.post(endpoint, headers=headers, content=json.dumps({"input_data": json.dumps(req_payload)}), timeout=15.0) if resp.status_code not in [200, 201]: sd_workflow_logger.error(f"API Error: status={resp.status_code} body={resp.text}") return resp