POST
/
organization
/
teamspaces
/
{teamspace_id}
/
invites
Python
from datagrid_ai import Datagrid

client = Datagrid(
    api_key="My API Key",
)
teamspace_invite = client.organization.teamspaces.invites.create(
    teamspace_id="teamspace_id",
    email="dev@stainless.com",
)
print(teamspace_invite.id)
{
  "id": "<string>",
  "email": "jsmith@example.com",
  "permissions": {
    "role": "admin",
    "agent_ids": [
      "<string>"
    ]
  },
  "accepted_at": "2023-11-07T05:31:56Z",
  "status": "pending"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

teamspace_id
string
required

The ID of the teamspace

Body

application/json

Represents a user in a teamspace

Response

201 - application/json

User invited successfully

Represents a invite for a user in a teamspace