DevelopersHow to connect an assistantKeys
Reference/People/Read

Read an invitation link

POSThttps://api.getwerk.ai/api/v1/project-invitation-links/resolve

What an invitation link leads to: the project's name, or why it no longer works.

It needs no key and changes nothing. A link that is unknown, expired or revoked answers its kind, not a refusal.

Body

urlstringRequired

An invitation link, as shared.

Response

200 What the link leads to.

One of 2 shapes, told apart by kind:

kindvalid
kindenum

valid when the link works, invalid when it is unknown, expired or revoked when it no longer works.

Allowed valuesvalid
projectNamestring

The project's name, for a valid link.

kindinvalidexpiredrevoked
kindenum

valid when the link works, invalid when it is unknown, expired or revoked when it no longer works.

Allowed valuesinvalidexpiredrevoked

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).
400invalid_people_requestThe people request 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).
413payload_too_largeThe request body has more bytes than the route takes.
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 -X POST "https://api.getwerk.ai/api/v1/project-invitation-links/resolve" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://getwerk.ai/join/hs7Kq2mP9xRt4LwBvN3cJ8yZa5Qe1Ud6Gh0Fk2Ts9Xp"
  }'
TypeScript
const res = await fetch("https://api.getwerk.ai/api/v1/project-invitation-links/resolve", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "url": "https://getwerk.ai/join/hs7Kq2mP9xRt4LwBvN3cJ8yZa5Qe1Ud6Gh0Fk2Ts9Xp"
  }),
});
const answer = await res.json();
200JSON
{
  "kind": "valid",
  "projectName": "Harbor Street kitchen"
}