API Key Usage

OnSefy uses Bearer Token authentication to secure its API. Each request must include two key headers:

πŸ”‘ Required Headers

HeaderValueRequiredDescription
AuthorizationBearer YOUR_API_KEYβœ…Your API key as a Bearer token
X-Service-IDYOUR_SERVICE_IDβœ…The unique ID of your OnSefy application
Content-Typeapplication/jsonβœ…Must be set to JSON

πŸ“¦ Request Header Format

Header Example
Authorization: Bearer YOUR_API_KEY
X-Service-ID: YOUR_SERVICE_ID
Content-Type: application/json

πŸ“¦ cURL Request Format

cURL Request Outline Example
curl -X POST https://api.onsefy.com/v1/validate/user \
  -H "Authorization: Bearer 5n7Jut9gRwhY0XJVrKcIycF...." \
  -H "X-Service-ID: 09083MRBc1743690899" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Jane Doe",
    "email": "jane.doe@example.com",
    "etc": ".....",
  }

πŸ“¬ Postman Request Format

  1. Open Postman and create a new POST request.
  2. Set the URL to: https://api.onsefy.com/v1/validate/user
  3. Under the Authorization,Headers and Body tab, add the following:
TabSectionSet Value
AuthorizationSelect Bearer token5n7Jut9gRwhY0XJVrKcIycF…
HeadersSet Key X-Service-Id09083MRBc1743690899
BodySelect raw{ "name": "Jane Doe","email":"...." }
  • in next section you will get request format examples