User API Documentation
The Epycbyte API provides several endpoints to manage user-related operations. Below is a detailed guide on how to use these endpoints effectively.
Overview
The User API allows you to perform various actions such as retrieving user information, listing events associated with a user, and deleting a user account. Each endpoint is designed to handle specific tasks and requires proper authentication using Bearer tokens.
1. Get the User (GET /v2/user)
Description: Retrieve detailed information about the currently authenticated user.
Method: GET
URL: /v2/user
Parameters:
- None
Example:
curl -X GET "https://api.epycbyte.com/v2/user" \
-H "Authorization: Bearer YOUR_TOKEN"
2. List User Events (GET /v3/events)
Description: Retrieve a list of events associated with the user.
Method: GET
URL: /v3/events
Parameters:
userId: (Required) Unique identifier of the user.page: (Optional) Page number for pagination.pageSize: (Optional) Number of items per page.
Example:
curl -X GET "https://api.epycbyte.com/v3/events" \
-H "Authorization: Bearer YOUR_TOKEN" \
--data-urlencode "userId=123" \
--data-urlencode "page=1" \
--data-urlencode "pageSize=10"
3. Delete User Account (DELETE /v1/user)
Description: Initiate the deletion process for the user's account.
Method: DELETE
URL: /v1/user
Parameters:
reasons: Array of objects, each containingsluganddescription.
Example:
curl -X DELETE "https://api.epycbyte.com/v1/user" \
-H "Authorization: Bearer YOUR_TOKEN" \
--data-urlencode "reasons=[{ \"slug\": \"delete-account\", \"description\": \"User account deletion request\" }]"
4. Response Formats
Event Response Format:
{
"events": [
{
"id": "123",
"type": "user.created",
"timestamp": "2024-01-01T12:00:00Z"
}
]
}
User Deletion Response Format:
{
"email": "user@example.com",
"id": "123",
"message": "Verification email sent"
}
Note: All endpoints require proper authentication. Parameters marked as optional are not required unless specified.
For more details, refer to the official Epycbyte API documentation or contact support if you need further assistance.