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
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
The slug of the organization or user account.
Body
application/json
The user you want to invite to join Turso, and your organization. Provide exactly one of email or username.
The email of the user you want to invite. Exactly one of email or username must be provided.
The username of an existing Turso user you want to invite. Exactly one of email or username must be provided.
The role given to the user.
Available options:
admin, member, viewer Response
200 - application/json
Successful response
Show child attributes
Show child attributes
Was this page helpful?