Skip to main content

PUT /apps/:appId/users/:userId/access-status/:accessStatus

Request

This route will change the access status on a account.

Request Method:

  • PUT

Base URL:

  • https://api.userdocks.com

End Point:

  • /v1/apps/:appId/users/:userId/access-status/:accessStatus
Path Variables:
VariableTypeRequiredDescription
:appIdStringtruethe UUID of the app
:userIdStringtruethe UUID of the user
:accessStatusStringtrueeither 0 or 1 equivalent to freezed or unfreezed
Query Parameters:

None

HTTP Headers:

Note: Never use API Keys on the client

Note: This endpoint can only be accessed with an API key

PropertyTypeRequiredAccessDescription
X-API-KEYStringtrueOnly access to AppApi key for the userdocks app
X-API-KEY-TYPEStringtrueOnly access to Appwrite
X-CLIENT-IDStringtrueOnly access to AppUUID of the userdocks app

HTTP Body:

None

Response:

  • Object

Example:

try {
// call userdocks user management API
const response = await fetch('https://api.userdocks.com/v1/apps/:appId/users/:userId/access-status/:accessStatus', {
method: 'PUT',
headers: {
'X-API-KEY': String,
'X-CLIENT-ID': String,
'X-API-KEY-TYPE': 'write',
'Content-Type': 'application/json',
},
body: JSON.stringify({
}),
});
const { data } = await response.json();

// do something with the data
} catch (err) {
console.error(err);
// handle error
}

Successful Response:

Can have the following HTTP Status Codes:

  • 200 - OK
// POST /v1/apps/:appId/users/:userId/access-status/:accessStatus
{
"success": Boolean,
"message": String,
"error": null,
"data": null,
}

Error Response:

Can have the following HTTP Status Codes:

  • 400 - Bad Request
  • 401 - Unauthorized
  • 403 - Forbidden
  • 500 - Internal Server Error
// POST /v1/users/:userId/access-status/:accessStatus
{
"success": Boolean,
"error": String,
"message": null,
"data": null
}