PHPackages                             form-synergy/php-api - 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. [API Development](/categories/api)
4. /
5. form-synergy/php-api

ActiveLibrary[API Development](/categories/api)

form-synergy/php-api
====================

API client written in PHP to manage Form Synergy services.

1.6.0.1(6y ago)0841MITPHPPHP &gt;=7.0

Since Mar 20Pushed 6y agoCompare

[ Source](https://github.com/form-synergy/php-api)[ Packagist](https://packagist.org/packages/form-synergy/php-api)[ Docs](https://formsynergy.com/)[ RSS](/packages/form-synergy-php-api/feed)WikiDiscussions dev-master Synced 3d ago

READMEChangelog (5)Dependencies (2)Versions (17)Used By (1)

FormSynergy.com API PHP library
===============================

[](#formsynergycom-api-php-library)

A PHP library to manage Form Synergy services.

Install using composer
----------------------

[](#install-using-composer)

```
composer require form-synergy/php-api
```

Include the library
-------------------

[](#include-the-library)

```
require '/vendor/autoload.php';
```

Enable session management
-------------------------

[](#enable-session-management)

```
\FormSynergy\Session::enable();
```

Import the Form Synergy class
-----------------------------

[](#import-the-form-synergy-class)

```
use \FormSynergy\Fs as FS;
```

You will need to retrieve your credentials in the Form Synergy console.

Form Synergy Website:

- $profileid = '';
- $apikey = '';
- $apisecret = '';

If you are a reseller

- $resellerid = '';

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

[](#configuration)

```
FS::Config([
    'version' => 'v1',
    'protocol' => 'https',
    'endpoint' => 'api.formsynergy.com',
    'apikey' => $apikey,
    'secretkey' => $secretkey,
    'max_auth_count' => 15,
]);
```

local storage
-------------

[](#local-storage)

Enable local storage to store downloads and responses.

```
FS::Storage( '/', 'local-storage' );
```

Load account
------------

[](#load-account)

Load and start managing an account.

```
$api = FS::Api()->Load($profileid);
```

Add a domain
------------

[](#add-a-domain)

```
$api->Create('website')
    ->Attributes([
        'name' => 'MyWebsite',
        'domain' => 'example.website.ltd',
        'proto' => 'https://'
    ])
    ->As('website');
```

Meta tag
--------

[](#meta-tag)

Add the site id meta tag as follow

```
