HENFOIL · Reference · Create view invite
Create view invite
Email a view-only link to one completed HENFOIL job/run — guest opens the product page read-only with UTC expiry.
Create a view-only collaborate invite for one completed job id. The product validates ownership, then the account service emails a link to https://henfoil.hendoi.com/shared/<token>. The raw token is never returned to the client — only invite metadata. Guests open the real product page read-only (no login). Expiry is ISO-8601 UTC. Rate limit: 20 invites / hour / user.
Work this page from top to bottom. Sample numbers show field names only.
How to use this documentation page
- Skim the intro so you know what the invite scopes to.
- Complete the walkthrough once with the dummy key, then again with your live key.
- Copy a language sample and keep JSON key names identical.
- On every response, read HTTP status first.
- Guests resolve the emailed link with Resolve view invite — no API key.
Before you call this API
- You have an active HENDOI account and a live HENFOIL API key (
hfk_…) or a browser session. - Send the completed job UUID as
resourceId(orjobId). Only COMPLETED / COMPLETED_WITH_WARNINGS jobs can be invited. expiresAtmust be a future UTC timestamp (e.g.2026-12-01T18:00:00.000Z).- You will treat every numeric sample on this page as a shape guide, not measured engineering data.
Request syntax
- Method.
POST. - URL.
https://henfoil.hendoi.com/api/v1/view-invites. - Header.
Authorization: Bearer hfk_demo_4c91e2ab8d07. Or send the raw key inX-Henfoil-Key. - Body. JSON below.
Step by step
- Sign in at https://hendoi.com/login, open Settings, then Generate API key for HENFOIL.
- Confirm the resource id belongs to your account and is completed.
- Send
POSTtohttps://henfoil.hendoi.com/api/v1/view-inviteswithresourceId,emailandexpiresAt. - Expect HTTP 200 with
invite.id/invite.expiresAt. The email carries the open link — do not expect a raw token in JSON. - On 429, wait — invite create is rate-limited (20/hour). On 400, fix expiry or missing fields.
Quick checklist
- □ Method and URL path are exact.
- □ Live HENFOIL key or session is attached.
- □
expiresAtis future UTC ISO-8601. - □ Client never expects a raw token field after create.
Example request
The key hfk_demo_4c91e2ab8d07 is a dummy. Replace it before you send.
POST https://henfoil.hendoi.com/api/v1/view-invites
Authorization: Bearer hfk_demo_4c91e2ab8d07
Content-Type: application/json
{
"resourceId": "8b1d0e44-1111-4222-8333-555566667777",
"email": "reviewer@example.com",
"expiresAt": "2026-12-01T18:00:00.000Z",
"title": "HENFOIL VIC polar"
}
If the request is accepted
{
"ok": true,
"invite": {
"id": "invite-demo-001",
"email": "reviewer@example.com",
"expiresAt": "2026-12-01T18:00:00Z",
"resourceId": "8b1d0e44-1111-4222-8333-555566667777"
}
}
If the request is not accepted
HTTP 401, missing or deactivated key:
{
"error": "This API key is deactivated or was not recognized. Only an active key can call the API."
}
HTTP 400, past expiry:
{
"error": "expiresAt must be a future UTC timestamp."
}
HTTP 429, invite budget:
{
"error": "Too many view invites this hour. Try again later."
}
Language samples
Replace the dummy key before you send. Keep JSON key names identical.
cURL
curl -s -X POST "https://henfoil.hendoi.com/api/v1/view-invites" \
-H "Authorization: Bearer hfk_demo_4c91e2ab8d07" \
-H "Content-Type: application/json" \
-d '{"resourceId": "8b1d0e44-1111-4222-8333-555566667777", "email": "reviewer@example.com", "expiresAt": "2026-12-01T18:00:00.000Z", "title": "HENFOIL VIC polar"}' \
-w "\n%{http_code}\n"
Node.js
const res = await fetch("https://henfoil.hendoi.com/api/v1/view-invites", {
method: "POST",
headers: {
Authorization: "Bearer hfk_demo_4c91e2ab8d07",
"Content-Type": "application/json"
},
body: JSON.stringify({
"resourceId": "8b1d0e44-1111-4222-8333-555566667777",
"email": "reviewer@example.com",
"expiresAt": "2026-12-01T18:00:00.000Z",
"title": "HENFOIL VIC polar"
})
});
const data = await res.json();
console.log(res.status, data);
Python
import json, requests
payload = {
"resourceId": "8b1d0e44-1111-4222-8333-555566667777",
"email": "reviewer@example.com",
"expiresAt": "2026-12-01T18:00:00.000Z",
"title": "HENFOIL VIC polar"
}
r = requests.post(
"https://henfoil.hendoi.com/api/v1/view-invites",
headers={"Authorization": "Bearer hfk_demo_4c91e2ab8d07", "Content-Type": "application/json"},
data=json.dumps(payload),
)
print(r.status_code, r.json())