Partner Authentication

Before accessing the Subuser APIs, platform partners must authenticate and obtain an access token. This token is required for all subsequent API calls.

Authentication Endpoint

To obtain an access token, partners should make a POST request to:

POST https://api.logfire.ai/api/auth/signin

Request Headers

Content-Type: application/json

Request Body

{
    "email": "partner@example.com",
    "credential": "your_password",
    "authType": 2
}

Response Body

{
    "isSuccessful": true,
    "code": 2,
    "email": "partner@example.com",
    "userBody": {
        "firstName": "John",
        "lastName": "Doe",
        "customCss": null,
        "logRetentionPeriod": 30,
        "maxLogSize": 2097152,
        "maxStorage": 5368709120,
        "maxTeams": 3,
        "maxTeamMembers": 3,
        "maxSources": 5,
        "accountType": "partner",
        "platformPartner": true,
        "profileId": "<uuid>",
        "accountId": "<uuid>",
        "onboarded": true,
        "email": "partner@example.com",
        "accessApproved": true,
        "accountStatus": true
    },
    "teamBody": {
        "id": "<uuid>",
        "name": "Team Name",
        "accountId": "<uuid>",
        "role": "owner",
        "created_at": "2024-01-01T00:00:00Z",
        "updated_at": "2024-01-01T00:00:00Z",
        "deleted_at": null
    },
    "bearerToken": {
        "accessToken": "<jwt_access_token>",
        "refreshToken": "<jwt_refresh_token>",
        "exp": "2024-01-02T00:00:00Z",
        "iat": "2024-01-01T00:00:00Z"
    }
}

Response Fields

Top Level

  • isSuccessful: Boolean indicating authentication success
  • code: Response code
  • email: Authenticated user’s email

User Body

  • Account limits and configuration:
    • logRetentionPeriod: Days logs are retained
    • maxLogSize: Maximum size of individual log entry in bytes
    • maxStorage: Total storage limit in bytes
    • maxTeams: Maximum number of teams allowed
    • maxTeamMembers: Maximum members per team
    • maxSources: Maximum log sources allowed
  • Account details:
    • accountType: Type of account
    • platformPartner: Boolean indicating partner status
    • profileId: Unique identifier for user profile
    • accountId: Unique identifier for account

Team Body

  • Basic team information for the authenticated user
  • Includes team ID, name, and role information

Bearer Token

  • accessToken: JWT token for API authentication
  • refreshToken: Token for refreshing access token
  • exp: Token expiration timestamp
  • iat: Token issued at timestamp

Using the Access Token

For all subsequent API calls, include the access token in the Authorization header:

Authorization: Bearer <access_token>

Error Responses

Status CodeDescription
401Invalid credentials
403Account not found or inactive
429Too many requests

Rate Limiting

  • Authentication requests are limited to 10 requests per minute
  • Exceeding this limit will result in a 429 response