Factify API is currently in Beta.
import { Factify } from "@factify/sdk";
const factify = new Factify({
bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await factify.organizations.invites.create({
organizationId: "<id>",
body: {
email: "Willie_Parisian16@hotmail.com",
},
});
console.log(result);
}
run();{
"invite": {
"created_at": "2023-11-07T05:31:56Z",
"email": "dwight@dundermifflin.com",
"expires_at": "2023-11-07T05:31:56Z",
"id": "inv_01h2xcejqtf2nbrexx3vqjhp41",
"organization_id": "org_01h2xcejqtf2nbrexx3vqjhp41",
"sender": {
"email": "jsmith@example.com",
"id": "user_01h2xcejqtf2nbrexx3vqjhp41",
"name": "<string>",
"family_name": "<string>",
"given_name": "<string>",
"profile_image_url": "<string>"
},
"status": "pending",
"accepted_at": "2023-11-07T05:31:56Z",
"accepted_by": {
"email": "jsmith@example.com",
"id": "user_01h2xcejqtf2nbrexx3vqjhp41",
"name": "<string>",
"family_name": "<string>",
"given_name": "<string>",
"profile_image_url": "<string>"
},
"message": "<string>"
}
}Creates an invitation and sends an email to the specified address. Returns FAILED_PRECONDITION if the email belongs to an existing organization member. Idempotency: If a PENDING invitation already exists for this email, the existing invitation is resent with a new token and refreshed expiration. Expired or revoked invitations are ignored - a new invitation is created.
import { Factify } from "@factify/sdk";
const factify = new Factify({
bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await factify.organizations.invites.create({
organizationId: "<id>",
body: {
email: "Willie_Parisian16@hotmail.com",
},
});
console.log(result);
}
run();{
"invite": {
"created_at": "2023-11-07T05:31:56Z",
"email": "dwight@dundermifflin.com",
"expires_at": "2023-11-07T05:31:56Z",
"id": "inv_01h2xcejqtf2nbrexx3vqjhp41",
"organization_id": "org_01h2xcejqtf2nbrexx3vqjhp41",
"sender": {
"email": "jsmith@example.com",
"id": "user_01h2xcejqtf2nbrexx3vqjhp41",
"name": "<string>",
"family_name": "<string>",
"given_name": "<string>",
"profile_image_url": "<string>"
},
"status": "pending",
"accepted_at": "2023-11-07T05:31:56Z",
"accepted_by": {
"email": "jsmith@example.com",
"id": "user_01h2xcejqtf2nbrexx3vqjhp41",
"name": "<string>",
"family_name": "<string>",
"given_name": "<string>",
"profile_image_url": "<string>"
},
"message": "<string>"
}
}Documentation Index
Fetch the complete documentation index at: https://developers.factify.com/llms.txt
Use this file to discover all available pages before exploring further.
Bearer authentication header of the form Bearer , where is your auth token.
Organization to invite the user to. Pattern: org_[0-9a-hjkmnp-tv-z]{26}
^org_[0-9a-hjkmnp-tv-z]{26}$CreateOrganizationInviteRequest contains the data needed to create an invitation.
Email address of the recipient.
Reserved for future use. Currently, idempotency is based on email matching: if a PENDING invitation exists for the same email in this organization, that invitation is resent rather than creating a duplicate.
255Optional custom message from the sender (max 2000 bytes to support ~500 multibyte characters).
2000Success
CreateOrganizationInviteResponse contains the created invitation.
The created (or existing) invitation.
Show child attributes