Menu
Decline Request
Decline request
PUT
/v2024-07-01/access/{resourceType}/{resourceId}/requests/{requestId}/declineUse it in a workflow
- Add a step and choose the Sanity connector.
- Pick the Decline Request action (under Access).
- Fill in the fields below, then reference the result from later steps as
{{declineRequest.response.data}}.
Request
Path parameters
Response
Returns 200 with an object. Read it in later steps with {{declineRequest.response.data.<field>}}.
{
"id": "request-id",
"status": "pending",
"resourceId": "project-id",
"resourceType": "project",
"createdAt": "2024-07-10T12:00:00Z",
"requestedByUserId": "user-id",
"updatedAt": "2024-07-10T12:00:00Z",
"updatedByUserId": "admin-id",
"note": "Text describing the reason of the request.",
"requestedByUserProfile": {
"id": "string",
"displayName": "string",
"email": "string",
"provider": "string",
"createdAt": "2025-01-01T00:00:00Z",
"familyName": "string",
"givenName": "string",
"middleName": "string",
"imageUrl": "string",
"tosAcceptedAt": "2025-01-01T00:00:00Z",
"updatedAt": "2025-01-01T00:00:00Z",
"isCurrentUser": false
},
"type": "access",
"requestedRole": "editor"
}
Need more? See the Sanity guide for connection setup and behaviour shared by every action.
Was this page helpful?