Skip to main content
PATCH
Update system URLs configuration
Admin endpoint to update system URLs including terms and conditions, privacy policy, FAQs, and support email.
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:
  • termsAndConditions: URL to the terms and conditions page (must be valid URL)
  • privacyPolicy: URL to the privacy policy page (must be valid URL)
  • faqs: URL to the FAQs page (must be valid URL)
  • supportEmail: Support email address (must be valid email format)

Validation

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

Example

Update Support Email and FAQs URL

cURL
Node.js
Python

Response

Error Responses

401 Unauthorized

Missing or invalid backend secret:

400 Bad Request

Invalid URL or email 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
termsAndConditions
string<uri>
privacyPolicy
string<uri>
faqs
string<uri>
supportEmail
string<email>

Response

System URLs updated successfully.

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