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.
Input Parameters
Section titled “Input Parameters”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.
| Field | Type | Required | Description |
|---|---|---|---|
eventId | String! | Yes | ID of the event |
userId | String | One of three | Underlying User ID. Mutually exclusive with attendeeId and email. |
attendeeId | String | One of three | Enrollment ID (AdminEventAttendee.id). Mutually exclusive with userId and email. |
email | String | One of three | Student email; resolved school-scoped. Mutually exclusive with userId and attendeeId. |
Return Type
Section titled “Return Type”type AdminRemoveAttendeeFromEventPayload { success: Boolean! message: String # populated when the user had no active enrollment}Behavior
Section titled “Behavior”- User has an active enrollment: the
Enrollmentrow is destroyed. Returnssuccess: true, message: null. - User has no enrollment: idempotent no-op. Returns
success: true, message: "User is not enrolled in this event". emaildoes 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.
Example
Section titled “Example”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 }}Common Errors
Section titled “Common Errors”| Code | Description |
|---|---|
EVENT-001 | Event not found |
EVENT-009 | None of userId, attendeeId, or email was provided |
EVENT-010 | More than one of userId, attendeeId, email was provided — exactly one is required |
OAuth Scope
Section titled “OAuth Scope”Requires students:write.
Related Resources
Section titled “Related Resources”For more information about the Teachify Admin API, please refer to the API Overview.