younifyd
Menu

Retrieve User

Retrieve a user

GET/projects/{projectId}/users/{userId}

Use it in a workflow

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

Request

Path parameters

projectIdstringrequired

The unique ID of the project.

userIdstringrequired

The project user ID, which starts with `p`. Global user IDs, which start with `g`, are rejected. To fetch several users, pass a comma-separated list of IDs. The response is then an array.

Response

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

idstring
sanityUserIdstring
projectIdstring
displayNamestring
familyNamestring
givenNamestring
middleNamestring
imageUrlstring
emailstring
createdAtstring (date-time)
updatedAtstring (date-time)
json
{
  "id": "string",
  "sanityUserId": "string",
  "projectId": "string",
  "displayName": "string",
  "familyName": "string",
  "givenName": "string",
  "middleName": "string",
  "imageUrl": "string",
  "email": "string",
  "createdAt": "2025-01-01T00:00:00Z",
  "updatedAt": "2025-01-01T00:00:00Z"
}

Need more? See the Sanity guide for connection setup and behaviour shared by every action.

Was this page helpful?
Retrieve User — Sanity — Documentation