Skip to Content
Admin

List credit transactions

GEThttps://api.respan.ai/api/credit-transactions/list/

Servers

https://api.respan.ai: Respan API Server

Authentication

RespanApiKey

Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.

HTTP scheme: bearer; format: Respan API key.

HTTP
Authorization: Bearer $RESPAN_API_KEY

Or:

DashboardJwt

Use a dashboard JWT only for dashboard-authenticated endpoints. Respan API-key endpoints use the respanApiKey auth field instead.

HTTP scheme: bearer; format: Dashboard JWT.

HTTP
Authorization: Bearer $RESPAN_DASHBOARD_JWT

Query parameters

Parameter Type Required Description and constraints
page integer Optional
Page number for pagination.
Default: 1
page_size integer Optional
Number of items per page. Maximum is 1000.
Default: 100

Responses

200

Paginated list of transactions.

application/json

Field Type Requirement Description and constraints
$ object Body
-
count integer Required in parent
Number of results on this page, not the total. Request pages until next is null to get every result.
next string or null Optional
-
previous string or null Optional
-
results array<object> Required in parent
-
results[] object Array item
-
results[].id string Required in parent
-
results[].amount number Required in parent
-
results[].transaction_type string Required in parent
-
results[].created_at string Required in parent
Format: date-time
results[].description string Required in parent
-
current_filters object Optional
Additional properties are allowed
filters_data object Optional
Additional properties are allowed

OpenAPI response schema

{
  "type": "object",
  "properties": {
    "count": {
      "type": "integer",
      "description": "Number of results on this page, not the total. Request pages until `next` is null to get every result."
    },
    "next": {
      "type": "string",
      "nullable": true
    },
    "previous": {
      "type": "string",
      "nullable": true
    },
    "results": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "id",
          "amount",
          "transaction_type",
          "created_at",
          "description"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "amount": {
            "type": "number"
          },
          "transaction_type": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "description": {
            "type": "string"
          }
        }
      }
    },
    "current_filters": {
      "type": "object",
      "additionalProperties": true
    },
    "filters_data": {
      "type": "object",
      "additionalProperties": true
    }
  },
  "required": [
    "count",
    "results"
  ]
}

403

The API key is missing, invalid or expired.

application/json

Field Type Requirement Description and constraints
$ object Body
-
detail string Required in parent
-

OpenAPI response schema

{
  "type": "object",
  "required": [
    "detail"
  ],
  "properties": {
    "detail": {
      "type": "string"
    }
  }
}
Example
JSON
{ "detail": "Your API key is invalid or expired, please check your API key in the platform settings." }

OpenAPI source

The operation and referenced components below retain the complete OpenAPI definitions, including constraints and examples.

OpenAPI operation

{
  "summary": "List credit transactions",
  "operationId": "listCreditTransactions",
  "tags": [
    "Credit Transactions"
  ],
  "parameters": [
    {
      "name": "page",
      "in": "query",
      "schema": {
        "type": "integer",
        "default": 1
      },
      "description": "Page number for pagination."
    },
    {
      "name": "page_size",
      "in": "query",
      "schema": {
        "type": "integer",
        "default": 100
      },
      "description": "Number of items per page. Maximum is 1000."
    }
  ],
  "responses": {
    "200": {
      "description": "Paginated list of transactions.",
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "count": {
                "type": "integer",
                "description": "Number of results on this page, not the total. Request pages until `next` is null to get every result."
              },
              "next": {
                "type": "string",
                "nullable": true
              },
              "previous": {
                "type": "string",
                "nullable": true
              },
              "results": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "id",
                    "amount",
                    "transaction_type",
                    "created_at",
                    "description"
                  ],
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "amount": {
                      "type": "number"
                    },
                    "transaction_type": {
                      "type": "string"
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "description": {
                      "type": "string"
                    }
                  }
                }
              },
              "current_filters": {
                "type": "object",
                "additionalProperties": true
              },
              "filters_data": {
                "type": "object",
                "additionalProperties": true
              }
            },
            "required": [
              "count",
              "results"
            ]
          }
        }
      }
    },
    "403": {
      "$ref": "#/components/responses/InvalidApiKey"
    }
  },
  "x-fern-pagination": {
    "offset": "$request.page",
    "results": "$response.results"
  },
  "security": [
    {
      "RespanApiKey": []
    },
    {
      "DashboardJwt": []
    }
  ]
}

OpenAPI path metadata

{}

Referenced OpenAPI components

{
  "responses": {
    "InvalidApiKey": {
      "description": "The API key is missing, invalid or expired.",
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "required": [
              "detail"
            ],
            "properties": {
              "detail": {
                "type": "string"
              }
            }
          },
          "example": {
            "detail": "Your API key is invalid or expired, please check your API key in the platform settings."
          }
        }
      }
    }
  },
  "securitySchemes": {
    "DashboardJwt": {
      "type": "http",
      "scheme": "bearer",
      "bearerFormat": "Dashboard JWT",
      "description": "Use a dashboard JWT only for dashboard-authenticated endpoints. Respan API-key endpoints use the respanApiKey auth field instead.",
      "x-fern-bearer": {
        "name": "dashboardJwt",
        "env": "RESPAN_DASHBOARD_JWT"
      }
    },
    "RespanApiKey": {
      "type": "http",
      "scheme": "bearer",
      "bearerFormat": "Respan API key",
      "description": "Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.",
      "x-fern-bearer": {
        "name": "respanApiKey",
        "env": "RESPAN_API_KEY"
      }
    }
  }
}