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:
kindvalidkindenum
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.
kindinvalidexpiredrevokedkindenum
valid when the link works, invalid when it is unknown, expired or revoked when it no longer works.
Allowed valuesinvalidexpiredrevoked
Errors
400
invalid_query The 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).400
invalid_people_request The 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).413
payload_too_large The request body has more bytes than the route takes.429
rate_limited More requests of this kind were sent than Werk takes within the time it counts them over.500
server_error The 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"
}Send a requestPOST
It is sent with the key you give, as you. A change made here is real.
JSON
The request could not be sent, or its response could not be read.