public function registerUploadTask($api_key, $metadata)
    {
        $data = [];
        $this->appendData($data, 'apikey',         $api_key);
        $this->appendData($data, 'filename',       $metadata['filename']);
        $this->appendData($data, 'mimetype',       $metadata['mimetype']);
        $this->appendData($data, 'size',           $metadata['filesize']);
        $this->appendData($data, 'store_location', $metadata['location']);
        $this->appendData($data, 'multipart',      true);

        array_push($data, ['name' => 'files',
            'contents' => '',
            'filename' => $metadata['filename']
        ]);

        $this->appendSecurity($data);

        $url = FilestackConfig::UPLOAD_URL . '/multipart/start';
        $response = $this->sendRequest('POST', $url, ['multipart' => $data]);
        $json = $this->handleResponseDecodeJson($response);

        return $json;
    }