Skip to main content

events

Creates, updates, deletes, gets or lists an events resource.

Overview​

Nameevents
TypeResource
Idvercel.user.events

Fields​

The following fields are returned by SELECT queries:

Successful response.

NameDatatypeDescription
idstringThe unique identifier of the Event. (example: uev_bfmMjiMnXfnPbT97dGdpJbCN)
principal_idstringThe ID of the principal who generated the event. The principal is typically a user, but it could also be an app, an integration, etc. The principal may have delegated its authority to an acting party, and so {@link viaIds} should be checked as well. (wire: principalId)
request_idstring (wire: requestId)
session_idstringThe ID of the session that the principal's token belongs to, when it belongs to one. (wire: sessionId)
token_idstringThe public ID of the token that the principal authenticated with, when the request behind this event carried one. (wire: tokenId)
user_idstringWhen the principal who generated the event is a user, this is their ID; otherwise, it is empty. (example: zTuNVUXEAvvnNN3IaqinkyMw) (wire: userId)
categoriesarrayThe categories that group this event with related event types. An event can belong to multiple categories (e.g. a firewall event is both Firewall and Security). The first entry is the "primary" category. Use the /events/types endpoint to discover the full list of categories.
created_atnumberTimestamp (in milliseconds) of when the event was generated. (wire: createdAt)
entitiesarrayA list of "entities" within the event text. Useful for enhancing the displayed text with additional styling and links.
payloadstringThe payload of the event, if requested. (opaque JSON object)
principalobjectMetadata for {@link principalId}.
textstringThe human-readable text of the Event. (example: You logged in via GitHub)
typestringThe type of the event. (access-group-created, access-group-deleted, access-group-project-updated, access-group-updated, access-group-user-added, access-group-user-removed, admin-agentic-provisioning-account-unlinked, admin-plan-updated, admin-secondary-email-added, admin-secondary-email-removed, admin-team-name-update, admin-team-slug-update, admin-user-delete, admin-user-primary-email-updated, admin-username-updated, agentic-provisioning-account-blocked, agentic-provisioning-account-linked, agentic-provisioning-account-relinked, agentic-provisioning-account-unlinked, agentic-provisioning-credentials-rotated, agentic-provisioning-plan-changed, agentic-provisioning-team-created, ai-alert-investigation, ai-code-review, ai-gateway-api-key-created, ai-gateway-api-key-deleted, ai-gateway-api-key-quota-updated, ai-gateway-auto-reload-updated, ai-gateway-budget-default-updated, ai-gateway-byok-credential-created, ai-gateway-byok-credential-deleted, ai-gateway-byok-credential-updated, ai-gateway-byok-model-mappings-updated, ai-gateway-credits-purchased, ai-gateway-guardrails-updated, ai-gateway-hipaa-compliance-toggled, ai-gateway-inference-regions-updated, ai-gateway-model-allowlist-models-updated, ai-gateway-model-allowlist-toggled, ai-gateway-private-model-created, ai-gateway-private-model-deleted, ai-gateway-private-model-updated, ai-gateway-private-provider-created, ai-gateway-private-provider-deleted, ai-gateway-private-provider-updated, ai-gateway-prompt-training-opt-out-toggled, ai-gateway-provider-allowlist-providers-updated, ai-gateway-provider-allowlist-toggled, ai-gateway-rule-created, ai-gateway-rule-deleted, ai-gateway-rule-updated, ai-gateway-scope-budget-updated, ai-gateway-transcripts-default-disabled, ai-gateway-transcripts-default-enabled, ai-gateway-transcripts-disabled, ai-gateway-transcripts-enabled, ai-gateway-transcripts-retention-updated, ai-gateway-virtual-model-config-archived, ai-gateway-virtual-model-config-created, ai-gateway-virtual-model-config-deleted, ai-gateway-virtual-model-config-restored, ai-gateway-virtual-model-config-updated, ai-gateway-zero-data-retention-toggled, ai-omniagent, alert-investigation-project-allowlist-updated, alert-rule-created, alert-rule-deleted, alert-rule-updated, alias, alias-chown, alias-delete, alias-invite-created, alias-invite-joined, alias-invite-revoked, alias-protection-bypass-created, alias-protection-bypass-exception, alias-protection-bypass-regenerated, alias-protection-bypass-revoked, alias-system, alias-user-scoped-access-denied, alias-user-scoped-access-granted, alias-user-scoped-access-requested, alias-user-scoped-access-revoked, aliases-assigned, attack-mode-disabled, attack-mode-enabled, audit-log-export-downloaded, audit-log-export-requested, authorize-git-deployment, auto-expose-system-envs, avatar, billing-settings-updated, bulk-redirects-settings-updated, bulk-redirects-version-promoted, bulk-redirects-version-restored, cert, cert-autorenew, cert-chown, cert-clone, cert-delete, cert-renew, cert-replace, cert-system-create, code-owners-config-updated, compliance-document-downloaded, compliance-document-previewed, compliance-documents-bulk-downloaded, concurrent-builds-update, connect-attach-project, connect-bitbucket, connect-bitbucket-app, connect-configuration-created, connect-configuration-deleted, connect-configuration-link-updated, connect-configuration-linked, connect-configuration-unlinked, connect-configuration-updated, connect-create-connector, connect-delete-connector, connect-delete-installation, connect-detach-project, connect-github, connect-github-custom-host, connect-github-limited, connect-gitlab, connect-gitlab-app, connect-import-tokens, connect-revoke-all-tokens, connect-update-connector, connect-update-trigger-destinations, connect-upsert-installation, custom-alert-created, custom-alert-deleted, custom-alert-updated, custom-environments-settings-updated, custom-metric-metadata-deleted, custom-metric-metadata-updated, custom-suffix-clear, custom-suffix-disable, custom-suffix-enable, custom-suffix-pending, custom-suffix-ready, deploy-hook-created, deploy-hook-deduped, deploy-hook-deleted, deploy-hook-processed, deployment, deployment-check-created, deployment-check-deleted, deployment-check-updated, deployment-chown, deployment-creation-blocked, deployment-delete, deployment-policy-blocked, deployment-undeleted, disabled-integration-installation-removed, disconnect-bitbucket-app, disconnect-github, disconnect-github-custom-host, disconnect-github-limited, disconnect-gitlab-app, dns-add, dns-delete, dns-record-internal, dns-update, dns-zonefile-import, domain, domain-buy, domain-cdn, domain-chown, domain-custom-ns-change, domain-delegated, domain-delete, domain-ech-change, domain-move-in, domain-move-out, domain-move-out-request-sent, domain-renew-change, domain-service-type-updated, domain-transfer-in, domain-transfer-in-canceled, domain-transfer-in-completed, domain-zone-change, domain-zone-change-internal, drain-created, drain-deleted, drain-disabled, drain-enabled, drain-updated, edge-cache-dangerously-delete-by-src-images, edge-cache-dangerously-delete-by-tags, edge-cache-dangerously-delete-immutable-static, edge-cache-invalidate-by-src-images, edge-cache-invalidate-by-tags, edge-cache-purge-all, edge-cache-rollback-purge, edge-config-backup-restored, edge-config-created, edge-config-deleted, edge-config-items-updated, edge-config-schema-deleted, edge-config-schema-updated, edge-config-token-created, edge-config-token-deleted, edge-config-transfer-in, edge-config-transfer-out, edge-config-updated, email, email-notification-rule-removed, email-notification-rule-updated, emu-member-removed-unverified-domain, enforce-disjunctive-production-secrets, enforce-sensitive-environment-variables, env-variable-add, env-variable-delete, env-variable-edit, env-variable-masked, env-variable-read, env-variable-read:cli:dev, env-variable-read:cli:env:add, env-variable-read:cli:env:ls, env-variable-read:cli:env:pull, env-variable-read:cli:env:rm, env-variable-read:cli:pull, env-variable-read:unknown-source, env-variable-read:v0:env:pull, env-variable-rotated, experiment-created, experiment-deleted, experiment-transitioned, experiment-updated, firewall-bypass-created, firewall-bypass-deleted, firewall-config-modified, firewall-config-promoted, firewall-config-removed, firewall-managed-rulegroup-updated, firewall-managed-ruleset-updated, flag, flag-archived, flag-created, flag-deleted, flag-unarchived, flag-updated, flags-explorer-subscription, flags-sdk-key, flags-sdk-key-added, flags-sdk-key-deleted, flags-sdk-key-read, flags-segment, flags-settings, flags-transferred, flat-rate-cdn-auto-upgrade-consent, git-integration-repo-push, git_account_integration_link_added, global-config-backup-restored, global-config-created, global-config-deleted, global-config-items-updated, global-config-schema-deleted, global-config-schema-updated, global-config-token-created, global-config-token-deleted, global-config-transfer-in, global-config-transfer-out, global-config-updated, instant-rollback-created, integration-configuration-credential-revoked, integration-configuration-credential-rotated, integration-configuration-owner-changed, integration-configuration-scope-change-confirmed, integration-configuration-transfer-in-success, integration-configuration-transfer-out-success, integration-configurations-disabled, integration-installation-billing-plan-updated, integration-installation-completed, integration-installation-permission-updated, integration-installation-removed, integration-resource-redis-command-executed, integration-resource-sql-query-executed, integration-scope-changed, invoice-modified, invoice-refunded, kms-issuer-created, kms-issuer-deleted, kms-issuer-key-activated, kms-issuer-key-created, kms-issuer-key-revoked, kms-issuer-key-rotated, kms-issuer-policy-created, kms-issuer-policy-deleted, kms-issuer-policy-updated, kms-issuer-updated, log-drain-created, log-drain-deleted, log-drain-disabled, log-drain-enabled, login, login-connection-linked, login-connection-unlinked, manual-deployment-promotion-created, marketplace-flex-commit-opt-in, marketplace-integration-allowlist-updated, microfrontend-group-added, microfrontend-group-deleted, microfrontend-group-updated, microfrontend-project-added-to-group, microfrontend-project-removed-from-group, microfrontend-project-updated, monitoring-alert-updated, monitoring-disabled, monitoring-enabled, oauth-app-connection-created, oauth-app-connection-removed, oauth-app-connection-updated, oauth-app-created, oauth-app-deleted, oauth-app-secret-deleted, oauth-app-secret-generated, oauth-app-token-created, oauth-app-updated, observability-disabled, observability-enabled, observability-plus-project-disabled, observability-plus-project-enabled, oidc-policy-created, oidc-policy-deleted, oidc-policy-updated, oidc-policy-used-to-obtain-app-token, organization-create, organization-delete, organization-dsync-group-delete, organization-dsync-group-upsert, organization-slug-update, organization-team-add, organization-team-create, organization-team-delete, organization-team-sso-update, owner-blocked, owner-soft-blocked, owner-soft-unblocked, owner-unblocked, page-integrity-config-updated, page-integrity-header-approved, page-integrity-header-rejected, page-integrity-inventory-cleared, page-integrity-resource-approved, page-integrity-resource-deleted, page-integrity-resource-rejected, page-integrity-script-approval-rule-created, page-integrity-script-approval-rule-deleted, passkey-created, passkey-deleted, passkey-updated, passport-access-granted, password-protection-disabled, password-protection-enabled, payment-method-added, payment-method-default-updated, payment-method-removed, plan, preview-deployment-suffix-disabled, preview-deployment-suffix-enabled, preview-deployment-suffix-update, privatelink-endpoint-created, privatelink-endpoint-deleted, privatelink-endpoint-updated, production-branch-updated, project-add-alias, project-add-redirect, project-affected-projects-deployments-updated, project-alias-configured-change, project-analytics-disabled, project-analytics-enabled, project-auto-assign-custom-production-domains-updated, project-automation-bypass, project-avatar-update, project-build-command-updated, project-build-logs-and-source-protection-updated, project-build-machine-updated, project-card-widget-preference-updated, project-client-cert-delete, project-client-cert-upload, project-connect-configurations, project-consolidated-git-commit-status-updated, project-created, project-cron-jobs-toggled, project-custom-environment-created, project-custom-environment-deleted, project-custom-environment-updated, project-customer-success-code-visibility-updated, project-delete, project-deployment-policy-updated, project-deployment-retention-updated, project-directory-listing, project-domain-deleted, project-domain-moved, project-domain-unverified, project-domain-updated, project-domain-verified, project-elastic-concurrency-updated, project-expiration-locked, project-expiration-reached, project-expiration-scheduled, project-expiration-unlocked, project-external-rewrite-caching-updated, project-framework-updated, project-function-cpu-memory, project-function-failover, project-function-max-duration, project-function-regions, project-functions-beta-updated, project-functions-fluid-disabled, project-functions-fluid-enabled, project-git-commit-comments-toggled, project-git-commit-status-toggled, project-git-create-deployments-toggled, project-git-credential-bound-created, project-git-credential-bound-deleted, project-git-credential-bound-updated, project-git-credential-grant-created, project-git-credential-grant-deleted, project-git-credential-grant-updated, project-git-fork-protection-updated, project-git-lfs-toggled, project-git-pr-comments-toggled, project-git-repository-connected, project-git-repository-disconnected, project-git-repository-dispatch-events-toggled, project-git-require-verified-commits-toggled, project-ignored-build-step-updated, project-install-command-updated, project-member-added, project-member-invited, project-member-removed, project-member-removed-batch, project-member-updated, project-move-in-success, project-move-out-failed, project-move-out-started, project-move-out-success, project-name, project-node-version-updated, project-oidc-issuer-mode-updated, project-oidc-token-created, project-options-allowlist, project-output-directory-updated, project-passport-updated, project-password-protection, project-paused, project-preview-deployment-suffix, project-preview-environment-branch-tracking-updated, project-prioritize-production-builds-updated, project-program-enrollment-changed, project-protected-sourcemaps-updated, project-rollback-description-updated, project-rolling-release-aborted, project-rolling-release-approved, project-rolling-release-completed, project-rolling-release-configured, project-rolling-release-continued, project-rolling-release-disabled, project-rolling-release-enabled, project-rolling-release-paused, project-rolling-release-started, project-rolling-release-suggested-actions-generated, project-rolling-release-timer, project-root-directory-updated, project-routes-version-promoted, project-routes-version-restored, project-sandbox-config-updated, project-sandbox-url-protection-updated, project-skew-protection-allowed-domains-updated, project-skew-protection-max-age-updated, project-skew-protection-threshold-updated, project-source-files-outside-root-directory-updated, project-speed-insights-disabled, project-speed-insights-enabled, project-speed-insights-free-data-started, project-sso-protection, project-static-ips-updated, project-trusted-ips, project-trusted-sources, project-unpaused, project-web-analytics-disabled, project-web-analytics-enabled, protected-git-scope-added, protected-git-scope-removed, runtime-cache-purge-all, saml-connection-created, saml-connection-deleted, sandbox-alias-assigned, sandbox-alias-delete, sandbox-drive-created, sandbox-drive-deleted, sandbox-snapshot-regions-updated, scale, scale-auto, secondary-email-added, secondary-email-removed, secondary-email-verified, secret-add, secret-delete, secret-rename, security-list-created, security-list-deleted, security-list-updated, security-plus-updated, set-bio, set-name, set-profiles, set-scale, shared-env-variable-create, shared-env-variable-delete, shared-env-variable-read, shared-env-variable-repo-link, shared-env-variable-repo-unlink, shared-env-variable-update, show-ip-addresses, signup, signup-via-bitbucket, signup-via-github, signup-via-gitlab, speed-insights-settings-updated, spend-created, spend-deleted, spend-updated, sso-login, storage-accept-tos, storage-access-token-set, storage-accessed-data-browser, storage-connect-project, storage-create, storage-delete, storage-disconnect-project, storage-disconnect-projects, storage-inactive-store-deleted, storage-reset-credentials, storage-resource-repl-command, storage-set-locked, storage-transfer-in-success, storage-transfer-out-success, storage-transfer-request-created, storage-update, storage-update-project-connection, storage-upgrade-project-connection-to-oidc, storage-view-secret, strict-connectors, strict-deployment-protection-settings, strict-password-protection-settings, strict-shareable-links, subscription-created, subscription-product-added, subscription-product-removed, subscription-updated, support-session-created, team, team-agent-billing-migration-decision-changed, team-avatar-update, team-collaboration-settings-updated, team-default-build-machine-updated, team-default-passport-updated, team-delete, team-deployment-policy-updated, team-domain-verification-created, team-domain-verification-deleted, team-domain-verification-verified, team-email-domain-update, team-emu-updated, team-ended-trial, team-firewall-config-modified, team-firewall-config-promoted, team-git-repository-dispatch-events-toggled, team-git-require-verified-commits-toggled, team-invite-bulk-delete, team-invite-code-reset, team-invite-link-created, team-invite-link-deleted, team-ip-blocking-rules-created, team-ip-blocking-rules-removed, team-member-add, team-member-confirm-request, team-member-decline-request, team-member-delete, team-member-entitlement-added, team-member-entitlement-canceled, team-member-entitlement-reactivated, team-member-entitlement-removed, team-member-join, team-member-leave, team-member-request-access, team-member-role-update, team-member-sso-authorization-attempt, team-mfa-enforcement-updated, team-name-update, team-paid-invoice, team-program-enrollment-changed, team-remote-caching-purge, team-remote-caching-update, team-saml-enforced, team-saml-roles, team-slug-update, team-tokens-invalidated, tracing-configured, tracing-disabled, tracing-paused, tracing-resumed, unlink-login-connection, update-account-flow-dismissed, update-account-flow-triggered, user-auto-block-configured, user-blocked, user-delete, user-delete-requested, user-emu-account-archived, user-emu-account-deleted, user-emu-account-recovered, user-emu-account-update-opted-in, user-emu-account-update-opted-out, user-emu-recovery-email-sent, user-emu-recovery-initiated, user-emu-toggled, user-mfa-challenge-failed, user-mfa-challenge-initiated, user-mfa-challenge-verified, user-mfa-change-failed, user-mfa-configuration-updated, user-mfa-recovery-code-used, user-mfa-recovery-codes-regenerated, user-mfa-removed, user-mfa-setup-skipped, user-mfa-totp-verification-started, user-mfa-totp-verified, user-phone-removed, user-phone-updated, user-primary-email-updated, user-provider-email-claim-evaluated, user-sudo-mode-removed, user-token-created, user-token-deleted, user-tokens-deleted, user-unblocked, username, v0-chat-ai-usage, v0-chat-created, v0-chat-message-sent, vcr-image-deleted, vcr-image-pushed, vcr-repository-created, vcr-repository-deleted, vcr-repository-permission-added, vcr-repository-permission-removed, vcr-repository-permissions-cleared, vcr-repository-visibility-changed, vercel-agent-elevated-permissions-approved, vercel-agent-elevated-permissions-requested, vercel-agent-session-created, vercel-agent-team-trial-credits-applied, vercel-app-installation-request-dismissed, vercel-app-installation-requested, vercel-app-installation-updated, vercel-app-installed, vercel-app-tokens-revoked, vercel-app-uninstalled, vercel-toolbar, vpc-peering-connection-accepted, vpc-peering-connection-deleted, vpc-peering-connection-rejected, vpc-peering-connection-updated, vulnerability-banner-dismissed, web-analytics-tier-updated, webhook-created, webhook-deleted, webhook-updated, workflow-deployment-key-accessed) (example: login)
userobjectMetadata for {@link userId}.
viaarrayMetadata for {@link viaIds}.
via_idsarrayIf the principal delegated its authority (for example, a user delegating to an app), then this array contains the ID of the current actor. For example, if principalId is "user123" and viaIds is ["app456"], we can say the event was triggered by - "app456 on behalf of user123", or - "user123 via app4556". Both are equivalent. Arbitrarily long chains of delegation can be represented. For example, if principalId is "user123" and viaIds is ["service1", "service2"], we can say the event was triggered by "user123 via service1 via service2". (wire: viaIds)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
listselectlimit, since, until, types, user_id, principal_id, project_ids, entity_id, with_payload, team_id, slugRetrieves a list of "events" generated by the User on Vercel. Events are generated when the User performs a particular action, such as logging in, creating a deployment, and joining a Team (just to name a few). When the teamId parameter is supplied, then the events that are returned will be in relation to the Team that was specified.

Parameters​

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
entity_idstringFilters events to those associated with a specific entity (matched against payload.id). For example, a connector ID. (wire: entityId)
limitnumberMaximum number of items which may be returned.
principal_idstringWhen retrieving events for a Team, the principalId parameter may be specified to filter events generated by a specific principal. (wire: principalId)
project_idsstringComma-delimited list of project IDs to filter the results by. (wire: projectIds)
sincestringTimestamp to only include items created since then.
slugstringThe Team slug to perform the request on behalf of.
team_idstringThe Team identifier to perform the request on behalf of. (wire: teamId)
typesstringComma-delimited list of event "types" to filter the results by.
untilstringTimestamp to only include items created until then.
user_idstringDeprecated. Use principalId instead. If principalId and userId both exist, principalId will be used. (wire: userId)
with_payloadstringWhen set to true, the response will include the payload field for each event. (wire: withPayload)

SELECT examples​

Retrieves a list of "events" generated by the User on Vercel. Events are generated when the User performs a particular action, such as logging in, creating a deployment, and joining a Team (just to name a few). When the teamId parameter is supplied, then the events that are returned will be in relation to the Team that was specified.

SELECT
id,
principal_id,
request_id,
session_id,
token_id,
user_id,
categories,
created_at,
entities,
payload,
principal,
text,
type,
user,
via,
via_ids
FROM vercel.user.events
WHERE limit = '{{ limit }}'
AND since = '{{ since }}'
AND until = '{{ until }}'
AND types = '{{ types }}'
AND user_id = '{{ user_id }}'
AND principal_id = '{{ principal_id }}'
AND project_ids = '{{ project_ids }}'
AND entity_id = '{{ entity_id }}'
AND with_payload = '{{ with_payload }}'
AND team_id = '{{ team_id }}'
AND slug = '{{ slug }}'
;