Choose your language:
    Delete an invitation
    Returns
    Returns a site_invitation object.

    Examples

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