from openlayer import Openlayer
client = Openlayer()
client.workspaces.invites.create(
workspace_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
emails=["[email protected]", "[email protected]"],
role="ADMIN"
)
{
"items": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"dateCreated": "2023-11-07T05:31:56Z",
"creator": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"username": "user123",
"name": "Rishab Ramanathan"
},
"status": "accepted",
"workspace": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "Openlayer",
"slug": "openlayer",
"dateCreated": "2023-11-07T05:31:56Z",
"memberCount": 1
},
"email": "[email protected]",
"role": "ADMIN"
}
]
}Invite users to a workspace.
from openlayer import Openlayer
client = Openlayer()
client.workspaces.invites.create(
workspace_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
emails=["[email protected]", "[email protected]"],
role="ADMIN"
)
{
"items": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"dateCreated": "2023-11-07T05:31:56Z",
"creator": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"username": "user123",
"name": "Rishab Ramanathan"
},
"status": "accepted",
"workspace": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "Openlayer",
"slug": "openlayer",
"dateCreated": "2023-11-07T05:31:56Z",
"memberCount": 1
},
"email": "[email protected]",
"role": "ADMIN"
}
]
}Bearer authentication header of the form Bearer <token>, where <token> is your workspace API key. See Find your API key for more information.
The workspace id.
Status OK.
Show child attributes
The invite id.
The invite creation date.
The invite status.
accepted, pending Show child attributes
20"Openlayer"
20"openlayer"
x >= 0The invite role.
ADMIN, MEMBER, VIEWER Was this page helpful?