When I create a ticket using API I would like to send the Department ID as (optional?) parameter.
That does not appear to be field you can pass along.
https://github.com/osTicket/osTicket/blob/43bf186db9e85c8ec218158ea4c0bc3e90bbe3eb/setup/doc/api/tickets.md