curl -L -X POST https://api.turso.tech/v2/organizations/{organizationSlug}/invites \
-H 'Authorization: Bearer TOKEN' \
-H 'Content-Type: application/json' \
-d '{"email": "user@example.com", "role": "member"}'
curl -L -X POST https://api.turso.tech/v2/organizations/{organizationSlug}/invites \
-H 'Authorization: Bearer TOKEN' \
-H 'Content-Type: application/json' \
-d '{"username": "turso-user", "role": "member"}'
import { createClient } from "@tursodatabase/api";
const turso = createClient({
org: "mycompany",
token: "",
});
const invite = await turso.organizations.inviteUser(
"user@example.com",
"member"
);
{
"invited": {
"email": "iku@turso.tech",
"role": "member",
"organization": "mycompany"
}
}Invites
Create Invite
Invite a user to an organization. If the user isn’t already registered with Turso, they will receive a signup link. If an existing pending invite exists for the same email, it will be replaced.
POST
/
v2
/
organizations
/
{organizationSlug}
/
invites
curl -L -X POST https://api.turso.tech/v2/organizations/{organizationSlug}/invites \
-H 'Authorization: Bearer TOKEN' \
-H 'Content-Type: application/json' \
-d '{"email": "user@example.com", "role": "member"}'
curl -L -X POST https://api.turso.tech/v2/organizations/{organizationSlug}/invites \
-H 'Authorization: Bearer TOKEN' \
-H 'Content-Type: application/json' \
-d '{"username": "turso-user", "role": "member"}'
import { createClient } from "@tursodatabase/api";
const turso = createClient({
org: "mycompany",
token: "",
});
const invite = await turso.organizations.inviteUser(
"user@example.com",
"member"
);
{
"invited": {
"email": "iku@turso.tech",
"role": "member",
"organization": "mycompany"
}
}Invites are limited to scaler plan and above.
You can invite by email or by username — provide exactly one. When inviting by username, the invite is sent to that user’s registered email.
You must be an
owner or admin to invite other users. You can only invite users to a team and not your personal account.If a pending invite already exists for the same email, it will be replaced with a new one.
curl -L -X POST https://api.turso.tech/v2/organizations/{organizationSlug}/invites \
-H 'Authorization: Bearer TOKEN' \
-H 'Content-Type: application/json' \
-d '{"email": "user@example.com", "role": "member"}'
curl -L -X POST https://api.turso.tech/v2/organizations/{organizationSlug}/invites \
-H 'Authorization: Bearer TOKEN' \
-H 'Content-Type: application/json' \
-d '{"username": "turso-user", "role": "member"}'
import { createClient } from "@tursodatabase/api";
const turso = createClient({
org: "mycompany",
token: "",
});
const invite = await turso.organizations.inviteUser(
"user@example.com",
"member"
);
Authorizations
Body
application/json
The user you want to invite to join Turso, and your organization. Provide exactly one of email or username.
Was this page helpful?