Choose your language:
    List all invitations
    Returns
    Returns an array of site_invitation objects.

    Examples

    Example code:
    const SiteClient = require('datocms-client').SiteClient;
    const client = new SiteClient('YOUR-API-TOKEN');
    client.siteInvitations.all()
    .then((siteInvitations) => {
    siteInvitations.forEach((siteInvitation) => {
    console.log(siteInvitation);
    });
    })
    .catch((error) => {
    console.error(error);
    });
    Returned output:
    > node example.js
    {
    "id": "312",
    "email": "mark.smith@example.com",
    "role": "34"
    }