Search Documentation

Search for a documentation page...

Socials API

REST API endpoints for reading and setting your store's social media links.

Your store has a set of social media links — one slot per platform — surfaced in the storefront footer and elsewhere. Each value is the handle or full URL you entered, or null when that platform isn't set. The supported platforms are instagram, facebook, x, youtube, linkedin, tiktok, and email.

Get Socials

GET /api/v1/socials

Returns the store's configured social media links, keyed by platform. Every platform key is always present in the response; unset platforms come back as null.

curl \
-H "Authorization: Bearer your_api_key" \
https://your-store.yns.store/api/v1/socials

Response (200)

{
"socials": {
"instagram": "https://instagram.com/yourstore",
"facebook": "https://facebook.com/yourstore",
"x": "yourstore",
"youtube": null,
"linkedin": null,
"tiktok": "@yourstore",
"email": "hello@example.com"
}
}

Store Not Found (404)

{
"error": "Store not found"
}

Set Socials

PUT /api/v1/socials

Replaces the store's social links wholesale. Provide a per-platform map of handles or URLs under socials. Omit a platform or pass null to clear it — the response always returns the full normalized map with every platform key present. Values are trimmed, and empty strings are normalized to null.

Request Body

FieldTypeRequiredDescription
socialsobjectYesPer-platform handle/URL map. Replaces the stored socials wholesale

The socials object accepts these keys, each an optional string or null:

KeyTypeDescription
instagramstring | nullInstagram handle or URL
facebookstring | nullFacebook handle or URL
xstring | nullX (Twitter) handle or URL
youtubestring | nullYouTube channel handle or URL
linkedinstring | nullLinkedIn handle or URL
tiktokstring | nullTikTok handle or URL
emailstring | nullPublic contact email address
curl -X PUT \
-H "Authorization: Bearer your_api_key" \
-H "Content-Type: application/json" \
-d '{"socials": {"instagram": "https://instagram.com/yourstore", "tiktok": "@yourstore", "email": "hello@example.com"}}' \
https://your-store.yns.store/api/v1/socials

Response (200)

Returns the normalized links. Platforms not included in the request are set to null.

{
"socials": {
"instagram": "https://instagram.com/yourstore",
"facebook": null,
"x": null,
"youtube": null,
"linkedin": null,
"tiktok": "@yourstore",
"email": "hello@example.com"
}
}