Show examples in:
JavascriptHTTP
Endpoint info
Available examples
Content Management API > Invitation

Resend an invitation

Resends the email invitation. Invitation emails are capped per day for each project owner: the cap is shared by all the projects of the owner and by all the API tokens, and it counts both new and resent invitations. Past the cap the API answers 429 RATE_LIMIT_EXCEEDED, and the X-RateLimit-Reset header tells how many seconds are left before new invitations can be sent.

Returns

Returns a resource object of type site_invitation

Examples

import { buildClient } from "@datocms/cma-client-node";
async function run() {
const client = buildClient({ apiToken: process.env.DATOCMS_API_TOKEN });
const siteInvitationId = "312";
const siteInvitation = await client.siteInvitations.resend(siteInvitationId);
// Check the 'Returned output' tab for the result ☝️
console.log(siteInvitation);
}
run();
{
id: "312",
email: "mark.smith@example.com",
expired: "mark.smith@example.com",
role: { type: "role", id: "34" },
}