/**
 * Segment.Create API
 *
 * @param array $params
 * @return array API result descriptor
 * @see civicrm_api3_create_success
 * @see civicrm_api3_create_error
 * @throws API_Exception
 */
function civicrm_api3_segment_create($params)
{
    return civicrm_api3_create_success(CRM_Contactsegment_BAO_Segment::add($params), $params, 'Segment', 'Create');
}