request
Update a request's status
Changed onUpdates a request's status to approved or declined. Also returns the request in a JSON object.
Requires the MANAGE_REQUESTS permission or ADMIN.
post/request/{requestId}/{status}
Request
- Base URL: http://localhost:5055/api/v1
- URL: http://localhost:5055/api/v1/request/{requestId}/{status}
- Auth: one of:
- API key in cookie connect.sid
- API key in header X-Api-Key
Path parameters
requestIdstring required
Example:1
Request ID
status'approve' | 'decline' required
New status
Response
Request status changed
Example response
{
"id": 123,
"media": {
"createdAt": "2020-09-12T10:00:27.000Z",
"updatedAt": "2020-09-12T10:00:27.000Z"
},
"createdAt": "2020-09-12T10:00:27.000Z",
"updatedAt": "2020-09-12T10:00:27.000Z",
"requestedBy": {
"id": 1,
"email": "hey@itsme.com",
"userType": 1,
"createdAt": "2020-09-02T05:02:23.000Z",
"updatedAt": "2020-09-02T05:02:23.000Z",
"requestCount": 5
},
"modifiedBy": {
"id": 1,
"email": "hey@itsme.com",
"userType": 1,
"createdAt": "2020-09-02T05:02:23.000Z",
"updatedAt": "2020-09-02T05:02:23.000Z",
"requestCount": 5
}
}Changes
- info
added the non-success response with the status
- info
added the non-success response with the status
- info
- info
added the optional property
to the response with the status
- info