Create API key
create_api_keyCreate a Git API key with repository scopes and choose its type. type user (the default) reaches every project you can access, follows your live workspace role for pushes and must expire (1–366 days); use it for a coding agent working for you, such as Codex or Claude Code. type project reaches only the projects in projectIds (one or more you can manage) and may never expire; use it for CI or automation. Returns the secret once and structured Git host/username. Follow the local-development skill to store it through stdin and verify credential read-back; never print, commit, or repeat the secret. Site objects from list_sites include clone_url. Creating a user key beyond ten live keys revokes the least recently used one (unused keys first).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| type | No | Which access the key carries. user (default): every project you can access, following your live workspace role; pick it for a coding agent working on your behalf, such as Codex or Claude Code. project: only the projects in projectIds; pick it for CI or automation that should touch named projects and nothing else. | user |
| scopes | Yes | Repository scopes: repo.read to clone and pull, add repo.write to push. | |
| projectIds | Yes | Projects a project key can reach; you must be able to manage each one. Required for type project. Null for type user, which reaches every project you can access. | |
| workspaceId | Yes | ||
| expiresInDays | Yes | Days until the key expires (1–366). User keys must expire; null makes a project key last until revoked. |