{"id":25963580,"url":"https://github.com/drewm/frontapp","last_synced_at":"2026-03-16T08:34:23.646Z","repository":{"id":56972144,"uuid":"57306569","full_name":"drewm/frontapp","owner":"drewm","description":"PHP client library for Front API","archived":false,"fork":false,"pushed_at":"2016-10-19T10:26:44.000Z","size":7,"stargazers_count":6,"open_issues_count":2,"forks_count":4,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-12T09:14:08.972Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/drewm.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-04-28T14:05:58.000Z","updated_at":"2023-07-18T01:59:52.000Z","dependencies_parsed_at":"2022-08-21T11:20:17.260Z","dependency_job_id":null,"html_url":"https://github.com/drewm/frontapp","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drewm%2Ffrontapp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drewm%2Ffrontapp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drewm%2Ffrontapp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drewm%2Ffrontapp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/drewm","download_url":"https://codeload.github.com/drewm/frontapp/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241921824,"owners_count":20042764,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-03-04T20:47:14.806Z","updated_at":"2026-03-16T08:34:23.603Z","avatar_url":"https://github.com/drewm.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"FrontApp API client\n===================\n\nSuper-simple, minimum abstraction [Front](https://frontapp.com) API wrapper, in PHP.\n\nIn the style of my [MailChimp wrapper](https://github.com/drewm/mailchimp-api), this lets you get from the FrontApp API docs to the code as directly as possible.\n\nRequires PHP 5.4 and curl.\n\nInstallation\n------------\n\nYou can install frontapp using Composer:\n\n```\ncomposer require drewm/frontapp\n```\n\nYou will then need to:\n* run ``composer install`` to get these dependencies added to your vendor directory\n* add the autoloader to your application with this line: ``require(\"vendor/autoload.php\")``\n\nExamples\n--------\n\nStart by `use`-ing the class and creating an instance with your API key\n\n```php\nuse \\DrewM\\FrontApp\\FrontApp;\n\n$FrontApp = new FrontApp('abc123abc123abc123abc123abc123');\n```\n\nThen, list all your inboxes (with a `get` on the `inboxes` method)\n\n```php\n$result = $FrontApp-\u003eget('inboxes');\n\nprint_r($result);\n```\n\nCreate an inbox (with a `post` to the `inboxes` method):\n\n```php\n$result = $FrontApp-\u003epost(\"inboxes\", [\n\t\t\t\t'name' =\u003e 'Support'\n\t\t\t]);\n\nprint_r($result);\n```\n\nUpdate a channel member with more information (using `patch` to update):\n\n```php\n$channel_id = 'cha_123';\n\n$result = $FrontApp-\u003epatch(\"channels/$channel_id\", [\n\t\t\t\t'settings' =\u003e [ 'webhook_url' =\u003e 'https://example.com/hook' ]\n\t\t\t]);\n\nprint_r($result);\n```\n\nRemove a contact using the `delete` method:\n\n```php\n$contact_id = 'ctc_123';\n\n$FrontApp-\u003edelete(\"contacts/$contact_id\");\n```\n\nQuickly test for a successful action with the `success()` method:\n\n```php\n$result = $FrontApp-\u003eget('inboxes');\n\nif ($FrontApp-\u003esuccess()) {\n\tprint_r($result);\t\n} else {\n\techo $FrontApp-\u003egetLastError();\n}\n```\n\nTroubleshooting\n---------------\n\nTo get the last error returned by either the HTTP client or by the API, use `getLastError()`:\n\n```php\necho $FrontApp-\u003egetLastError();\n```\n\nFor further debugging, you can inspect the headers and body of the response:\n\n```php\nprint_r($FrontApp-\u003egetLastResponse());\n```\n\nIf you suspect you're sending data in the wrong format, you can look at what was sent to FrontApp by the wrapper:\n\n```php\nprint_r($FrontApp-\u003egetLastRequest());\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdrewm%2Ffrontapp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdrewm%2Ffrontapp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdrewm%2Ffrontapp/lists"}