younifyd
Menu

Accept Request

Accept request

PUT/v2024-07-01/access/{resourceType}/{resourceId}/requests/{requestId}/accept

Use it in a workflow

  1. Add a step and choose the Sanity connector.
  2. Pick the Accept Request action (under Access).
  3. Fill in the fields below, then reference the result from later steps as {{acceptRequest.response.data}}.

Request

Path parameters

resourceTypestringrequired

The resource type to scope the access requests to.

One oforganizationprojectmedia-librarycanvasdashboardviewknowledge-base

resourceIdstringrequired

The resource ID to scope the access request to. Must be a valid ID for the resource type.

requestIdstringrequired

The ID of the request.

Request body

Enter the body as JSON in the step's Body field.

roleNamesarray<string>
json
{
  "roleNames": [
    "admin"
  ]
}

Response

Returns 200 with an object. Read it in later steps with {{acceptRequest.response.data.<field>}}.

idstring
statusstring
resourceIdstring
resourceTypestring
createdAtstring (date-time)
updatedAtstring (date-time)
updatedByUserIdstring
requestedByUserIdstring
notestring
requestedByUserProfileobject
idstringrequired
displayNamestringrequired
emailstringrequired
familyNamestring
givenNamestring
middleNamestring | null
imageUrlstring (uri)
providerstringrequired
tosAcceptedAtstring (date-time)
createdAtstring (date-time)required
updatedAtstring (date-time)
isCurrentUserboolean
providerIdstring
typestring

The type of request.

One ofaccessrole

requestedRolestring
json
{
  "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.