apideck-php
Skill4 starsChanged 3 months agoApache-2.0View on GitHub
Apideck Unified API integration patterns for PHP. Use when building integrations with accounting software (QuickBooks, Xero, NetSuite), CRMs (Salesforce, HubSpot, Pipedrive), HRIS platforms (Workday, BambooHR), file storage (Google Drive, Dropbox, Box), ATS systems (Greenhouse, Lever), e-commerce, or any of Apideck's 200+ connectors using PHP. Covers the apideck-libraries/sdk-php Composer package, authentication, CRUD operations, pagination, error handling, and Vault connection management.
- Reads credentials
In this repository182 other files it gives its agents.
- AGENTS.mdAGENTS.md
- llms.txtllms.txt
- access-financialsSkill
- acertaSkill
- activecampaignSkill
- actSkill
- acumaticaSkill
- adp-ihcmSkill
- adp-runSkill
- adp-workforce-nowSkill
- afasSkill
- alexishrSkill
- amazon-seller-centralSkill
- apideck-best-practicesSkill
- apideck-codegenSkill
- apideck-connector-coverageSkill
- apideck-dotnetSkill
- apideck-goSkill
- apideck-javaSkill
- apideck-mcp-month-end-closeSkill
- apideck-mcp-onboard-employeeSkill
- apideck-mcp-pay-billSkill
- apideck-mcp-receive-paymentSkill
- apideck-mcpSkill
- apideck-migrationSkill
- apideck-nodeSkill
- apideck-portmanSkill
- apideck-pythonSkill
- apideck-restSkill
- apideck-unified-apiSkill
- asanaSkill
- attioSkill
- azure-active-directorySkill
- azure-devopsSkill
- bamboohrSkill
- banqupSkill
- basecampSkill
- bigcommerceSkill
- blackbaudSkill
- bol-comSkill
- boxSkill
- breathehrSkill
- bullhorn-atsSkill
- campfireSkill
- cascade-hrSkill
- catalystoneSkill
- cegid-talentsoftSkill
- ceridian-dayforceSkill
- cezannehrSkill
- charliehrSkill
- ciphrSkill
- clearbooks-ukSkill
- clickupSkill
- closeSkill
- copperSkill
- deelSkill
- digitsSkill
- dropboxSkill
- dualentrySkill
- ebaySkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
6 rules. About 0 are common, 2 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 25
ALWAYS use the apideck-libraries/sdk-php Composer package.
- Distinctive: line 26
ALWAYS pass security, app ID, and consumer ID via the builder when creating the client.
- Very specific: line 27
USE serviceId on requests to specify which downstream connector to use.
- Very specific: line 28
ALWAYS handle errors with try/catch using Errors\APIException as the base class.
- Distinctive: line 29
DO NOT store API keys in source code.
- Very specific: line 78
All resources follow the pattern: $sdk->{api}->{resource}->{operation}(request: $request).
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Apideck PHP SDK Skill
Overview
The Apideck Unified API provides a single integration layer to connect with 200+ third-party services across accounting, CRM, HRIS, file storage, ATS, e-commerce, and more. The official PHP SDK provides typed clients for all unified APIs.
Installation
composer require apideck-libraries/sdk-phpIMPORTANT RULES
- ALWAYS use the
apideck-libraries/sdk-phpComposer package. DO NOT make rawGuzzle/curlcalls to the Apideck API. - ALWAYS pass security, app ID, and consumer ID via the builder when creating the client.
- USE
serviceIdon requests to specify which downstream connector to use. - ALWAYS handle errors with try/catch using
Errors\APIExceptionas the base class. - DO NOT store API keys in source code. Use environment variables.
Quick Start
<?php
use Apideck\Unify;
use Apideck\Unify\Models\Operations;
use Apideck\Unify\Models\Components;
$sdk = Unify\Apideck::builder()
->setConsumerId('your-consumer-id')
->setAppId('your-app-id')
->setSecurity(getenv('APIDECK_API_KEY'))
->build();
$request = new Operations\CrmContactsAllRequest(
serviceId: 'salesforce',
limit: 20,
);
$responses = $sdk->crm->contacts->list(request: $request);
foreach ($responses as $response) {
if ($response->httpMeta->response->getStatusCode() === 200) {
foreach ($response->getContactsResponse->data as $contact) {
echo $contact->name . "\n";
}
}
}SDK Patterns
Client Setup
use Apideck\Unify;
$sdk = Unify\Apideck::builder()
->setConsumerId('your-consumer-id')
->setAppId('your-app-id')
->setSecurity(getenv('APIDECK_API_KEY'))
->build();CRUD Operations
All resources follow the pattern: $sdk->{api}->{resource}->{operation}(request: $request).
use Apideck\Unify\Models\Operations;
use Apideck\Unify\Models\Components;
// LIST
$request = new Operations\CrmContactsAllRequest(
serviceId: 'salesforce',
limit: 20,
filter: new Components\ContactsFilter(email: 'john@example.com'),
sort: new Components\ContactsSort(
by: Components\ContactsSortBy::UpdatedAt,
direction: Components\SortDirection::Desc,
),
);
$responses = $sdk->crm->contacts->list(request: $request);
// CREATE
$request = new Operations\CrmContactsAddRequest(
serviceId: 'salesforce',
contact: new Components\ContactInput(
firstName: 'John',
lastName: 'Doe',
emails: [
new Components\Email(email: 'john@example.com', type: Components\EmailType::Primary),
],
phoneNumbers: [
new Components\PhoneNumber(number: '+1234567890', type: Components\PhoneNumberType::Mobile),
],
),
);
$response = $sdk->crm->contacts->create(request: $request);
// GET
$request = new Operations\CrmContactsOneRequest(
id: 'contact_123',
serviceId: 'salesforce',
);
$response = $sdk->crm->contacts->get(request: $request);
// UPDATE
$request = new Operations\CrmContactsUpdateRequest(
id: 'contact_123',
serviceId: 'salesforce',
contact: new Components\ContactInput(firstName: 'Jane'),
);
$response = $sdk->crm->contacts->update(request: $request);
// DELETE
$request = new Operations\CrmContactsDeleteRequest(
id: 'contact_123',
serviceId: 'salesforce',
);
$response = $sdk->crm->contacts->delete(request: $request);Pagination
The list method returns a PHP Generator. Iterate with foreach:
$request = new Operations\AccountingInvoicesAllRequest(
serviceId: 'quickbooks',
limit: 50,
);
$responses = $sdk->accounting->invoices->list(request: $request);
foreach ($responses as $response) {
if ($response->httpMeta->response->getStatusCode() === 200) {
foreach ($response->getInvoicesResponse->data as $invoice) {
echo "{$invoice->number}: {$invoice->total}\n";
}
}
}Error Handling
use Apideck\Unify\Models\Errors;
try {
$responses = $sdk->crm->contacts->list(request: $request);
foreach ($responses as $response) {
// handle response
}
} catch (Errors\BadRequestResponseThrowable $e) {
echo "Bad request: " . $e->getMessage() . "\n";
} catch (Errors\UnauthorizedResponseThrowable $e) {
echo "Unauthorized\n";
} catch (Errors\NotFoundResponseThrowable $e) {
echo "Not found\n";
} catch (Errors\PaymentRequiredResponseThrowable $e) {
echo "API limit reached\n";
} catch (Errors\UnprocessableResponseThrowable $e) {
echo "Validation error: " . $e->getMessage() . "\n";
} catch (Errors\APIException $e) {
echo "API error: " . $e->getMessage() . "\n";
}Retry Configuration
use Apideck\Unify\Utils\Retry;
// Global
$sdk = Unify\Apideck::builder()
->setRetryConfig(
new Retry\RetryConfigBackoff(
initialInterval: 1,
maxInterval: 50,
exponent: 1.1,
maxElapsedTime: 100,
retryConnectionErrors: false,
)
)
->setConsumerId('your-consumer-id')
->setAppId('your-app-id')
->setSecurity(getenv('APIDECK_API_KEY'))
->build();API Namespaces
| Namespace | Resources |
$sdk->accounting->* | invoices, bills, payments, customers, suppliers, ledgerAccounts, journalEntries, taxRates, creditNotes, purchaseOrders, balanceSheet, profitAndLoss, and more |
$sdk->crm->* | contacts, companies, leads, opportunities, activities, notes, pipelines, users |
$sdk->hris->* | employees, companies, departments, payrolls, timeOffRequests |
$sdk->fileStorage->* | files, folders, drives, driveGroups, sharedLinks, uploadSessions |
$sdk->ats->* | applicants, applications, jobs |
$sdk->vault->* | connections, consumers, sessions, customMappings, logs |
$sdk->webhook->* | webhooks, eventLogs |
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

