Ledger Investing Triangles API

Upload, list, retrieve and delete insurance loss triangles.

Operations 4

GET /triangle List triangles #
POST /triangle Create a triangle #
GET /triangle/{id} Retrieve a triangle #
DELETE /triangle/{id} Delete a triangle #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/ledger-investing-triangles-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

ledger-investing-triangles-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Ledger Analytics Triangles API
  version: 0.0.30
  summary: Remote Bayesian actuarial compute over insurance loss triangles.
  description: 'The Ledger Analytics API provides remote compute access to Bayesian actuarial models

    for insurance loss triangles.'
  contact:
    name: Ledger Analytics
    email: analytics@ledgerinvesting.com
    url: https://ledger-investing-ledger-analytics.readthedocs-hosted.com/en/stable/index.html
  license:
    name: MIT
    url: https://github.com/LedgerInvesting/ledger-analytics/blob/main/LICENSE.txt
servers:
- url: https://api.korra.com/analytics
  description: Production
security:
- ApiKeyAuth: []
tags:
- name: Triangles
  description: Upload, list, retrieve and delete insurance loss triangles.
paths:
  /triangle:
    get:
      tags:
      - Triangles
      operationId: listTriangles
      summary: List triangles
      description: Returns a paginated list of loss triangles belonging to the authenticated account.
      parameters:
      - $ref: '#/components/parameters/Limit'
      responses:
        '200':
          description: Paginated list of triangles.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedTriangleList'
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/InternalServerError'
    post:
      tags:
      - Triangles
      operationId: createTriangle
      summary: Create a triangle
      description: 'Uploads a loss triangle. `triangle_data` is the Bermuda triangle dictionary

        representation (`bermuda.Triangle.to_dict()`). Set `overwrite` to replace an

        existing triangle of the same name — the upsert semantic used by the client''s

        `get_or_create` / `get_or_update` helpers.'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TriangleCreateRequest'
      responses:
        '201':
          description: Triangle created.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Triangle'
        '400':
          $ref: '#/components/responses/BadRequest'
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/InternalServerError'
  /triangle/{id}:
    parameters:
    - $ref: '#/components/parameters/ResourceId'
    get:
      tags:
      - Triangles
      operationId: getTriangle
      summary: Retrieve a triangle
      description: 'Retrieves a triangle by id. For large triangles the response carries a `url`

        field with a pre-signed download location instead of an inline `triangle_data`

        payload; the client follows that URL and streams the content.'
      responses:
        '200':
          description: The triangle.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Triangle'
        '404':
          $ref: '#/components/responses/NotFound'
        '403':
          $ref: '#/components/responses/Forbidden'
    delete:
      tags:
      - Triangles
      operationId: deleteTriangle
      summary: Delete a triangle
      responses:
        '204':
          description: Triangle deleted.
        '404':
          $ref: '#/components/responses/NotFound'
        '403':
          $ref: '#/components/responses/Forbidden'
components:
  parameters:
    Limit:
      name: limit
      in: query
      required: false
      description: Maximum number of results to return per page.
      schema:
        type: integer
        default: 25
        minimum: 1
    ResourceId:
      name: id
      in: path
      required: true
      description: Identifier of the resource.
      schema:
        type: string
  responses:
    NotFound:
      description: Not found — the endpoint or resource does not exist.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    BadRequest:
      description: Bad request — the payload was rejected.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    InternalServerError:
      description: Internal server error.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Forbidden:
      description: Forbidden — the API key does not have permission to perform this action.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  schemas:
    Triangle:
      type: object
      description: An insurance loss triangle resource.
      properties:
        id:
          type: string
          description: Triangle identifier.
        name:
          type: string
          description: Triangle name, unique per account.
        triangle_data:
          type: object
          description: Bermuda triangle dictionary representation.
          additionalProperties: true
        url:
          type:
          - string
          - 'null'
          format: uri
          description: Pre-signed download URL returned in place of inline data for large triangles.
    TriangleCreateRequest:
      type: object
      required:
      - triangle_name
      - triangle_data
      properties:
        triangle_name:
          type: string
          description: Name to store the triangle under.
        triangle_data:
          type: object
          description: Bermuda triangle dictionary representation (`bermuda.Triangle.to_dict()`).
          additionalProperties: true
        overwrite:
          type: boolean
          default: false
          description: Replace an existing triangle of the same name.
    Error:
      type: object
      description: 'Error envelope. The client surfaces the decoded JSON body verbatim in the raised

        HTTPError message; the exact field names are not documented by the provider.

        '
      additionalProperties: true
    PaginatedTriangleList:
      allOf:
      - $ref: '#/components/schemas/Pagination'
      - type: object
        properties:
          results:
            type: array
            items:
              $ref: '#/components/schemas/Triangle'
    Pagination:
      type: object
      properties:
        count:
          type: integer
          description: Total number of matching objects.
        next:
          type:
          - string
          - 'null'
          description: URL of the next page, when present.
        previous:
          type:
          - string
          - 'null'
          description: URL of the previous page, when present.
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: 'API key credential sent as `Authorization: Api-Key <API_KEY>`. Keys are requested by

        emailing analytics@ledgerinvesting.com during the beta and managed at https://ldgr.app/api-keys.

        The Python client reads the key from the `LEDGER_ANALYTICS_API_KEY` environment variable.

        '
externalDocs:
  description: LedgerAnalytics Python documentation
  url: https://ledger-investing-ledger-analytics.readthedocs-hosted.com/en/stable/index.html