@authenticated_rest_api_view(is_webhook=True)
@has_request_variables
def api_zendesk_webhook(request, user_profile, ticket_title=REQ(), ticket_id=REQ(), message=REQ(), stream=REQ(default='zendesk')):
 subject = truncate(('#%s: %s' % (ticket_id, ticket_title)), 60)
 check_send_message(user_profile, get_client('ZulipZenDeskWebhook'), 'stream', [stream], subject, message)
 return json_success()

@ authenticated_rest_api_view ( is_webhook = True ) @ has_request_variables def api_zendesk_webhook ( request , user_profile , ticket_title = REQ ( ) , ticket_id = REQ ( ) , message = REQ ( ) , stream = REQ ( default = 'zendesk' ) ) : subject = truncate ( ( '#%s: %s' % ( ticket_id , ticket_title ) ) , 60 ) check_send_message ( user_profile , get_client ( 'ZulipZenDeskWebhook' ) , 'stream' , [ stream ] , subject , message ) return json_success ( )
zendesk uses trigers with message templates .