Skip to main content
PATCH
Update social media URLs configuration
Admin endpoint to update social media profile URLs for Facebook, Instagram, LinkedIn, and Twitter.
This is an administrative endpoint that requires authentication via the BACKEND_SECRET. Only authorized administrators should have access to this endpoint.

Authentication

This endpoint requires the x-backend-secret header with a value matching the BACKEND_SECRET environment variable configured on the server.

Optional Headers

  • x-user-id: User ID of the administrator making the change (defaults to “admin”)

Request Body

All fields are optional. Only include the URLs you want to update:
  • facebook: Facebook page URL (must be valid URL)
  • instagram: Instagram profile URL (must be valid URL)
  • linkedin: LinkedIn company page URL (must be valid URL)
  • twitter: Twitter/X profile URL (must be valid URL)

Validation

  • All URLs must be properly formatted (start with http:// or https://)
  • Invalid URLs will return a 400 Bad Request error

Example

Update Twitter URL to X.com

cURL
Node.js
Python

Response

Update Multiple URLs at Once

cURL
Node.js

Error Responses

401 Unauthorized

Missing or invalid backend secret:

400 Bad Request

Invalid URL format:

Audit Trail

All updates are logged with:
  • Timestamp of the change
  • User ID who made the change (from x-user-id header)
  • Fields that were modified
You can query the MongoDB app_configuration collection to see the audit trail:

See Also

Headers

x-backend-secret
string
required

Backend secret for authentication

x-user-id
string

User ID performing the update (optional, defaults to 'admin')

Body

application/json
facebook
string<uri>
instagram
string<uri>
linkedin
string<uri>
twitter
string<uri>

Response

Social media URLs updated successfully.

success
enum<boolean>
required
Available options:
true
data
object
required
Example:
meta
object
required