title: Adding a user as collaborator of an github organization with octokit ends in 404
body: <p>I want to add GitHub users as collaborators of an organization repository using NodeJS octokit/rest library. The library and manually sent requests to GitHub API repond with HTTP 404 - Not Found, even if my user account has a valid access token with the necessary permissions.</p>
  
  <p>I am trying to add GitHub users as collaborators of an organization repository, no matter if they are members of the organization itself.
  My requesting user is authenticated through a personal access token with needed permissions.
  I am using 'octokit/rest's <code>repos.addCollaborators</code> function with organization name as owner, the repositoryname as repo and the username of the user to be added as username property of the parameter object. The octokit object uses my accounts access token for authentification. My user account is owner of the organization.</p>
  
  <pre><code>this.octokit = new Octokit({
              auth: accessToken,
              log: {
                  debug: (msg) =&gt; { logger.debug(`${msg}`); },
                  error: (msg) =&gt; { logger.error(`${msg}`); },
                  info: (msg) =&gt; { logger.info(`${msg}`); },
                  warn: (msg) =&gt; { logger.warn(`${msg}`); }
              },
              userAgent: process.env.APP_NAME
  });
  // ...
  this.octokit.repos.addCollaborator({
                  owner: ownername,
                  repo: url[url.length - 1],
                  username
  }).catch((msg) =&gt; {
                  logger.verbose(`Error message ${msg}`);
  });
  </code></pre>
  
  <p>Regarding the documentation, I expect that an invite is sent to the user.<br>
  Unfortunately I get 404 Not Found.</p>
  
  <p>The same happens when I use curl: </p>
  
  <pre class="lang-sh prettyprint-override"><code>curl -u myUsername:token -X PUT https://api.github.com/repos/:organizationname/:reponame/collaborators/:collaboratorname?permission=push
  </code></pre>
  
  <p>The same behaviour appears when performing a membership request.</p>