DevelopersHow to connect an assistantKeys
Reference/People/Read

Get a person's photo

GEThttps://api.getwerk.ai/api/v1/people/{personId}/photo

A person's photo, as a JPEG, when the key's person shares a project with them.

With If-None-Match holding the photo's current ETag, the answer is 304 with no body.

Authorization

AuthorizationheaderRequired

Authorization: Bearer <key> Authentication

Headers

If-None-Matchstring

The ETag of a copy already held; when it is current, the answer is 304.

Path parameters

personIdstring, uuidRequired

The person's id.

Query parameters

versionstring

The photo's version as last read; when it is no longer current, the photo is not found.

Response

200 The photo.

image/jpeg

304 The copy held is current.

Errors

400invalid_queryThe query is not in the form the route takes; the limit is in the unit of the input details.field names (characters for a text, entries for a list, the value for a number).
401session_revokedThe request carries no session the server holds, or its session has ended.
401session_expiredThe session has expired.
404asset_not_foundThe file the request names is not one the signed-in person can reach where the request names it, or is no longer available.
409session_changedThe session changed while the request was in flight.
rate_limitedMore requests of this kind were sent than Werk takes within the time it counts them over.
500server_errorThe server could not complete the request, and it is not known whether a write it holds was made.
curl
curl "https://api.getwerk.ai/api/v1/people/8a2e6c14-3f5d-4b9a-a7e2-61c0d9f4b3e8/photo?version=1" \
  -H "Authorization: Bearer wk_key_..."
TypeScript
const res = await fetch("https://api.getwerk.ai/api/v1/people/8a2e6c14-3f5d-4b9a-a7e2-61c0d9f4b3e8/photo?version=1", {
  headers: {
    Authorization: "Bearer wk_key_...",
  },
});
200