Error when send commands in smarthings server

Hello, I am trying to create a system to control my house. I need to control a Samsung TV.
When I try to request the url “{deviceId}/commands” with correct authorization headers the error is the following:

[{“requestId”:"",“error”:{“code”:“ConstraintViolationError”,“message”:“The request is malformed.”,“details”:[{“code”:“BodyMalformedError”,“target”:“httpRequestBody”,“message”:“The request body is malformed and cannot be processed by server.”,“details”:}]}}]

The request body is the following:

Headers are the following:

["Authorization: Bearer ",“Content-Type: application/json”,“accept: application/json”]

Can someone help me? Thank you.

Are you using POST method for this?
Have you tried including empty arguments array in the body?

Yes, I am using POST method.

If I use the following body the error is the same:

I was using python’s request library to send the POST request. Changing data=payload to json=payload fixed the problem for me. Corrected Code Below

payload ={“commands”:[{“component”:“main”,“capability”:“switch”,“command”:“on”}]}

activity_request =‘{deviceid}/commands’, json=payload, headers={‘Authorization’: 'Bearer ’ + custom_token})

I solved the problem changing the body injection.

Now data are sent using GuzzleHttp php library that manage the body in a different way.