API Endpoints
Complete reference for all available API endpoints in C15T Backend, including request/response formats, error handling, and rate limiting.
This document provides a comprehensive reference for all available API endpoints in the C15T Backend package.
Base URL
All endpoints are prefixed with /api/c15t/
by default. This can be customized using the basePath
option when creating a C15T instance.
Authentication
Most endpoints require authentication. Include the authentication token in the Authorization
header:
Endpoints
Status
Get the current status of the C15T instance.
Response
Consent Management
Create Consent
Create a new consent record.
Response
Get Consent
Retrieve a specific consent record.
Response
Update Consent
Update an existing consent record.
Response
List Consents
Retrieve a list of consent records with optional filtering.
Query Parameters
userId
: Filter by user IDpurpose
: Filter by purposestatus
: Filter by statuspage
: Page number (default: 1)limit
: Items per page (default: 20)
Response
User Management
Create User
Create a new user.
Response
Get User
Retrieve a specific user.
Response
Update User
Update an existing user.
Response
List Users
Retrieve a list of users with optional filtering.
Query Parameters
email
: Filter by emailrole
: Filter by rolepage
: Page number (default: 1)limit
: Items per page (default: 20)
Response
Audit Logs
Get Audit Logs
Retrieve audit logs with optional filtering.
Query Parameters
userId
: Filter by user IDaction
: Filter by action typeresource
: Filter by resource typestartDate
: Filter by start dateendDate
: Filter by end datepage
: Page number (default: 1)limit
: Items per page (default: 20)
Response
Error Responses
All endpoints may return the following error responses:
400 Bad Request
401 Unauthorized
403 Forbidden
404 Not Found
500 Internal Server Error
Rate Limiting
API requests are rate-limited by default. The following headers are included in responses:
Pagination
List endpoints support pagination using the following query parameters:
page
: Page number (default: 1)limit
: Items per page (default: 20)
Response includes pagination metadata:
Filtering
List endpoints support filtering using query parameters:
Sorting
List endpoints support sorting using the sort
query parameter:
Field Selection
Use the fields
query parameter to select specific fields: