Skip to content

Remove Attendee from Event

The removeAttendeeFromEvent mutation removes a user’s enrollment from an event. The enrollment row is destroyed (matching removeStudentFromCourse semantics).

Refunds are NOT issued automatically. If the underlying Payment was a real paid purchase (not a manual enroll), use the payment domain’s refund flow separately. This mutation only mutates enrollment state.

Identify the attendee by exactly one of userId, attendeeId, or email. attendeeId is the cheapest path when you already hold the Enrollment row from a prior query (no extra lookup); email is the cheapest path when the integrator only has the customer’s email on hand.

FieldTypeRequiredDescription
eventIdString!YesID of the event
userIdStringOne of threeUnderlying User ID. Mutually exclusive with attendeeId and email.
attendeeIdStringOne of threeEnrollment ID (AdminEventAttendee.id). Mutually exclusive with userId and email.
emailStringOne of threeStudent email; resolved school-scoped. Mutually exclusive with userId and attendeeId.
type AdminRemoveAttendeeFromEventPayload {
success: Boolean!
message: String # populated when the user had no active enrollment
}
  • User has an active enrollment: the Enrollment row is destroyed. Returns success: true, message: null.
  • User has no enrollment: idempotent no-op. Returns success: true, message: "User is not enrolled in this event".
  • email does not match any school-scoped student: idempotent no-op (same as “no enrollment”). The mutation does NOT create a student via the email path — it only resolves to an existing student.

By userId:

mutation RemoveAttendee {
removeAttendeeFromEvent(
eventId: "evt_01HQ..."
userId: "usr_01ABC..."
) {
success
message
}
}

By attendeeId (when iterating a previously-fetched attendee list):

mutation RemoveAttendee {
removeAttendeeFromEvent(
eventId: "evt_01HQ..."
attendeeId: "enr_01DEF..."
) {
success
message
}
}

By email (when the integrator only has the customer’s email):

mutation RemoveAttendee {
removeAttendeeFromEvent(
eventId: "evt_01HQ..."
email: "attendee@example.com"
) {
success
message
}
}
CodeDescription
EVENT-001Event not found
EVENT-009None of userId, attendeeId, or email was provided
EVENT-010More than one of userId, attendeeId, email was provided — exactly one is required

Requires students:write.

For more information about the Teachify Admin API, please refer to the API Overview.