/** * Upload contacts stored in a csv file to some group * @param string $file Path to csv file * @param int $groupId Group id * @link http://api.beepsend.com/docs.html#contacts-upload More informations about file formating * @return array */ public function upload($file, $groupId) { if (!file_exists($file)) { throw new FileNotFound('File you are trying to upload doesn\'t exists!'); } /* Read file data */ $data = file_get_contents($file); $response = $this->request->upload($this->actions['groups'] . $groupId . $this->actions['upload'], $data); return $response; }