Skip to main content
DELETE
/
users
/
{id}
Delete User
curl --request DELETE \
  --url https://api.example.com/users/{id}
{
  "id": 123,
  "githubId": "<string>",
  "email": "<string>",
  "username": "<string>",
  "name": "<string>",
  "avatarUrl": "<string>",
  "githubAccessToken": "<string>",
  "githubRefreshToken": "<string>",
  "installationId": 123,
  "createdAt": "<string>",
  "updatedAt": "<string>"
}
Delete a user from the system.

Request

Path Parameters

id
string
required
The unique identifier of the user to delete

Headers

No authentication required.

Response

Returns the deleted user object.
id
integer
required
Unique identifier for the user
githubId
string
required
GitHub ID of the user
email
string
Email address of the user
username
string
GitHub username
name
string
Display name of the user
avatarUrl
string
URL to the user’s avatar image
githubAccessToken
string
required
GitHub OAuth access token
githubRefreshToken
string
required
GitHub OAuth refresh token
installationId
integer
GitHub App installation ID
createdAt
string
required
ISO 8601 timestamp of when the user was created
updatedAt
string
required
ISO 8601 timestamp of when the user was last updated

Example

cURL
curl -X DELETE https://api.diffy.com/users/1
Response
{
  "id": 1,
  "githubId": "12345678",
  "email": "[email protected]",
  "username": "johndoe",
  "name": "John Doe",
  "avatarUrl": "https://avatars.githubusercontent.com/u/12345678",
  "githubAccessToken": "gho_xxxxxxxxxxxxx",
  "githubRefreshToken": "ghr_xxxxxxxxxxxxx",
  "installationId": 98765,
  "createdAt": "2024-01-15T10:30:00Z",
  "updatedAt": "2024-01-20T14:22:00Z"
}

Build docs developers (and LLMs) love