Resend Invite
curl --request POST \
--url https://api.sublay.io/v7/:projectId/workspaces/:id/invites/:inviteId/resend \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"actingUserId": "<string>"
}
'import requests
url = "https://api.sublay.io/v7/:projectId/workspaces/:id/invites/:inviteId/resend"
payload = { "actingUserId": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({actingUserId: '<string>'})
};
fetch('https://api.sublay.io/v7/:projectId/workspaces/:id/invites/:inviteId/resend', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.sublay.io/v7/:projectId/workspaces/:id/invites/:inviteId/resend",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'actingUserId' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.sublay.io/v7/:projectId/workspaces/:id/invites/:inviteId/resend"
payload := strings.NewReader("{\n \"actingUserId\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.sublay.io/v7/:projectId/workspaces/:id/invites/:inviteId/resend")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"actingUserId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sublay.io/v7/:projectId/workspaces/:id/invites/:inviteId/resend")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"actingUserId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_bodyWorkspace — Invitations
Resend Invite
Refresh a lapsed pending invitation and resend the email
Resend Invite
curl --request POST \
--url https://api.sublay.io/v7/:projectId/workspaces/:id/invites/:inviteId/resend \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"actingUserId": "<string>"
}
'import requests
url = "https://api.sublay.io/v7/:projectId/workspaces/:id/invites/:inviteId/resend"
payload = { "actingUserId": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({actingUserId: '<string>'})
};
fetch('https://api.sublay.io/v7/:projectId/workspaces/:id/invites/:inviteId/resend', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.sublay.io/v7/:projectId/workspaces/:id/invites/:inviteId/resend",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'actingUserId' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.sublay.io/v7/:projectId/workspaces/:id/invites/:inviteId/resend"
payload := strings.NewReader("{\n \"actingUserId\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.sublay.io/v7/:projectId/workspaces/:id/invites/:inviteId/resend")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"actingUserId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sublay.io/v7/:projectId/workspaces/:id/invites/:inviteId/resend")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"actingUserId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_bodyRefreshes a pending invitation — sets
Returned when no invitation with that id exists on this workspace — including when the id belongs to a different workspace’s invitation.
A project misconfiguration, not a bad request. The row is not touched —
The invitation is
Every path id on the workspaces bundle is checked for UUID shape before the route runs, so a malformed one is a plain
Every workspaces endpoint declares its fields exactly, and a top-level field it does not declare is refused rather than ignored — in the request body and in the query string alike, for every caller. Two or more at once are named together:
Returned when a service/master key sends a body with a
See also: useResendWorkspaceInvite · Project settings
expiresAt = now + 14 days and resends the email. Valid on any pending invite, including one past expiresAt (resend = refresh a lapsed invite). A terminal invite (accepted/declined/revoked) → 409. Requires the invite capability (or owner).
Resend emits no webhook — the status stays
pending, so there is no lifecycle transition.Requires
workspaces.inviteAcceptUrl on the project, exactly as Create Invite does — resending an email that has nowhere to deep-link is equally pointless. Without it this endpoint returns 409 workspace/missing-invite-accept-url and the invitation’s expiresAt is left untouched. See Project settings.Path Parameters
string
required
The workspace UUID.
string
required
The invitation UUID.
Body Parameters
string
Service/master keys only — the user to act as. Enforced: the
invite capability (or ownership) is required of the named user. Omit it to act as the app itself (unbounded). See Acting on behalf of a user.Response
Returns the refreshed WorkspaceInvitation object.Error Responses
Invite Not Found — 404
Invite Not Found — 404
{ "error": "Invitation not found.", "code": "workspace/invite-not-found" }
Missing Invite Accept URL — 409
Missing Invite Accept URL — 409
{ "error": "This project has no workspaces.inviteAcceptUrl configured...", "code": "workspace/missing-invite-accept-url" }
expiresAt is unchanged and no email is sent. Set workspaces.inviteAcceptUrl and retry.Terminal Invite — 409
Terminal Invite — 409
{ "error": "This invitation is no longer pending.", "code": "workspace/invite-terminal" }
accepted, declined, or revoked. Note an invitation merely past its expiresAt is not terminal — resending one is the documented purpose of this endpoint.Invalid Path Parameter — 400
Invalid Path Parameter — 400
{ "error": "Invalid workspace id: expected a UUID.", "code": "workspace/invalid-params" }
400 rather than a 500 from the database.Undeclared Field — 400
Undeclared Field — 400
{ "error": "Unrecognized key: \"onBehalfOf\"", "code": "workspace/invalid-body" }
Unrecognized keys: "onBehalfOf", "impersonate". An offender in the query string carries workspace/invalid-query instead. Send only the fields documented above, plus actingUserId and projectId, which every workspaces route accepts. See Shapes the server rejects.Unparsed Body — 400
Unparsed Body — 400
{
"error": "This request carries a body with content-type \"text/plain;charset=UTF-8\", which no parser reads, so any `actingUserId` inside it was discarded and this request names no acting user. Send the body as application/json.",
"code": "workspace/invalid-body"
}
Content-Type other than application/json and no actingUserId was read. Sublay parses only application/json, so the actor inside such a body is discarded and the request would fall through to the unbounded path. fetch() sends text/plain;charset=UTF-8 when you pass a stringified body and set no headers — set the header. An empty JSON body and a bodiless request both pass. See Shapes the server rejects.
