List the GitHub accounts of a workspace
list_github_accounts
Lists the GitHub accounts connected to a workspace, with the id that create_site and move_site_code_to_github take.
These are the accounts on the GitHub tab of the workspace settings, oldest first, including any where the Modulify app is suspended. Every member of the workspace can read them. The _id of a row is the installationId that create_site takes inside repository and that move_site_code_to_github takes on its own, not the number GitHub gives the installation.
AccountType is Organization or User. Modulify can create a new repository in an organisation, and in a personal account while Granted_At is set and Grant_Expires_At is empty or still ahead. Verifying a personal account sets them, and verifying it again renews them. Until then a site can only go into a repository the personal account already has. RepositorySelection is all when the Modulify app reaches every repository of the account, and selected when it only reaches the ones picked on GitHub. An account takes a site only while its Status is active and once Verified_At is set. Connecting and verifying an account happens in the browser, see Connect a GitHub account to the workspace.
Request
Call it with a POST to https://api.modulify.ai/v1/list_github_accounts, sending the inputs below as a JSON object. The token needs the workspaces:read scope.
It only reads and changes nothing, so retrying it is safe.
curl -X POST https://api.modulify.ai/v1/list_github_accounts \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"workspaceId":"WORKSPACE_ID"}'Over MCP, the same method is the list_github_accounts tool.
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
workspaceId |
string | Yes | The workspace id, from list_workspaces. |
Response
Every call answers with the JSON envelope of success, message, data, code and version. data holds the result described above, and on a method that returns a total, count carries it. The response headers carry the call's X-Request-Id and what is left of your per-minute budget in X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset. Errors explains every status code a call can answer with.