-
Notifications
You must be signed in to change notification settings - Fork 51
Closed
Description
Problem
The SDK defines api_key.deleted as an event type (introduced in PR #1437), but the actual WorkOS API event name is api_key.revoked.
Passing api_key.deleted to listEvents() results in a 400 error:
GenericServerException: Invalid name parameter, received: 'api_key.deleted'. You must pass in valid event names
The WorkOS Events documentation lists the event as "API key revoked event" with the type api_key.revoked, not api_key.deleted.
Expected behaviour
The SDK should define the event type as api_key.revoked to match the actual API and documentation.
Affected files
src/common/interfaces/event.interface.ts—ApiKeyDeletedEvent/ApiKeyDeletedEventResponse(lines 681–689, 751–752, 814–815)src/common/serializers/event.serializer.ts— deserialisation case (lines 210–216)
Additional context
This is consistent with the naming convention used by other revocable resources in the SDK: invitation.revoked and session.revoked both use "revoked" rather than "deleted".
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels