Workspace Invites

https://api.xata.io/workspaces/workspace_id/invites

This endpoint enables working with invites for a given workspace.

Expected Parameters

NameDescriptionInRequiredSchema
workspace_idWorkspace IDpathstring

Invite a User to Join the Workspace

POST
https://api.xata.io/workspaces/workspace_id/invites

Invite some user to join the workspace with the given role

Request Body Type Definition

1
2
3
4
5
6
7
8
9
type InviteWorkspaceMember = {
    /*
     * @format email
     */
    email: string;
    role: Role;
};

type Role = "owner" | "maintainer";
Status CodeDescriptionExample Response/Type Definition
201Created
type InviteWorkspaceMember = {
    inviteId: InviteID;
    /*
     * @format email
     */
    email: string;
    /*
     * @format date-time
     */
    expires: string;
    role: Role;
};

/**
 * @pattern [a-zA-Z0-9]+
 */
type InviteID = string;

type Role = "owner" | "maintainer";
400Bad Request
type InviteWorkspaceMember = {
    id?: string;
    message: string;
};
401Authentication Error
{
  "message": "invalid API key"
}
403Authentication Error
{
  "message": "invalid API key"
}
404Example response
type InviteWorkspaceMember = {
    id?: string;
    message: string;
};
409Example response
type InviteWorkspaceMember = {
    id?: string;
    message: string;
};
5XXUnexpected Error