Invite a user to a resource
Creates an invite and emails the invitee. Requires the right to grant `role` (and every `additionalRoles` entry) on the resource — `canCreateInviteToResource`; otherwise 403. If the invitee already has an account the `inviteCreate` notification is also pushed to their user channel.
Creates an invite and emails the invitee. Requires the right to grant role (and every additionalRoles entry) on the resource — canCreateInviteToResource; otherwise 403. If the invitee already has an account the inviteCreate notification is also pushed to their user channel.
Authorization
bearerAuth In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/invites" \ -H "Content-Type: application/json" \ -d '{ "inviteeEmail": "new.member@example.com", "resourceType": "project", "resourceId": "0192b3c4-5d6e-7f80-9a1b-2c3d4e5f6a7b", "role": "creator" }'{ "id": "0192a3b4-5c6d-7e8f-9a0b-1c2d3e4f5a6b", "inviterId": "5bc254e2-253a-4bfc-86e9-cbe19cbf4427", "inviteeEmail": "bernice_koss@hotmail.com", "inviteeId": "6694aecb-0165-405a-8de1-2cdd9ccbaf79", "resourceId": "026d60bb-63a8-407e-bf67-01dcfc6022e6", "resourceType": "workspace", "role": "workspaceAdmin", "additionalRoles": [ "workspaceChatMember" ], "expires": "2023-12-15T12:12:34.784Z", "status": "active", "createdAt": 1704461497862, "updatedAt": 1704461497862, "resource": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string", "slug": "string", "description": "string", "logo": "3c06f846-1ab1-40a9-8645-a19a9fdeae85", "icon": "bc9b3dc5-578a-4929-a13c-7d1a9725e2b0", "color": "string", "settings": {}, "roles": [ "string" ], "status": "active", "createdAt": 1678886400000, "updatedAt": 1678886400000 }, "inviter": "3e5080e8-b7a9-460f-9c66-5a47b4c17d78", "invitee": "ab92699c-315b-4010-b1d2-37c34441e8ae"}