1
Authenticate with GitHub
Navigate to
GET /api/auth/github in your browser. Shipyard redirects you to GitHub’s OAuth consent screen requesting the read:user, repo, and read:org scopes. After you approve, GitHub redirects back to the callback endpoint and Shipyard issues a JWT. Store this token — every subsequent API call requires it in the Authorization: Bearer <token> header.2
Browse your organizations
Call
GET /api/repo/orgs to retrieve a list of your GitHub organizations and personal account. The response includes each account’s login name, which you’ll use to list repositories in the next step.3
List repositories
Call Each result includes the repository name, default branch, HTTPS URL, and owner — everything you need to create the project.
GET /api/repo/repos with the org and page query parameters to paginate through repositories for a given account. Results are sorted by creation date (newest first) and filtered to repos you own.4
Create the project
Send a A successful response returns
POST /api/project request with the repository details and any build configuration. Shipyard validates the inputs, registers a webhook on the repo, inserts the project record, and immediately queues an initial build from the latest commit on the configured branch.201 with the project record and the ID of the initial build.5
Webhook registered automatically
Shipyard calls the GitHub API on your behalf to register a push-event webhook on the repository. The webhook ID is stored against the project record so Shipyard can remove it if you later delete the project. From this point forward, any push to the configured branch triggers a new build — no manual setup required.
Project fields
The project
name must be unique per user. It becomes the subdomain at which your project is served, for example https://my-frontend.yourdomain.com. Choose a name that is URL-safe and does not conflict with existing projects.