Add directory people/teams
Prerequisites
1) Add people
import "dotenv/config";
import GospaceAI from "@gospace-ai/api";
async function main() {
const gospace = new GospaceAI(process.env.GOSPACE_API_KEY!);
const res = await gospace.directory.createPeople({
people: [
{ email: "[email protected]", first_name: "Alice", last_name: "Smith" },
{ email: "[email protected]", first_name: "Bob", last_name: "Nguyen" }
],
});
console.log(JSON.stringify(res.data.people, null, 2));
}
main().catch((err) => {
console.error("Create people failed:", err);
process.exit(1);
});2) Add teams
3) Map people to teams (add team members)
Last updated
Was this helpful?