You can use Create ticket with custom fields commands via API as given in this link to create a ticket with dependent field using API.