public function postTasks($name, $payloads = array(), $options = array())
    {
        $url = "projects/{$this->project_id}/tasks";

        $request = array(
            'tasks' => array(),
        );

        foreach ($payloads as $payload) {
            $task_data = array(
                "name"      => $name,
                "code_name" => $name,
                'payload'   => json_encode($payload),

            );

            foreach ($options as $k => $v) {
                $task_data[$k] = $v;
            }

            $request['tasks'][] = $task_data;
        }

        $this->setCommonHeaders();
        $res = $this->apiCall(self::POST, $url, $request);
        $tasks = self::json_decode($res);

        $ids = array();
        foreach ($tasks->tasks as $task) {
            $ids[] = $task->id;
        }
        return $ids;
    }