List User Events
GET
https://api.vercel.com/v3/eventsRetrieves 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.https://api.vercel.com/v3/events
const response = await fetch('https://api.vercel.com/v3/events?limit=123&since=string&until=string&types=string&userId=string&principalId=string&projectIds=string&entityId=string&withPayload=string&teamId=string&slug=string', { method: 'GET', headers: { 'Authorization': 'Bearer YOUR_ACCESS_TOKEN', 'Content-Type': 'application/json', },});
const data = await response.json();console.log(data);Response
{ "events": [ { "categories": [], "createdAt": "1632859321020", "entities": [ { "end": "3", "start": "0", "type": "author" } ], "id": "uev_bfmMjiMnXfnPbT97dGdpJbCN", "payload": "value", "principal": { "avatar": "string", "email": "user@example.com", "slug": "string", "type": "user", "uid": "example_id", "username": "string" }, "principalId": "example_id", "requestId": "example_id", "sessionId": "example_id", "text": "You logged in via GitHub", "tokenId": "example_id", "type": "login", "user": { "avatar": "string", "email": "user@example.com", "slug": "string", "uid": "example_id", "username": "string" }, "userId": "zTuNVUXEAvvnNN3IaqinkyMw", "via": [ { "avatar": "string", "email": "user@example.com", "slug": "string", "type": "user", "uid": "example_id", "username": "string" } ], "viaIds": [] } ]}AuthorizationbearerToken
Default authentication mechanism
Deprecated. Use
principalId instead. If principalId and userId both exist, principalId will be used.When retrieving events for a Team, the
principalId parameter may be specified to filter events generated by a specific principal.Filters events to those associated with a specific entity (matched against
payload.id). For example, a connector ID.When set to
true, the response will include the payload field for each event.