![]() |
VOOZH | about |
Apideck offers a native SDK for PHP. Choose one language below to see our API Reference in your application’s language.
composer require "apideck-libraries/sdk-php"Using an AI coding agent? Install the apideck-php skill to teach your agent how to use the PHP SDK — including methods, authentication, and best practices.
npx skills add apideck/api-skills --skill apideck-phpThe module supports all Apideck API endpoints. For complete information about the API, head to the docs. All endpoints require a valid apiKey so that's the only required parameter to initialize a new Apideck client
declare(strict_types=1);
require 'vendor/autoload.php';
use Apideck\Unify;
use Apideck\Unify\Models\Components;
use Apideck\Unify\Models\Operations;
$sdk = Unify\Apideck::builder()
->setSecurity(
'<YOUR_BEARER_TOKEN_HERE>'
)
->setConsumerId('<insert-consumer-id-here>')
->setAppId('<insert-application-id-here>')
->build();
$request = new Operations\CrmContactsAllRequest(
serviceId: 'salesforce',
filter: new Components\ContactsFilter(
firstName: 'Elon',
lastName: 'Musk',
email: 'elon@tesla.com',
companyId: '12345',
ownerId: '12345',
),
sort: new Components\ContactsSort(
by: Components\ContactsSortBy::CreatedAt,
direction: Components\SortDirection::Desc,
),
passThrough: [
'search' => 'San Francisco',
],
fields: 'id,updated_at',
);
$responses = $sdk->crm->contacts->list(
request: $request
);
foreach ($responses as $response) {
if ($response->httpMeta->response->getStatusCode() === 200) {
// handle response
}
}