GET
/
admin
/
users
/
invites
from portkey_ai import Portkey

# Initialize the Portkey client
portkey = Portkey(
    api_key="PORTKEY_API_KEY",
)

# List user invites
user_invites = portkey.admin.users.invites.list(
    email="[email protected]"
)

print(user_invites)
{
  "object": "list",
  "total": 2,
  "data": [
    {
      "object": "invite",
      "id": "419641fb-1458-47d6-94d0-e308159b3ec2",
      "email": "[email protected]",
      "role": "member",
      "created_at": "2023-12-12 13:56:32",
      "expires_at": "2023-12-12 13:56:32",
      "accepted_at": "2023-12-12 13:56:32",
      "status": "pending",
      "invited_by": "a90e74fb-269e-457b-8b59-9426cdd8907e",
      "workspaces": [
        {
          "workspace_id": "",
          "role": ""
        }
      ]
    }
  ]
}

Authorizations

x-portkey-api-key
string
header
required

Query Parameters

pageSize
integer
currentPage
integer
role
enum<string>
Available options:
admin,
member
email
string
status
enum<string>
Available options:
pending,
cancelled,
accepted,
expired

Response

200 - application/json
OK
object
enum<string>
Available options:
list
total
integer
data
object[]