PHPackages                             outboundiq/laravel-outboundiq - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [HTTP &amp; Networking](/categories/http)
4. /
5. outboundiq/laravel-outboundiq

ActiveLibrary[HTTP &amp; Networking](/categories/http)

outboundiq/laravel-outboundiq
=============================

OutboundIQ integration for Laravel - Third-party API monitoring and analytics

1.0.4(3w ago)01.7k↓73.9%MITPHPPHP ^8.1

Since Jan 18Pushed 3w agoCompare

[ Source](https://github.com/outboundiq-hq/laravel-outboundiq)[ Packagist](https://packagist.org/packages/outboundiq/laravel-outboundiq)[ Docs](https://outboundiq.dev)[ RSS](/packages/outboundiq-laravel-outboundiq/feed)WikiDiscussions main Synced 3d ago

READMEChangelog (5)Dependencies (21)Versions (7)Used By (0)

Laravel OutboundIQ
==================

[](#laravel-outboundiq)

**Website &amp; dashboard:** [outboundiq.dev](https://outboundiq.dev) · **Documentation:** [outboundiq.dev/docs](https://outboundiq.dev/docs)

OutboundIQ for Laravel is **API Intelligence — not just monitoring**.

It automatically tracks every outbound API call your app makes and gives you *programmatic answers* to questions like:

- “Is this provider actually healthy for my traffic?”
- “Which provider should I use right now?”
- “Is a single endpoint degrading even though the status page is green?”

Why this exists
---------------

[](#why-this-exists)

If your app depends on third-party APIs, you’ve lived this:

- “Stripe is down? We found out from Twitter…”
- “Which provider should we failover to?”
- “Is it our code, or is the API having issues?”
- “Everything looks green… but users are failing.”

OutboundIQ makes those dependencies visible and actionable.

What you get
------------

[](#what-you-get)

### Automatic outbound-call tracking (Laravel-native)

[](#automatic-outbound-call-tracking-laravel-native)

OutboundIQ auto-tracks Laravel HTTP Client calls and captures:

- URL, method, status code, duration
- request/response headers + bodies (see security note below)
- failures + error messages
- user context (from `Auth::user()` when available)

### API Intelligence methods (the differentiator)

[](#api-intelligence-methods-the-differentiator)

OutboundIQ exposes three methods you can call from your app:

- `OutboundIQ::recommend($serviceName)` → pick the best provider *right now*
- `OutboundIQ::providerStatus($providerSlug)` → pre-flight provider health checks
- `OutboundIQ::endpointStatus($endpointSlug)` → endpoint-level metrics + schema stability

Quickstart (under 5 minutes)
----------------------------

[](#quickstart-under-5-minutes)

### 1) Install

[](#1-install)

```
composer require outboundiq/laravel-outboundiq
```

### 2) Add your API key

[](#2-add-your-api-key)

Get your API key from [outboundiq.dev](https://outboundiq.dev) — sign in, open your project, and copy the key from project settings. Then add:

```
OUTBOUNDIQ_KEY=your_api_key_here
```

### 3) (Optional) Publish config

[](#3-optional-publish-config)

```
php artisan vendor:publish --tag="outboundiq-config"
# or
php artisan vendor:publish --provider="OutboundIQ\Laravel\Providers\OutboundIQServiceProvider" --tag="config"
```

### 4) Run the integration test

[](#4-run-the-integration-test)

This verifies config and makes tracked requests:

```
php artisan outboundiq:test
```

### 5) Make any outbound request

[](#5-make-any-outbound-request)

Laravel HTTP Client calls are tracked automatically:

```
use Illuminate\Support\Facades\Http;

$response = Http::post('https://api.example.com/checkout', [
    'order_id' => 123,
]);
```

Open your OutboundIQ dashboard and you’ll see the transaction.

API Intelligence examples
-------------------------

[](#api-intelligence-examples)

These examples show the decision contract you’ll build around: `decision.action` = `proceed` | `caution` | `avoid` | `unavailable`

### `recommend()`: choose the best provider before users feel failure

[](#recommend-choose-the-best-provider-before-users-feel-failure)

```
use OutboundIQ\Laravel\Facades\OutboundIQ;

$decision = OutboundIQ::recommend('Payment Processing');

if (!$decision) {
    // OutboundIQ unavailable → use your default logic
    return $this->chargeWith('stripe', $order);
}

$action   = $decision['decision']['action'] ?? 'unavailable';
$provider = $decision['decision']['use'] ?? 'stripe';

return match ($action) {
    'proceed' => $this->chargeWith($provider, $order),
    'caution' => $this->chargeWithRetry($provider, $order, attempts: 3),
    'avoid'   => $this->chargeWith($decision['alternatives'][0]['provider']['slug'] ?? 'stripe', $order),
    default   => $this->chargeWith('stripe', $order),
};
```

### `providerStatus()`: pre-flight checks for critical operations

[](#providerstatus-pre-flight-checks-for-critical-operations)

```
use OutboundIQ\Laravel\Facades\OutboundIQ;

$status = OutboundIQ::providerStatus('twilio');

if (!$status) {
    return $this->sendViaTwilio($phone, $message); // default behavior
}

if (($status['decision']['action'] ?? null) === 'avoid') {
    return $this->sendViaBackupProvider($phone, $message);
}

// proceed | caution → your policy (retry, reduced timeouts, etc.)
return $this->sendViaTwilio($phone, $message);
```

### `endpointStatus()`: detect “one green dashboard, one broken endpoint”

[](#endpointstatus-detect-one-green-dashboard-one-broken-endpoint)

Endpoint slugs are auto-generated (provider + method + path). Find them in the OutboundIQ dashboard under **Endpoints**.

```
use OutboundIQ\Laravel\Facades\OutboundIQ;
use Illuminate\Support\Facades\Http;

$status = OutboundIQ::endpointStatus('stripe-post-v1-charges');

$timeout = 5;
if ($status && ($status['metrics']['avg_latency_ms'] ?? 0) > 0) {
    // Simple heuristic: 2× avg latency, converted to seconds (min 1)
    $timeout = max(1, (int) ceil(($status['metrics']['avg_latency_ms'] * 2) / 1000));
}

return Http::timeout($timeout)->post('https://api.stripe.com/v1/charges', $data);
```

Tracking options
----------------

[](#tracking-options)

### Automatic tracking (Laravel HTTP Client)

[](#automatic-tracking-laravel-http-client)

Any `Http::get` / `Http::post` / … call is tracked automatically.

### Guzzle wrapper (if you call Guzzle directly)

[](#guzzle-wrapper-if-you-call-guzzle-directly)

```
use OutboundIQ\Laravel\Http\OutboundIQGuzzleClient;

$guzzle = app(OutboundIQGuzzleClient::class);

$response = $guzzle->get('https://api.example.com/data');
$response = $guzzle->post('https://api.example.com/send', [
    'json' => ['message' => 'Hello!'],
]);
```

### Manual tracking (custom clients / edge cases)

[](#manual-tracking-custom-clients--edge-cases)

```
use OutboundIQ\Laravel\Facades\OutboundIQ;

OutboundIQ::trackApiCall(
    url: 'https://api.example.com/endpoint',
    method: 'POST',
    duration: 150.5,
    statusCode: 200,
    requestHeaders: ['Content-Type' => 'application/json'],
    requestBody: '{"key":"value"}',
    responseHeaders: ['Content-Type' => 'application/json'],
    responseBody: '{"status":"success"}'
);
```

Configuration
-------------

[](#configuration)

You can configure OutboundIQ via `config/outboundiq.php` (or `.env`):

```
# Required
OUTBOUNDIQ_KEY=your_api_key_here

# Optional
OUTBOUNDIQ_ENABLED=true

# Transport: async | sync | queue
# - async: background process (default for traditional servers)
# - sync: blocking (useful for some serverless runtimes)
# - queue: use Laravel queue workers
OUTBOUNDIQ_TRANSPORT=async

# Buffer size before flush
OUTBOUNDIQ_MAX_ITEMS=100

# Only used when OUTBOUNDIQ_TRANSPORT=queue
# Leave empty to use your app’s default queue
OUTBOUNDIQ_QUEUE=
```

Troubleshooting
---------------

[](#troubleshooting)

### No data showing up

[](#no-data-showing-up)

- Confirm `OUTBOUNDIQ_KEY` is set
- Confirm `OUTBOUNDIQ_ENABLED=true`
- Run:

```
php artisan outboundiq:test
```

- Check Laravel logs (`storage/logs`) for errors when flushing metrics

Requirements
------------

[](#requirements)

- PHP 8.1+ (PHP 8.3+ required for Laravel 13)
- Laravel / Illuminate 10.x, 11.x, 12.x, 13.x

Security &amp; privacy note
---------------------------

[](#security--privacy-note)

OutboundIQ tracks outbound-call metadata and can capture headers/bodies for debugging. Be intentional about what you send to third parties and review your account/project settings for any redaction or data controls.

Support
-------

[](#support)

Email:

###  Health Score

45

—

FairBetter than 91% of packages

Maintenance95

Actively maintained with recent releases

Popularity20

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~36 days

Total

5

Last Release

22d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/215213269?v=4)[outboundiq](/maintainers/outboundiq)[@OutboundIQ](https://github.com/OutboundIQ)

---

Top Contributors

[![infinitypaul](https://avatars.githubusercontent.com/u/15332137?v=4)](https://github.com/infinitypaul "infinitypaul (25 commits)")

---

Tags

httpapilaravelmonitoringtrackingMetricsobservability

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/outboundiq-laravel-outboundiq/health.svg)

```
[![Health](https://phpackages.com/badges/outboundiq-laravel-outboundiq/health.svg)](https://phpackages.com/packages/outboundiq-laravel-outboundiq)
```

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M346](/packages/psalm-plugin-laravel)[laravel/socialite

Laravel wrapper around OAuth 1 &amp; OAuth 2 libraries.

5.7k108.5M889](/packages/laravel-socialite)[api-platform/laravel

API Platform support for Laravel

58171.8k14](/packages/api-platform-laravel)[spatie/laravel-export

Create a static site bundle from a Laravel app

674146.0k6](/packages/spatie-laravel-export)[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9762.4M131](/packages/roots-acorn)[laravel/mcp

Rapidly build MCP servers for your Laravel applications.

77022.3M151](/packages/laravel-mcp)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
