Sorry, no results found for "".

Show examples in:
Javascript HTTP
Endpoint info
Available examples

Content Management API > Invitation

Update an invitation

Body parameters

role Optional

Role

Returns

Returns a resource object of type site_invitation

Examples

1
import { buildClient } from "@datocms/cma-client-node";
2
3
async function run() {
4
const client = buildClient({ apiToken: process.env.DATOCMS_API_TOKEN });
5
6
const siteInvitationId = "312";
7
8
const siteInvitation = await client.siteInvitations.update(siteInvitationId, {
9
id: "312",
10
});
11
12
// Check the 'Returned output' tab for the result ☝️
13
console.log(siteInvitation);
14
}
15
16
run();
1
{
2
id: "312",
3
email: "mark.smith@example.com",
4
expired: "mark.smith@example.com",
5
role: { type: "role", id: "34" },
6
}