Wexa AI
  1. Customer
Wexa AI
  • Wexa AI
  • Getting Started with Wexa AI
  • Use Cases and Workflows
  • API Reference
  • Tutorials
  • Troubleshooting Guide
  • API Endpoints
    • Project
      • create project
      • Get all projects
      • Get project
      • update project
      • Delete project
    • Agentflows
      • create agentflow
      • get agentflows
      • Get agentflow by projectId and UserId
      • get agentflow by id
      • Add skilled agent to agentflow
      • Update skilled agent
    • Connectors
      • get connectors by projectid
      • get connector by Id
      • Delete a connector
      • connector update status
      • get all available trigger actions
    • Skills
      • create skill
      • get skills
      • get skills by category'
      • get skills by id
      • skills by name
    • Executeflow
      • create executeflow
      • get executions
      • execute agentflow
      • pause executeflow
      • resume execution
      • cancel executeflow
      • get execution by execution id
      • get execution details for monitoring
    • Customer
      • get customer
        GET
      • Get credit history
        GET
    • Actions
      • create action
      • get action
    • Files
      • upload files
      • get files by fileid
      • get connector by fileid
      • get files by connector_id
    • Inbox
      • get inbox
    • Tags
      • tags
    • Tasks
      • get tasks
      • get task by id
      • Pause running task
      • resume task
      • Stop task
    • Tables
      • create table
      • create database
      • get tables
      • get records list
      • get table names
      • delete record
      • delete a column
    • Dashboard
      • get dashboard
      • refresh dashboard
      • delete component in dashboard
    • Settings
      • get settings
    • Marketplace
      • get all connectors
      • get marketplace coworkers
      • get marketplace coworker by id
    • Coworker schedules
      • get schedules
      • create coworker schedule
      • get schedule coworker by its id
      • update schedule by its id
      • delete schedule by its id
    • Analytics
      • Get analytics
    • Marketplace coworkers
      • hire a coworker
      • check marketplace coworker update
    • Project member
      • project_member
  1. Customer

Get credit history

GET
https://api.wexa.ai/customer/credit_history
Last modified:2025-04-25 10:47:27

Get Customer Credit History#

Retrieve the credit history of a specific customer within your organization. This endpoint provides detailed information about the customer's credit utilization, including transaction amounts, payment statuses, and associated metadata. It's essential for assessing the customer's financial behavior and managing credit risk effectively.
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request GET 'https://api.wexa.ai/customer/credit_history?organization_id=67fdea40aac77be632954f0f&limit=10' \
--header 'x-api-key;'
Response Response Example
{
  "total": 17,
  "data": [
    {
      "operation": "agent_execution",
      "model": "azure/gpt-4o",
      "tokens_consumed": 1362,
      "projectID": "67fdea40aac77be632954f13",
      "execution_id": "1ffb0d1e-eab6-4935-939a-a4a630aefbf7",
      "agent_id": "67fdea9b68df1c3e9580a54a",
      "metadata": null,
      "connector_category": null,
      "connector_sort": null,
      "executed_by": "67fdea40aac77be632954f0e",
      "_id": "6805d86dc8af59e1dda56aa7",
      "created_at": "2025-04-21T05:32:29.741000",
      "credits_consumed": 0.03149925037481259,
      "organization_id": "67fdea40aac77be632954f0f",
      "agent_title": "new platform",
      "project_name": "Pulse",
      "coworker_role": "new platform",
      "coworker_name": "new platform",
      "coworker_image": "https://klotdev.blob.core.windows.net/coworkers/wexaworker13.png",
      "executed_by_name": "nani799324"
    },
    {
      "operation": "agent_execution",
      "model": "azure/gpt-4o",
      "tokens_consumed": 1398,
      "projectID": "67fdea40aac77be632954f13",
      "execution_id": "5f316a19-debf-479c-aae5-5c3ecceef2b8",
      "agent_id": "67fdea9b68df1c3e9580a54a",
      "metadata": null,
      "connector_category": null,
      "connector_sort": null,
      "executed_by": "67fdea40aac77be632954f0e",
      "_id": "6805e435c8af59e1dda56aa8",
      "created_at": "2025-04-21T06:22:45.996000",
      "credits_consumed": 0.03149925037481259,
      "organization_id": "67fdea40aac77be632954f0f",
      "agent_title": "new platform",
      "project_name": "Pulse",
      "coworker_role": "new platform",
      "coworker_name": "new platform",
      "coworker_image": "https://klotdev.blob.core.windows.net/coworkers/wexaworker13.png",
      "executed_by_name": "nani799324"
    },
    {
      "operation": "agent_execution",
      "model": "azure/gpt-4o",
      "tokens_consumed": 1425,
      "projectID": "67fdea40aac77be632954f13",
      "execution_id": "ea11320d-e0d2-44a5-a5d7-4dfa5c9bc362",
      "agent_id": "67fdea9b68df1c3e9580a54a",
      "metadata": null,
      "connector_category": null,
      "connector_sort": null,
      "executed_by": "67fdea40aac77be632954f0e",
      "_id": "6805e464c8af59e1dda56aa9",
      "created_at": "2025-04-21T06:23:32.538000",
      "credits_consumed": 0.03149925037481259,
      "organization_id": "67fdea40aac77be632954f0f",
      "agent_title": "new platform",
      "project_name": "Pulse",
      "coworker_role": "new platform",
      "coworker_name": "new platform",
      "coworker_image": "https://klotdev.blob.core.windows.net/coworkers/wexaworker13.png",
      "executed_by_name": "nani799324"
    },
    {
      "operation": "agent_execution",
      "model": "azure/gpt-4o",
      "tokens_consumed": 1496,
      "projectID": "67fdea40aac77be632954f13",
      "execution_id": "d65a5658-5439-46b7-b82d-017c899e901f",
      "agent_id": "67fdea9b68df1c3e9580a54a",
      "metadata": null,
      "connector_category": null,
      "connector_sort": null,
      "executed_by": "67fdea40aac77be632954f0e",
      "_id": "6805e570c8af59e1dda56aaa",
      "created_at": "2025-04-21T06:28:00.696000",
      "credits_consumed": 0.03149925037481259,
      "organization_id": "67fdea40aac77be632954f0f",
      "agent_title": "new platform",
      "project_name": "Pulse",
      "coworker_role": "new platform",
      "coworker_name": "new platform",
      "coworker_image": "https://klotdev.blob.core.windows.net/coworkers/wexaworker13.png",
      "executed_by_name": "nani799324"
    },
    {
      "operation": "agent_execution",
      "model": "azure/gpt-4o",
      "tokens_consumed": 1301,
      "projectID": "67fdea40aac77be632954f13",
      "execution_id": "c7b8ebd8-2c1c-4bcb-a547-a81904423ea2",
      "agent_id": "67fdea9b68df1c3e9580a54a",
      "metadata": null,
      "connector_category": null,
      "connector_sort": null,
      "executed_by": "67fdea40aac77be632954f0e",
      "_id": "6805e6e7c8af59e1dda56aab",
      "created_at": "2025-04-21T06:34:15.330000",
      "credits_consumed": 0.03149925037481259,
      "organization_id": "67fdea40aac77be632954f0f",
      "agent_title": "new platform",
      "project_name": "Pulse",
      "coworker_role": "new platform",
      "coworker_name": "new platform",
      "coworker_image": "https://klotdev.blob.core.windows.net/coworkers/wexaworker13.png",
      "executed_by_name": "nani799324"
    },
    {
      "operation": "agent_execution",
      "model": "azure/gpt-4o",
      "tokens_consumed": 1410,
      "projectID": "67fdea40aac77be632954f13",
      "execution_id": "aed1d3ae-0486-48bd-a2c3-97da32369cf7",
      "agent_id": "67fdea9b68df1c3e9580a54a",
      "metadata": null,
      "connector_category": null,
      "connector_sort": null,
      "executed_by": "67fdea40aac77be632954f0e",
      "_id": "6805e8d3c8af59e1dda56aac",
      "created_at": "2025-04-21T06:42:27.428000",
      "credits_consumed": 0.03149925037481259,
      "organization_id": "67fdea40aac77be632954f0f",
      "agent_title": "new platform",
      "project_name": "Pulse",
      "coworker_role": "new platform",
      "coworker_name": "new platform",
      "coworker_image": "https://klotdev.blob.core.windows.net/coworkers/wexaworker13.png",
      "executed_by_name": "nani799324"
    },
    {
      "operation": "agent_execution",
      "model": "azure/gpt-4o",
      "tokens_consumed": 1381,
      "projectID": "67fdea40aac77be632954f13",
      "execution_id": "8ffc2a03-5d38-4321-aae8-c9f32d7707fc",
      "agent_id": "67fdea9b68df1c3e9580a54a",
      "metadata": null,
      "connector_category": null,
      "connector_sort": null,
      "executed_by": "67fdea40aac77be632954f0e",
      "_id": "6805ffcdc8af59e1dda56aad",
      "created_at": "2025-04-21T08:20:29.126000",
      "credits_consumed": 0.03149925037481259,
      "organization_id": "67fdea40aac77be632954f0f",
      "agent_title": "new platform",
      "project_name": "Pulse",
      "coworker_role": "new platform",
      "coworker_name": "new platform",
      "coworker_image": "https://klotdev.blob.core.windows.net/coworkers/wexaworker13.png",
      "executed_by_name": "nani799324"
    },
    {
      "operation": "agent_execution",
      "model": "azure/gpt-4o",
      "tokens_consumed": 1348,
      "projectID": "67fdea40aac77be632954f13",
      "execution_id": "56d246cc-2803-41a7-a90d-c1c3d4672240",
      "agent_id": "67fdea9b68df1c3e9580a54a",
      "metadata": null,
      "connector_category": null,
      "connector_sort": null,
      "executed_by": "67fdea40aac77be632954f0e",
      "_id": "680601d3c8af59e1dda56aae",
      "created_at": "2025-04-21T08:29:07.374000",
      "credits_consumed": 0.03149925037481259,
      "organization_id": "67fdea40aac77be632954f0f",
      "agent_title": "new platform",
      "project_name": "Pulse",
      "coworker_role": "new platform",
      "coworker_name": "new platform",
      "coworker_image": "https://klotdev.blob.core.windows.net/coworkers/wexaworker13.png",
      "executed_by_name": "nani799324"
    },
    {
      "operation": "agent_execution",
      "model": "azure/gpt-4o",
      "tokens_consumed": 1373,
      "projectID": "67fdea40aac77be632954f13",
      "execution_id": "19966a1f-7a22-4da3-8473-7f638c6ba518",
      "agent_id": "67fdea9b68df1c3e9580a54a",
      "metadata": null,
      "connector_category": null,
      "connector_sort": null,
      "executed_by": "67fdea40aac77be632954f0e",
      "_id": "68060663c8af59e1dda56aaf",
      "created_at": "2025-04-21T08:48:35.049000",
      "credits_consumed": 0.03149925037481259,
      "organization_id": "67fdea40aac77be632954f0f",
      "agent_title": "new platform",
      "project_name": "Pulse",
      "coworker_role": "new platform",
      "coworker_name": "new platform",
      "coworker_image": "https://klotdev.blob.core.windows.net/coworkers/wexaworker13.png",
      "executed_by_name": "nani799324"
    },
    {
      "operation": "agent_execution",
      "model": "azure/gpt-4o",
      "tokens_consumed": 1348,
      "projectID": "67fdea40aac77be632954f13",
      "execution_id": "4b101a94-b084-4365-bc7b-f20be05c2616",
      "agent_id": "67fdea9b68df1c3e9580a54a",
      "metadata": null,
      "connector_category": null,
      "connector_sort": null,
      "executed_by": "67fdea40aac77be632954f0e",
      "_id": "68062369c8af59e1dda56ab0",
      "created_at": "2025-04-21T10:52:25.549000",
      "credits_consumed": 0.03149925037481259,
      "organization_id": "67fdea40aac77be632954f0f",
      "agent_title": "new platform",
      "project_name": "Pulse",
      "coworker_role": "new platform",
      "coworker_name": "new platform",
      "coworker_image": "https://klotdev.blob.core.windows.net/coworkers/wexaworker13.png",
      "executed_by_name": "nani799324"
    }
  ]
}

Request

Authorization
Add parameter in header
x-api-key
Example:
x-api-key: ********************
Query Params
organization_id
string 
required
Example:
67fdea40aac77be632954f0f
limit
string 
required
Example:
10
Header Params
x-api-key
string 
required
Example:
{{x-api-key}}

Responses

🟢200Get credit history
application/json
Body
total
integer 
required
data
array [object {20}] 
required
operation
string 
required
model
string 
required
tokens_consumed
integer 
required
projectID
string 
required
execution_id
string 
required
agent_id
string 
required
metadata
null 
required
connector_category
null 
required
connector_sort
null 
required
executed_by
string 
required
_id
string 
required
created_at
string 
required
credits_consumed
number 
required
organization_id
string 
required
agent_title
string 
required
project_name
string 
required
coworker_role
string 
required
coworker_name
string 
required
coworker_image
string 
required
executed_by_name
string 
required
Modified at 2025-04-25 10:47:27
Previous
get customer
Next
create action