REST API endpoints for social accounts

Use the REST API to manage social accounts of authenticated users.

About social account administration

If a request URL does not include a {username} parameter then the response will be for the signed-in user (and you must pass authentication information with your request). Additional private information, such as whether a user has two-factor authentication enabled, is included when authenticated through OAuth with the user scope.

Note

Most endpoints use Authorization: Bearer <YOUR-TOKEN> and Accept: application/vnd.github+json headers, plus X-GitHub-Api-Version: 2026-03-10. Curl examples below omit these standard headers for brevity.

List social accounts for the authenticated user

GET /user/social_accounts

Lists all of your social accounts.

Parameters

Headers

Path and query parameters

HTTP response status codes

Code examples

Example

Request:

curl -L \
  -X GET \
  https://api.github.com/user/social_accounts

Response schema (Status: 200):

Array of Social account:

Add social accounts for the authenticated user

POST /user/social_accounts

Add one or more social accounts to the authenticated user's profile.
OAuth app tokens and personal access tokens (classic) need the user scope to use this endpoint.

Parameters

Headers

Body parameters

HTTP response status codes

Code examples

Adding multiple social accounts

Request:

curl -L \
  -X POST \
  https://api.github.com/user/social_accounts \
  -d '{
  "account_urls": [
    "https://facebook.com/GitHub",
    "https://www.youtube.com/@GitHub"
  ]
}'

Response schema (Status: 201):

Same response schema as List social accounts for the authenticated user.

Delete social accounts for the authenticated user

DELETE /user/social_accounts

Deletes one or more social accounts from the authenticated user's profile.
OAuth app tokens and personal access tokens (classic) need the user scope to use this endpoint.

Parameters

Headers

Body parameters

HTTP response status codes

Code examples

Deleting multiple social accounts

Request:

curl -L \
  -X DELETE \
  https://api.github.com/user/social_accounts \
  -d '{
  "account_urls": [
    "https://facebook.com/GitHub",
    "https://www.youtube.com/@GitHub"
  ]
}'

Response schema (Status: 204):

List social accounts for a user

GET /users/{username}/social_accounts

Lists social media accounts for a user. This endpoint is accessible by anyone.

Parameters

Headers

Path and query parameters

HTTP response status codes

Code examples

Example

Request:

curl -L \
  -X GET \
  https://api.github.com/users/USERNAME/social_accounts

Response schema (Status: 200):

Same response schema as List social accounts for the authenticated user.