Not sure where the best place for this is, but wanted to add an example to send a custom field when using the form method (required when sending attachments):
notice the custom_fields[field_name] syntax, I could not find this anywhere else, but the support team at freshdesk responded to my question right away with the correct info, thanks!
curl -v -u user@yourcompany.com:test -F "attachments[]=@/path/to/attachment1.ext" -F "attachments[]=@/path/to/attachment2.ext" -F "email=example@example.com" -F "custom_fields[category]=Primary" -F "custom_fields[department]=Testing" -F "subject=Ticket Title" -F "description=this is a sample ticket" -X POST 'https://domain.freshdesk.com/api/v2/tickets'