Create invitation

createProjectInvitation(projectReference: ID!, input: CreateProjectInvitationInput!): ProjectInvitationResult!

Requires project.invites.manage.

Arguments

ArgumentTypeRequiredDescription
projectReferenceID!YesProject UUID or slug.
inputCreateProjectInvitationInput!Yes

Input fields

input

CreateProjectInvitationInput

FieldTypeRequiredDescription
emailString!YesEmail address to invite; stored in lowercase.
roleProjectInvitationRole!Yes

Response

Returns ProjectInvitationResult!. Open the type for its fields and nested types.

FieldTypeDescription
outcomeProjectInvitationOutcome!
invitationProjectInvitationThe pending invitation; null when outcome is member_added.
userIdIDThe added user; set only when outcome is member_added.
emailSentBoolean!Whether the email service accepted the notification send; false is a result, not an error.

Types marked with ! cannot be null. Lists use [Type] notation. The type index lists all published input and response types.

Example

graphql
mutation CreateProjectInvitation($projectReference: ID!, $input: CreateProjectInvitationInput!) {
  createProjectInvitation(projectReference: $projectReference, input: $input) {
    emailSent
    outcome
    userId
  }
}
json
{
  "projectReference": "00000000-0000-4000-8000-000000000001",
  "input": {
    "email": "[email protected]",
    "role": "admin"
  }
}