# PHP SDK

The official Apideck SDK for PHP. Integrate with 200+ services across CRM, Accounting, HRIS, ATS, File Storage, E-commerce, Issue Tracking, and more — using one unified API.

## Install

```bash
composer require apideck-libraries/sdk-php
```

- Packagist: https://packagist.org/packages/apideck-libraries/sdk-php
- GitHub: https://github.com/apideck-libraries/sdk-php

## Getting started

Initialize the client with your API key, application ID, and a consumer ID (an identifier in your system for the end user whose connections you are acting on). Then call any Unified API method — for example, listing CRM contacts from Salesforce:

```php
use Apideck\Unify;

$sdk = Unify\Apideck::builder()
    ->setSecurity('<YOUR_BEARER_TOKEN_HERE>')
    ->setConsumerId('<insert-consumer-id-here>')
    ->setAppId('<insert-application-id-here>')
    ->build();

$responses = $sdk->crm->contacts->list(new Operations\CrmContactsAllRequest(
    serviceId: 'salesforce',
));
```

## AI coding agent skill

If you are using an AI coding agent, install the `apideck-php` skill to teach it how to use this SDK — including methods, authentication patterns, and error handling:

```bash
npx skills add apideck/api-skills --skill apideck-php
```

See [https://developers.apideck.com/building-with-llms](https://developers.apideck.com/building-with-llms.md) for more on using Apideck with LLMs and AI agents.

## Resources

- [Unified API reference](https://developers.apideck.com/apis/crm/reference.md)
- [Get an API key](https://developers.apideck.com/get-started.md)
- [Other SDKs](https://developers.apideck.com/sdks): Node.js, Python, .NET, PHP, Java, Go
