It would be cool if there was an endpoint to get an organization’s (account) information. The response body could look something like this.
{
"data": {
"organization": {
"id": "org_123456789",
"name": "Example Organization",
"created_at": "2023-01-01T00:00:00.000Z",
"usage": {
"daily": {
"amount": 15.00
},
"current_month": {
"amount": 850.00
},
"cumulative": {
"amount": 3200.00
}
},
"members": [
{
"id": "user_123",
"name": "John Doe",
"email": "johndoe@example.com",
"role": "admin"
},
{
"id": "user_456",
"name": "Jane Doe",
"email": "janedoe@example.com",
"role": "member"
}
],
"api_keys": [
{
"name": "CLI-Key",
"created_at": "2023-01-01T00:00:00.000Z",
"last_used_at": "2023-04-29T23:00:00.000Z"
},
{
"name": "Discord-Bot-Key",
"created_at": "2023-01-15T00:00:00.000Z",
"last_used_at": "2023-04-29T20:00:00.000Z"
}
],
"billing": {
"plan": "custom",
"next_payment_due": "2023-05-01T00:00:00.000Z",
"next_amount_due": 500.00,
"payment_method": "Credit Card",
"currency": "USD"
}
}
}
}