Platform Partner Subuser API
This documentation covers the APIs that enable Logfire platform partners to manage subuser accounts. These endpoints allow you to create and manage accounts for your customers who will access Logfire features through your platform.
Base URL
All API endpoints are relative to:
https://api.logfire.ai/api
Note: Replace
{profileId}
with your partner profile ID obtained during authentication.
Authentication
All requests require a valid bearer token in the Authorization header:
Authorization: Bearer <your_access_token>
API Endpoints
1. Create Subuser
Creates a new subuser account with associated team and source configurations.
POST /profile/{profileId}/sub-user
Request Body
{
"externalId": "unique_customer_id",
"userEmail": "customer@example.com",
"userName": "Customer Name",
"teamName": "Customer Team"
}
Response (202 Accepted)
{
"isSuccessful": true,
"subUser": {
"profileId": "uuid",
"accountId": "uuid",
"email": "customer@example.com",
"name": "Customer Name",
"externalId": "unique_customer_id",
"accountStatus": "active",
"maxLogSize": 2097152,
"maxStorage": 5368709120,
"logRetentionPeriod": 30,
"maxTeamMembers": 3,
"maxSources": 5,
"maxTeams": 1
}
}
2. Get Subuser Details
Retrieve details for a specific subuser account.
GET /profile/{profileId}/sub-user/{subUserId}
Response (202 Accepted)
{
"isSuccessful": true,
"subUser": {
// Same structure as create response
}
}
3. Update Subuser
Update an existing subuser’s profile information.
PUT /profile/{profileId}/sub-user/{subUserId}
Request Body
{
"firstName": "Updated Name",
"lastName": "Updated Name"
}
Response (202 Accepted)
{
"isSuccessful": true,
"subUser": {
// Updated user details
}
}
4. Delete Subuser
Remove a subuser account and associated resources.
DELETE /profile/{profileId}/sub-user/{subUserId}
Response (202 Accepted)
{
"isSuccessful": true,
"message": ["Subuser deleted successfully"],
"userBody": {
// subUser details
}
}
5. List All Subusers
Retrieve all subusers associated with your partner account.
GET /profile/{profileId}/sub-user
Response (202 Accepted)
{
"isSuccessful": true,
"users": [
{
// Subuser details
}
]
}
Error Handling
Common Error Responses
400 Bad Request
{
"isSuccessful": false,
"message": ["Invalid request parameters"]
}
403 Forbidden
{
"isSuccessful": false,
"message": ["Operation not allowed"]
}
Important Notes
Resource Limits
- Subuser accounts are created with predefined resource limits
- Limits include log size, storage, retention period, and team members
External ID Requirements
- External IDs must be unique within your partner account
- Used for mapping logs to specific subuser accounts
Team Management
- Each subuser gets their own team automatically
- Team names should be unique within your account
Event Publishing
- All account, team, and source changes trigger automatic events
- Events are published to Kafka for system synchronization