Api
OpenApi3 schema for this API. Format can be selected via content negotiation.
YAML: application/vnd.oai.openapi
JSON: application/vnd.oai.openapi+json
GET /api/schema/ HTTP/1.1
Host:
Authorization: Bearer JWT
Accept: */*
{
"ANY_ADDITIONAL_PROPERTY": "anything"
}
Handle POST requests to the Clerk webhook endpoint.
This method is called when Clerk sends a webhook event to this endpoint. It expects the request to contain a valid Svix signature in the headers. The expected headers are:
svix-id: The unique identifier for the webhook event.
svix-timestamp: The timestamp of the webhook event.
svix-signature: The signature to verify the authenticity of the webhook event. The request body should be a JSON payload containing the event data. The expected JSON structure is: { "type": "user.created" | "user.updated" | "user.deleted", "data": { "id": "<clerk_user_id>", ... } } If the signature is valid, the method processes the event and updates the local user database accordingly. It handles the following event types:
user.created: Syncs a new user with the Clerk user ID.
user.updated: Syncs an updated user with the Clerk user ID.
user.deleted: Marks a user as inactive in the local database based on the Clerk user ID. If the signature is invalid or the event type is not handled, it returns an error response. If the signature is valid and the event is processed successfully, it returns a success response. Args: request: The HTTP request object containing the webhook event data. *args: Additional positional arguments. **kwargs: Additional keyword arguments. Returns: JsonResponse: A JSON response indicating the success or failure of the webhook processing. Raises: HttpResponseBadRequest: If the SIGNING_SECRET is not configured or if required headers are missing. JsonResponse: If the request body is invalid or if the webhook verification fails. Raises: Exception: If there is an error processing the webhook event.
POST /api/v1/account/clerk_webhook/ HTTP/1.1
Host:
Authorization: Bearer JWT
Accept: */*
No response body
No content
Developer-only GET endpoint.
Args: request: The HTTP request object.
Returns: Response: Greeting message for the developer.
GET /api/v1/account/devtest/ HTTP/1.1
Host:
Authorization: Bearer JWT
Accept: */*
{
"org_id": "text",
"org_name": "text",
"org_role": "text",
"org_slug": "text",
"org_has_image": true,
"org_image_url": "https://example.com",
"org_public_metadata": null,
"org_private_metadata": null,
"org_unsafe_metadata": null,
"org_membership_permissions": null
}
Developer-only POST endpoint.
Args: request: The HTTP request object.
Returns: Response: Message indicating development-only access.
Serializer for UserOrganisation model data.
POST /api/v1/account/devtest/ HTTP/1.1
Host:
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 246
{
"org_id": "text",
"org_name": "text",
"org_role": "text",
"org_slug": "text",
"org_has_image": true,
"org_image_url": "https://example.com",
"org_public_metadata": null,
"org_private_metadata": null,
"org_unsafe_metadata": null,
"org_membership_permissions": null
}
{
"org_id": "text",
"org_name": "text",
"org_role": "text",
"org_slug": "text",
"org_has_image": true,
"org_image_url": "https://example.com",
"org_public_metadata": null,
"org_private_metadata": null,
"org_unsafe_metadata": null,
"org_membership_permissions": null
}
Developer-only PUT endpoint.
Args: request: The HTTP request object.
Returns: Response: Message indicating PUT support for developers.
Serializer for UserOrganisation model data.
PUT /api/v1/account/devtest/ HTTP/1.1
Host:
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 246
{
"org_id": "text",
"org_name": "text",
"org_role": "text",
"org_slug": "text",
"org_has_image": true,
"org_image_url": "https://example.com",
"org_public_metadata": null,
"org_private_metadata": null,
"org_unsafe_metadata": null,
"org_membership_permissions": null
}
{
"org_id": "text",
"org_name": "text",
"org_role": "text",
"org_slug": "text",
"org_has_image": true,
"org_image_url": "https://example.com",
"org_public_metadata": null,
"org_private_metadata": null,
"org_unsafe_metadata": null,
"org_membership_permissions": null
}
Developer-only DELETE endpoint.
Args: request: The HTTP request object.
Returns: Response: Message indicating DELETE support for developers.
DELETE /api/v1/account/devtest/ HTTP/1.1
Host:
Authorization: Bearer JWT
Accept: */*
No response body
No content
Retrieve the current user's basic information.
Args: request: The HTTP request object.
Returns: Response: Serialized User data for the authenticated user.
GET /api/v1/account/user/ HTTP/1.1
Host:
Authorization: Bearer JWT
Accept: */*
{
"username": "text",
"email": "[email protected]",
"first_name": "text",
"last_name": "text",
"last_login": "2025-06-26T04:40:06.855Z",
"unsafe_metadata": null,
"created_at": "2025-06-26T04:40:06.855Z",
"updated_at": "2025-06-26T04:40:06.855Z",
"last_sign_in_at": "2025-06-26T04:40:06.855Z",
"email_verified": true,
"phone_number_verified": true,
"two_factor_enabled": true,
"is_active": true,
"is_staff": true,
"is_superuser": true,
"is_developer": true,
"is_beta_tester": true,
"subscription_level": 0,
"session_actor": "text",
"roles": [
1
],
"aud": "http://localhost:3000"
}
Partially update the current user's basic information.
Args: request: The HTTP request object containing update data.
Returns: Response: Updated serialized User data or validation errors.
Serializer for User including the nested UserProfile.
Designates that this user has all permissions without explicitly assigning them.
0
- Free10
- Basic20
- Essential30
- Plus40
- Premium
POST /api/v1/account/user/ HTTP/1.1
Host:
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 396
{
"username": "text",
"first_name": "text",
"last_name": "text",
"last_login": "2025-06-26T04:40:06.855Z",
"unsafe_metadata": null,
"last_sign_in_at": "2025-06-26T04:40:06.855Z",
"email_verified": true,
"phone_number_verified": true,
"two_factor_enabled": true,
"is_active": true,
"is_staff": true,
"is_superuser": true,
"is_developer": true,
"is_beta_tester": true,
"subscription_level": 0,
"session_actor": "text",
"roles": [
1
]
}
{
"username": "text",
"email": "[email protected]",
"first_name": "text",
"last_name": "text",
"last_login": "2025-06-26T04:40:06.855Z",
"unsafe_metadata": null,
"created_at": "2025-06-26T04:40:06.855Z",
"updated_at": "2025-06-26T04:40:06.855Z",
"last_sign_in_at": "2025-06-26T04:40:06.855Z",
"email_verified": true,
"phone_number_verified": true,
"two_factor_enabled": true,
"is_active": true,
"is_staff": true,
"is_superuser": true,
"is_developer": true,
"is_beta_tester": true,
"subscription_level": 0,
"session_actor": "text",
"roles": [
1
],
"aud": "http://localhost:3000"
}
Retrieve the current user's extended information.
Args: request: The HTTP request object.
Returns: Response: Serialized UserExt data for the authenticated user.
GET /api/v1/account/userextension/ HTTP/1.1
Host:
Authorization: Bearer JWT
Accept: */*
{
"address": "text",
"city": "text",
"state": "text",
"country": "text",
"zip_code": "text",
"birth_date": "2025-06-26"
}
Partially update the current user's extended information.
Args: request: The HTTP request object containing update data.
Returns: Response: Updated serialized UserExt data or validation errors.
Serializer for UserExt model data.
POST /api/v1/account/userextension/ HTTP/1.1
Host:
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 108
{
"address": "text",
"city": "text",
"state": "text",
"country": "text",
"zip_code": "text",
"birth_date": "2025-06-26"
}
{
"address": "text",
"city": "text",
"state": "text",
"country": "text",
"zip_code": "text",
"birth_date": "2025-06-26"
}
Retrieve the current user's organisation information.
Args: request: The HTTP request object.
Returns: Response: Serialized organisation data for the authenticated user.
GET /api/v1/account/userorganisation/ HTTP/1.1
Host:
Authorization: Bearer JWT
Accept: */*
{
"org_id": "text",
"org_name": "text",
"org_role": "text",
"org_slug": "text",
"org_has_image": true,
"org_image_url": "https://example.com",
"org_public_metadata": null,
"org_private_metadata": null,
"org_unsafe_metadata": null,
"org_membership_permissions": null
}
Partially update the current user's organisation information.
Args: request: The HTTP request object containing update data.
Returns: Response: Updated serialized organisation data or validation errors.
Serializer for UserOrganisation model data.
POST /api/v1/account/userorganisation/ HTTP/1.1
Host:
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 246
{
"org_id": "text",
"org_name": "text",
"org_role": "text",
"org_slug": "text",
"org_has_image": true,
"org_image_url": "https://example.com",
"org_public_metadata": null,
"org_private_metadata": null,
"org_unsafe_metadata": null,
"org_membership_permissions": null
}
{
"org_id": "text",
"org_name": "text",
"org_role": "text",
"org_slug": "text",
"org_has_image": true,
"org_image_url": "https://example.com",
"org_public_metadata": null,
"org_private_metadata": null,
"org_unsafe_metadata": null,
"org_membership_permissions": null
}
Retrieve the current user's profile data.
Args: request: The HTTP request object.
Returns: Response: Serialized UserProfile data for the authenticated user.
GET /api/v1/account/userprofile/ HTTP/1.1
Host:
Authorization: Bearer JWT
Accept: */*
{
"timezone": "text",
"language": "text",
"bio": "text",
"aboutme": "text",
"facebook": "https://example.com",
"twitter": "https://example.com",
"linkedin": "https://example.com",
"github": "https://example.com",
"website": "https://example.com",
"interests": "text",
"onboarding_tasks": null
}
Partially update the current user's profile data.
Args: request: The HTTP request object containing update data.
Returns: Response: Updated serialized UserProfile data or validation errors.
Serializer for UserProfile model data.
POST /api/v1/account/userprofile/ HTTP/1.1
Host:
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 271
{
"timezone": "text",
"language": "text",
"bio": "text",
"aboutme": "text",
"facebook": "https://example.com",
"twitter": "https://example.com",
"linkedin": "https://example.com",
"github": "https://example.com",
"website": "https://example.com",
"interests": "text",
"onboarding_tasks": null
}
{
"timezone": "text",
"language": "text",
"bio": "text",
"aboutme": "text",
"facebook": "https://example.com",
"twitter": "https://example.com",
"linkedin": "https://example.com",
"github": "https://example.com",
"website": "https://example.com",
"interests": "text",
"onboarding_tasks": null
}
Retrieve the current user's subscription data.
Args: request: The HTTP request object.
Returns: Response: Serialized UserSubscription data or empty dict if not found.
GET /api/v1/account/usersubscription/ HTTP/1.1
Host:
Authorization: Bearer JWT
Accept: */*
{
"subscription_id": "text",
"subscription_name": "text",
"subscription_level": 0,
"subscription_status": "active",
"subscription_start_date": "2025-06-26T04:40:06.855Z",
"subscription_end_date": "2025-06-26T04:40:06.855Z",
"subscription_trial_end_date": "2025-06-26T04:40:06.855Z",
"subscription_cancelled_date": "2025-06-26T04:40:06.855Z",
"subscription_suspended_date": "2025-06-26T04:40:06.855Z",
"subscription_metadata": null
}
Partially update the current user's subscription data.
Args: request: The HTTP request object containing update data.
Returns: Response: Updated serialized UserSubscription data or validation errors.
Serializer for User subscription data.
0
- Free10
- Basic20
- Essential30
- Plus40
- Premium
active
- Activeinactive
- Inactivecancelled
- Cancelledsuspended
- Suspended
POST /api/v1/account/usersubscription/ HTTP/1.1
Host:
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 411
{
"subscription_id": "text",
"subscription_name": "text",
"subscription_level": 0,
"subscription_status": "active",
"subscription_start_date": "2025-06-26T04:40:06.855Z",
"subscription_end_date": "2025-06-26T04:40:06.855Z",
"subscription_trial_end_date": "2025-06-26T04:40:06.855Z",
"subscription_cancelled_date": "2025-06-26T04:40:06.855Z",
"subscription_suspended_date": "2025-06-26T04:40:06.855Z",
"subscription_metadata": null
}
{
"subscription_id": "text",
"subscription_name": "text",
"subscription_level": 0,
"subscription_status": "active",
"subscription_start_date": "2025-06-26T04:40:06.855Z",
"subscription_end_date": "2025-06-26T04:40:06.855Z",
"subscription_trial_end_date": "2025-06-26T04:40:06.855Z",
"subscription_cancelled_date": "2025-06-26T04:40:06.855Z",
"subscription_suspended_date": "2025-06-26T04:40:06.855Z",
"subscription_metadata": null
}
List all TradeHistory entries.
GET /api/v1/ibkr/tradehistory/ HTTP/1.1
Host:
Authorization: Bearer JWT
Accept: */*
[
{
"id": 1,
"created_at": "2025-06-26T04:40:06.855Z",
"update_at": "2025-06-26T04:40:06.855Z",
"version": 1,
"symbol": "text",
"side": "text",
"type": "text",
"qty": 1,
"trade_price": 1,
"close_price": 1,
"open_time": "2025-06-26T04:40:06.855Z",
"close_time": "2025-06-26T04:40:06.855Z",
"duration": "text",
"commission_fee": 1,
"order_id": "text",
"trade_id": "text",
"client_account_id": "text",
"account_alias": "text",
"user": "123e4567-e89b-12d3-a456-426614174000"
}
]
List all TradeHistory entries.
GET /api/v1/ibkr/trades/ HTTP/1.1
Host:
Authorization: Bearer JWT
Accept: */*
[
{
"id": 1,
"created_at": "2025-06-26T04:40:06.855Z",
"update_at": "2025-06-26T04:40:06.855Z",
"version": 1,
"symbol": "text",
"side": "text",
"type": "text",
"qty": 1,
"trade_price": 1,
"close_price": 1,
"open_time": "2025-06-26T04:40:06.855Z",
"close_time": "2025-06-26T04:40:06.855Z",
"duration": "text",
"commission_fee": 1,
"order_id": "text",
"trade_id": "text",
"client_account_id": "text",
"account_alias": "text",
"user": "123e4567-e89b-12d3-a456-426614174000"
}
]
List method for ServerListViewSet class.
GET /api/v1/server/select/ HTTP/1.1
Host:
Authorization: Bearer JWT
Accept: */*
No response body
No content