get/v2/user

Retrieves information related to the currently authenticated User.

Optional params

fetch-request

1
await fetch("https://api.vercel.com/v2/user", {
2
"headers": {
3
"Authorization": "Bearer <TOKEN>"
4
},
5
"method": "get"
6
})

Successful response.

  • userRequiredOne of the following objects
  • One of
CodeDescription
200Successful response.
302
400
401
403You do not have permission to access this resource.
409
get/v3/events

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.

Optional params

fetch-request

1
await fetch("https://api.vercel.com/v3/events?limit=20&since=2019-12-08T10:00:38.976Z&slug=SOME_STRING_VALUE&teamId=SOME_STRING_VALUE&types=login,team-member-join,domain-buy&until=2019-12-09T23:00:38.976Z&userId=aeIInYVk59zbFF2SxfyxxmuO&withPayload=true", {
2
"headers": {
3
"Authorization": "Bearer <TOKEN>"
4
},
5
"method": "get"
6
})
Query Params
Query ParameterDescription

limit

number

Maximum number of items which may be returned.
Example:20

since

string

Timestamp to only include items created since then.
Example:2019-12-08T10:00:38.976Z

slug

string

The Team slug to perform the request on behalf of.

teamId

string

The Team identifier to perform the request on behalf of.

types

string

Comma-delimited list of event "types" to filter the results by.
Example:login,team-member-join,domain-buy

until

string

Timestamp to only include items created until then.
Example:2019-12-09T23:00:38.976Z

userId

string

When retrieving events for a Team, the userId parameter may be specified to filter events generated by a specific member of the Team.
Example:aeIInYVk59zbFF2SxfyxxmuO

withPayload

string

When set to true, the response will include the payload field for each event.
Example:true

Successful response.

  • eventsarrayRequired
    Array of events generated by the User.
CodeDescription
200Successful response.
400One of the provided values in the request query is invalid.
401
403You do not have permission to access this resource.
delete/v1/user

Initiates the deletion process for the currently authenticated User, by sending a deletion confirmation email. The email contains a link that the user needs to visit in order to proceed with the deletion process.

Optional params

fetch-request

1
await fetch("https://api.vercel.com/v1/user", {
2
"body": {
3
"reasons": [
4
{
5
"slug": "SOME_STRING_VALUE",
6
"description": "SOME_STRING_VALUE"
7
}
8
]
9
},
10
"headers": {
11
"Authorization": "Bearer <TOKEN>"
12
},
13
"method": "delete"
14
})
Body Params
Body ParameterDescription

reasons

array of object

Optional array of objects that describe the reason why the User account is being deleted.

description

string

required
Description of the reason why the User account is being deleted.

slug

string

required
Idenitifier slug of the reason why the User account is being deleted.
  • emailstringRequired
    Email address of the User who has initiated deletion.
  • idstringRequired
    Unique identifier of the User who has initiated deletion.
  • messagestringRequired
    User deletion progress status.

    Example: Verification email sent

CodeDescription
202Response indicating that the User deletion process has been initiated, and a confirmation email has been sent.
400One of the provided values in the request body is invalid.
401
402
403You do not have permission to access this resource.
Last updated on December 20, 2024