Skip to main content
POST
/
v1beta
/
organizations
/
{organization_id}
/
invites
TypeScript
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": {
      "id": "user_01h2xcejqtf2nbrexx3vqjhp41",
      "name": "John Doe",
      "type": "user_account"
    },
    "status": "pending",
    "accepted_at": "2023-11-07T05:31:56Z",
    "accepted_by": {
      "id": "user_01h2xcejqtf2nbrexx3vqjhp41",
      "name": "John Doe",
      "type": "user_account"
    },
    "message": "<string>"
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer , where is your auth token.

Path Parameters

organization_id
string
required

Organization to invite the user to. Pattern: org_[0-9a-hjkmnp-tv-z]{26}

Pattern: ^org_[0-9a-hjkmnp-tv-z]{26}$

Body

application/json

CreateOrganizationInviteRequest contains the data needed to create an invitation.

email
string<email>
required

Email address of the recipient.

idempotency_key
string | null

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.

Maximum string length: 255
message
string | null

Optional custom message from the sender (max 2000 bytes to support ~500 multibyte characters).

Maximum string length: 2000

Response

Success

CreateOrganizationInviteResponse contains the created invitation.

invite
invite · object
required

The created (or existing) invitation.