Users
Creates a new user and associates them with the authenticated partner. If a user with the provided email already exists but is not associated with the partner, the existing user will be associated with the partner instead of creating a new user.
User's twitter username (optional)
twitter_handle
User's blockchain wallet address (optional)
0x1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b
POST /v1/users HTTP/1.1
Host: api.reveel.id
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 124
{
"email": "[email protected]",
"twitterUsername": "twitter_handle",
"walletAddress": "0x1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b"
}
{
"success": true,
"data": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"email": "[email protected]",
"twitterUsername": "twitter_handle",
"walletAddress": "0x1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b",
"createdAt": "2023-01-15T12:00:00.000Z"
},
"meta": {}
}
Retrieves a specific user by their ID (user must be associated with the authenticated partner)
ID of the user to operate on
GET /v1/users/{id} HTTP/1.1
Host: api.reveel.id
Authorization: Bearer JWT
Accept: */*
{
"success": true,
"data": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"email": "[email protected]",
"twitterUsername": "twitter_handle",
"walletAddress": "0x1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b",
"createdAt": "2023-01-15T12:00:00.000Z",
"updatedAt": "2023-01-16T14:30:00.000Z",
"payId": {
"id": "123e4567-e89b-12d3-a456-426614174001",
"name": "johndoe"
}
},
"meta": {
"message": "User retrieved successfully"
}
}
Updates information for a specific user by their ID. The user must be associated with the authenticated partner. At least one field must be provided for update.
ID of the user to operate on
User's updated twitter username
new_twitter_handle
User's updated blockchain wallet address
0x1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b
PUT /v1/users/{id} HTTP/1.1
Host: api.reveel.id
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 131
{
"email": "[email protected]",
"twitterUsername": "new_twitter_handle",
"walletAddress": "0x1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b"
}
{
"success": true,
"data": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"email": "[email protected]",
"twitterUsername": "new_twitter_handle",
"walletAddress": "0x1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b",
"createdAt": "2023-01-15T12:00:00.000Z",
"updatedAt": "2023-01-16T14:30:00.000Z"
},
"meta": {
"message": "User updated successfully"
}
}
Removes the association between a user and the authenticated partner. This does not delete the user from the system, only removes the association.
ID of the user to operate on
DELETE /v1/users/{id} HTTP/1.1
Host: api.reveel.id
Authorization: Bearer JWT
Accept: */*
{
"success": true,
"meta": {
"message": "User disassociated from partner successfully"
}
}
Disconnects a wallet from a specific user by setting their walletAddress to null. The user must be associated with the authenticated partner and must have a wallet connected.
ID of the user to disconnect wallet from
POST /v1/users/{id}/disconnect-wallet HTTP/1.1
Host: api.reveel.id
Authorization: Bearer JWT
Accept: */*
{
"success": true,
"data": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"email": "[email protected]",
"twitterUsername": "twitter_handle",
"walletAddress": null,
"createdAt": "2023-01-15T12:00:00.000Z",
"updatedAt": "2023-01-16T14:30:00.000Z"
},
"meta": {
"message": "Wallet disconnected successfully"
}
}
Retrieves a specific user by their email address. The user must exist and be associated with the authenticated partner.
Email of the user to retrieve
GET /v1/users/email/{email} HTTP/1.1
Host: api.reveel.id
Authorization: Bearer JWT
Accept: */*
{
"success": true,
"data": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"email": "[email protected]",
"twitterUsername": "twitter_handle",
"walletAddress": "0x1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b",
"createdAt": "2023-01-15T12:00:00.000Z",
"updatedAt": "2023-01-16T14:30:00.000Z",
"payId": {
"id": "123e4567-e89b-12d3-a456-426614174001",
"name": "johndoe"
}
},
"meta": {
"message": "User retrieved successfully"
}
}
Last updated
Was this helpful?