Skip to main content
GET
https://api-dev.weir.ai/
/
org
/
clients
curl -X GET 'https://api.weir.ai/org/clients' \
  -H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
  -H 'x-source: console'
{
  "data": {
    "clients": [
      {
        "clientId": "cli_123456789",
        "name": "Production API Client",
        "environment": "production",
        "credentials": {
          "clientId": "V2ndYYV7PMQVjqyTsk2QkokCv"
        },
        "createdAt": "2024-01-15T10:30:00Z",
        "lastUsed": "2024-01-22T14:20:00Z",
        "status": "active"
      }
    ]
  },
  "message": "Clients retrieved successfully",
  "status": "success"
}

Get API Clients

Retrieve a list of all API clients configured in your organization.
curl -X GET 'https://api.weir.ai/org/clients' \
  -H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
  -H 'x-source: console'
{
  "data": {
    "clients": [
      {
        "clientId": "cli_123456789",
        "name": "Production API Client",
        "environment": "production",
        "credentials": {
          "clientId": "V2ndYYV7PMQVjqyTsk2QkokCv"
        },
        "createdAt": "2024-01-15T10:30:00Z",
        "lastUsed": "2024-01-22T14:20:00Z",
        "status": "active"
      }
    ]
  },
  "message": "Clients retrieved successfully",
  "status": "success"
}

Response Fields

data.clients
array
required
Array of client objects.
Secret keys are never returned in list responses for security. They are only shown once during creation.

Usage Examples

const getClients = async (accessToken) => {
  const response = await fetch('https://api.weir.ai/org/clients', {
    headers: {
      'Authorization': `Bearer ${accessToken}`,
      'x-source': 'console'
    }
  });
  if (!response.ok) throw new Error(`HTTP error! status: ${response.status}`);
  return await response.json();
};