Retrieve All User Invites

Get All Invites

get
Authorizations
Query parameters
pageSizeintegerOptionalExample: 1
currentPageintegerOptionalExample: 0
rolestring · enumOptionalExample: adminPossible values:
emailstring · emailOptionalExample: [email protected]
statusstring · enumOptionalExample: pendingPossible values:
Responses
200

OK

application/json
get
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)
200

OK

{
  "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": ""
        }
      ]
    }
  ]
}

Last updated

Was this helpful?