---
title: "Sync keys from GitHub"
method: POST
path: "/api/v1/user/ssh-keys/github-sync"
tags: ["SSH Keys"]
---

# Sync keys from GitHub

`POST /api/v1/user/ssh-keys/github-sync`

Imports SSH keys from linked GitHub account. Adds new keys, updates existing, removes deleted.

## Response `200`

Sync completed

- GithubSyncResponse — Result of GitHub SSH key sync operation.
  - `synced_count` integer, required — Total keys synced from GitHub
  - `keys_added` integer, required — New keys added
  - `keys_updated` integer, required — Existing keys updated
  - `keys_removed` integer, required — Stale keys removed
  - `errors` string[] — Sync errors encountered

## Other responses

- `400` — GitHub not linked or authorization revoked
- `401` — Not authenticated

---

[API](https://skmtc.net/phala/apis/phala-cloud-api.md) · [All operations](https://skmtc.net/phala/apis/phala-cloud-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/phala/phala-cloud-api/revisions/83c6ae62e860/schema)
