After tinkering around, this worked for me.
headers = {'Authorization': f'Basic {apiKey}'}
files = [
('attachments[]', open(
'file_1.jpg', 'rb')),
('attachments[]', open('file_2.pdf', 'rb')),
('email', (None, 'test@gmail.com')),
('subject', (None, 'Pickup & Delivery')),
('description', (None, 'TEST TEST Testing')),
('custom_fields[cf_fcr]', (None, 'Yes')),
('custom_fields[cf_sub_category]',
(None, 'Delay in Shipment Delivery - Forward')),
('custom_fields[cf_issue_category]',
(None, 'Shipment Delivery')),
('custom_fields[cf_awb_number]', (None, '333')),
('cc_emails[]', (None, 'test@gmail.com')),
('tags[]', (None, 'CARGO-ICRM')),
('type', (None, 'Query')),
('group_id', (None, '11')),
('name', (None, 'John')),
('priority', (None, '1')),
('status', (None, '2')),
]
r = requests.post(url, files=files, headers=headers)
If you use postman to convert the curl into Python requests, it uses data param which gives error such as
{'description': 'Validation failed', 'errors': [{'field': 'cc_emails', 'message': 'Value set is of type String.It should be a/an Array', 'code': 'datatype_mismatch'}, {'field': 'tags', 'message': 'Value set is of type String.It should be a/an Array', 'code': 'datatype_mismatch'}, {'field': 'custom_fields', 'message': 'Value set is of type String.It should be a/an key/value pair', 'code': 'datatype_mismatch'}]}
Use online curl conveters; they give the correct conversion. https://curlconverter.com/