Skip to main content

Social Links

Social links represent external profile links (GitHub, LinkedIn, Twitter, etc.) displayed on a site. They support custom ordering via drag-and-drop reordering.

Endpoints

MethodPathPermissionDescription
GET/sites/{site_id}/socialReadList all social links for a site
GET/social/{id}ReadGet a social link by ID
POST/sites/{site_id}/socialAuthorCreate a social link
PUT/social/{id}AuthorUpdate a social link
DELETE/social/{id}EditorDelete a social link
POST/sites/{site_id}/social/reorderAuthorBatch-reorder social links

Returns social links ordered by display_order:

curl -H "X-API-Key: oy_live_abc123..." \
https://your-domain.com/api/v1/sites/{site_id}/social

Response 200 OK

[
{
"id": "link-uuid",
"platform": "github",
"url": "https://github.com/username",
"label": "GitHub",
"icon": "github",
"display_order": 0,
"is_active": true
}
]
curl -X POST \
-H "X-API-Key: oy_live_abc123..." \
-H "Content-Type: application/json" \
-d '{
"platform": "linkedin",
"url": "https://linkedin.com/in/username",
"label": "LinkedIn",
"icon": "linkedin"
}' \
https://your-domain.com/api/v1/sites/{site_id}/social

Response 201 Created

curl -X POST \
-H "X-API-Key: oy_live_abc123..." \
-H "Content-Type: application/json" \
-d '{
"items": [
{"id": "link-1", "display_order": 0},
{"id": "link-2", "display_order": 1},
{"id": "link-3", "display_order": 2}
]
}' \
https://your-domain.com/api/v1/sites/{site_id}/social/reorder

Response 204 No Content