Skip to main content
POST
/
v1beta
/
organizations
/
{organization_id}
/
members
TypeScript
import { Factify } from "@factify/sdk";

const factify = new Factify({
  bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});

async function run() {
  const result = await factify.members.addOrganizationMember({
    organizationId: "<id>",
    body: {
      role: "member",
      userId: "<id>",
    },
  });

  console.log(result);
}

run();
{
  "member": {
    "joined_at": "2023-11-07T05:31:56Z",
    "role": "owner",
    "user": {
      "email": "jsmith@example.com",
      "id": "user_01h2xcejqtf2nbrexx3vqjhp41",
      "name": "<string>",
      "family_name": "<string>",
      "given_name": "<string>",
      "profile_image_url": "<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 add the member to. Pattern: org_[0-9a-hjkmnp-tv-z]{26}

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

Body

application/json

AddOrganizationMemberRequest identifies a user to add as a member.

role
enum<string>
required

Role for the new member. Cannot be UNSPECIFIED or OWNER.

Available options:
owner,
admin,
member
user_id
string
required

User account ID of the member to add. Pattern: user_[0-9a-hjkmnp-tv-z]{26}

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

Response

Success

AddOrganizationMemberResponse contains the added member.

member
member · object
required

The newly added organization member.