POST /update-user

  • This endpoint is used to update a user's API key. It requires the authorization header to be set to an ADMIN API key.
    • Docs on the Authorization header can be found here.
  • It also requires a user header to be set to the username of the user to update.

Response

The response of this endpoint will be a JSON object with the following properties:

{
    "status": "ok",
    "message": "New API key for the user ex: 1234567890"
}

Example

A basic example of how to use this endpoint in JavaScript:

fetch('https://api.corlink.xyz/update-user', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'authorization': 'Bearer YOUR_TOKEN',
    'user': 'A_USERNAME ex: user123'
    },
})
Table of Contents