Issue while creating direct chat

I am calling 3 apis one after the other while trying to create direct chat.
The apis are as mentioned below.

Request URL: /v4/channels/direct
Request Method: POST
Status Code: 201 Created
Payload: ["omjiw51g93fpxcefmnixq9sibw","ikm54hoaj7ytmj7u9xjtipixcw"]
Response: {"id":"a6ftn18n8igj3ehaw3ky5pzgxh","create_at":1641534856457,"update_at":1641534856457,"delete_at":0,"team_id":"","type":"D","display_name":"","name":"ikm54hoaj7ytmj7u9xjtipixcw__omjiw51g93fpxcefmnixq9sibw","header":"","purpose":"","last_post_at":0,"total_msg_count":0,"extra_update_at":0,"creator_id":"","scheme_id":null,"props":null,"group_constrained":null,"shared":null}

Request URL: /v4/teams/ompypkc5pt87pk6r4y1r31yy9w/channels/name/ikm54hoaj7ytmj7u9xjtipixcw__omjiw51g93fpxcefmnixq9sibw
Request Method: GET
Status Code: 200 OK
Response: {"id":"a6ftn18n8igj3ehaw3ky5pzgxh","create_at":1641534856457,"update_at":1641534856457,"delete_at":0,"team_id":"","type":"D","display_name":"","name":"ikm54hoaj7ytmj7u9xjtipixcw__omjiw51g93fpxcefmnixq9sibw","header":"","purpose":"","last_post_at":0,"total_msg_count":0,"extra_update_at":0,"creator_id":"","scheme_id":null,"props":null,"group_constrained":null,"shared":null}

Request URL: /v4/users/ikm54hoaj7ytmj7u9xjtipixcw/preferences
Request Method: PUT
Status Code: 400 Bad Request
Payload: [{"user_id":"ikm54hoaj7ytmj7u9xjtipixcw","category":"direct_channel_show","name":"omjiw51g93fpxcefmnixq9sibw","value":"true"},{"user_id":"ikm54hoaj7ytmj7u9xjtipixcw","category":"channel_open_time","name":"a6ftn18n8igj3ehaw3ky5pzgxh","value":1641534837689}]
Response: {"id":"api.context.invalid_body_param.app_error","message":"Invalid or missing preferences in request body.","detailed_error":"","request_id":"o5jy8uk5ibgste95dihrx93gxw","status_code":400}

ANyone has idea about this issue?