Dashboard API > Organization invitation
Redeem token
Warning: Experimental API
Please note that the Dashboard API is an experimental, prerelease API. This API method is considered unstable, and should be avoided in production environments and automations. Changes may occur at any time without warning.
Accept invitation to organization
Query parameters
tokenstring
The organization invitation authorization token
Example:
"x2j2l3g4j5"
Returns
Returns a resource object of type organization
Examples
import { buildClient } from "@datocms/dashboard-client";
async function run() { const client = buildClient({ apiToken: process.env.DATOCMS_API_TOKEN });
const organizationInvitationId = "312";
const organizationInvitation = await client.organizationInvitations.redeem( organizationInvitationId, );
// Check the 'Returned output' tab for the result ☝️ console.log(organizationInvitation);}
run();{ id: "124", name: "", meta: { discount_on_public_plans: 20, agency_partner: null }, active_subscription: { type: "per_owner_pricing_subscription", id: "124" }, billing_profile: null,}