PHPackages                             trafficmind/php - 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. trafficmind/php

ActiveLibrary

trafficmind/php
===============

PHP client (SDK) for Trafficmind API

00PHP

Since Mar 19Pushed 3d agoCompare

[ Source](https://github.com/Trafficmind/php)[ Packagist](https://packagist.org/packages/trafficmind/php)[ RSS](/packages/trafficmind-php/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

Trafficmind PHP SDK
===================

[](#trafficmind-php-sdk)

[![Coverage](https://camo.githubusercontent.com/32855e94577df9d0a30995653b17d33a5fbfdf644518f96ea0374313397d19b7/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f636f7665726167652d3130302532352d627269676874677265656e)](https://github.com/trafficmind/php/actions/workflows/ci.yml)

Official PHP SDK for the Trafficmind **Public API** (`/public/v1`): domains, domain records, CDN, firewall rules, and domain settings.

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

[](#configuration)

Trafficmind SDK requires API credentials to authenticate requests.

### Required environment variables

[](#required-environment-variables)

```
# Trafficmind API credentials
TRAFFICMIND_ACCESS_USER=example@trafficmind.com
TRAFFICMIND_ACCESS_KEY=example_api_key_123
```

### Optional environment variable

[](#optional-environment-variable)

```
# Base URL for Trafficmind API (optional)
TRAFFICMIND_BASE_URL=https://api.trafficmind.com/public/v1/
```

`TRAFFICMIND_BASE_URL` is optional.
If not provided, the SDK will use the default production API endpoint.

---

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

[](#requirements)

- PHP **8.1+**
- Composer
- `ext-json`, `ext-curl`

Installation
------------

[](#installation)

### From GitHub (VCS)

[](#from-github-vcs)

```
composer config repositories.trafficmind vcs https://github.com/trafficmind/php
composer require trafficmind/php:dev-main
```

> Replace `dev-main` with a tag or branch that matches your release process.

Authentication
--------------

[](#authentication)

All requests automatically include:

- `X-Access-User` — email associated with your account.
- `X-Access-Key` — global API key.

By default requests go to `https://api.trafficmind.com/public/v1/`. Use `$baseUrl` to point the SDK at a staging or private deployment.

> The base URL must include the `/public/v1/` prefix.

Quick start
-----------

[](#quick-start)

```
