PHPackages                             infamoustrey/smartsheet - 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. [HTTP &amp; Networking](/categories/http)
4. /
5. infamoustrey/smartsheet

ActiveLibrary[HTTP &amp; Networking](/categories/http)

infamoustrey/smartsheet
=======================

An API for Smartsheet

v1.0.1(2mo ago)1027.9k↑215.2%10MITPHPPHP ^7.4|^8.0CI failing

Since Jan 20Pushed 2mo ago4 watchersCompare

[ Source](https://github.com/Infamoustrey/smartsheet)[ Packagist](https://packagist.org/packages/infamoustrey/smartsheet)[ RSS](/packages/infamoustrey-smartsheet/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (10)Dependencies (10)Versions (22)Used By (0)

Smartsheet
==========

[](#smartsheet)

[![Latest Stable Version](https://camo.githubusercontent.com/de89d40840a1708b1a8e77f6ada6ec42ec5ad2f7e45ba2823ada35abdb103373/68747470733a2f2f706f7365722e707567782e6f72672f696e66616d6f7573747265792f736d61727473686565742f76)](//packagist.org/packages/infamoustrey/smartsheet) [![Total Downloads](https://camo.githubusercontent.com/58f346cb82cd478c97cbf85719ea34be9d489bdd4b4a371321cf01d7a1681fb4/68747470733a2f2f706f7365722e707567782e6f72672f696e66616d6f7573747265792f736d61727473686565742f646f776e6c6f616473)](//packagist.org/packages/infamoustrey/smartsheet) [![Latest Unstable Version](https://camo.githubusercontent.com/4ddecca1cf64a7b79235736743c9a0c363af00387ada78bb7e3016d36cbfe9f7/68747470733a2f2f706f7365722e707567782e6f72672f696e66616d6f7573747265792f736d61727473686565742f762f756e737461626c65)](//packagist.org/packages/infamoustrey/smartsheet) [![License](https://camo.githubusercontent.com/5f41c7c06464c1418502f4c1624a2cedf6e1d832ba335d06ddce46b605287b2b/68747470733a2f2f706f7365722e707567782e6f72672f696e66616d6f7573747265792f736d61727473686565742f6c6963656e7365)](//packagist.org/packages/infamoustrey/smartsheet)

This library serves as a convenience wrapper around the [REST API that smartsheet exposes](https://smartsheet-platform.github.io/api-docs/). It also uses the [Collections](https://packagist.org/packages/illuminate/collections) library from the Illuminate library in lieu of arrays, so check that out if you are unfamiliar with it.

Table of Contents
=================

[](#table-of-contents)

- [Installation](#installation)
- [Usage](#usage)
    - [Client](#client)
    - [Sheets](#sheets)
    - [Rows](#rows)
    - [Workspace](#workspace)
    - [Folder](#folder)
    - [Contacts](#contacts)
    - [Generic Resource Helpers](#generic-resource-helpers)
- [Issues](#issues)
- [Roadmap](#roadmap)
- [Contributing](#contributing)

Installation
------------

[](#installation)

The preferred method of installing this library is with Composer by running the following from your project root:

```
composer require infamoustrey/smartsheet
```

Usage
-----

[](#usage)

This library provides a fluent api for interacting with Smartsheet.

```
$smartsheetClient = new \Smartsheet\SmartsheetClient([ 'token' => 'yourapitoken' ]);

$smartsheetClient->getSheet('sheetid');
```

### Client

[](#client)

The `SmartsheetClient` class is the entry point for the currently supported API surface.

```
$smartsheetClient = new \Smartsheet\SmartsheetClient([
    'token' => 'yourapitoken',
]);

$smartsheetClient->listSheets(); // Collection
$smartsheetClient->getSheet('4583173393803140'); // Sheet
$smartsheetClient->getRow('4583173393803140', '7813666446436228'); // Row
$smartsheetClient->getFolder('7116448184199044'); // Folder
$smartsheetClient->getWorkspace('7116448184199044'); // Workspace
$smartsheetClient->listWorkspaces(); // Collection
$smartsheetClient->listContacts(); // Collection
```

### Sheets

[](#sheets)

Fetch a list of sheets

```
$smartsheetClient = new \Smartsheet\SmartsheetClient([ 'token' => 'yourapitoken' ]);

$smartsheetClient->listSheets(); // Collection
```

Access a sheet, see the [Sheet Object](https://smartsheet-platform.github.io/api-docs/#sheet-object) for a list of possible properties.

```
$smartsheetClient = new \Smartsheet\SmartsheetClient([ 'token' => 'yourapitoken' ]);

$sheet = $smartsheetClient->getSheet('4583173393803140');

// Access some fields
$sheet->getId(); // '4583173393803140'
$sheet->getName(); // 'sheet 1'

// Add some rows
$sheet->addRow([
    'ID' => "39424808324",
    'Transaction Desc' => "Toys",
    'Amount' => 754.23,
]);
```

Additional sheet operations:

```
$sheet = $smartsheetClient->getSheet('4583173393803140');

$sheet->getColumns(); // array
$sheet->getRows(); // Collection
$sheet->getColumnId('Primary'); // string

$sheet->addRows([
    ['Primary' => 'row 1', 'Status' => 'Open'],
    ['Primary' => 'row 2', 'Status' => 'Closed'],
]);

$sheet->updateRow('7813666446436228', [
    'Status' => 'Done',
]);

$sheet->updateRows([
    '7813666446436228' => ['Status' => 'Done'],
    '1122334455667788' => ['Status' => 'Queued'],
]);

$sheet->deleteRow('7813666446436228');
$sheet->deleteRows(['7813666446436228', '1122334455667788']);

$sheet->rename('Renamed Sheet');
$sheet->copyTo('Copied Sheet', '7116448184199044');
$sheet->copyRowsTo(['7813666446436228'], '9988776655443322');

$sheet->addColumn([
    'title' => 'Status',
    'type' => 'TEXT_NUMBER',
]);

$sheet->addColumns([
    ['title' => 'Status', 'type' => 'TEXT_NUMBER'],
    ['title' => 'Owner', 'type' => 'TEXT_NUMBER'],
]);

$sheet->shareSheet([
    [
        'email' => 'user@example.com',
        'accessLevel' => 'EDITOR',
    ],
]);

$sheet->getShares();
```

For replacing data in-place, the library also exposes:

```
$sheet->createRow(['Primary' => 'new row']);
$sheet->replaceFirstRow(['Primary' => 'updated first row']);
$sheet->replaceRows($rows, 'Primary');
$sheet->sync($rows, 'Primary');
$sheet->dropAllRows();
$sheet->dropAndReplace($rows);
$sheet->dropAllColumnsExcept(['Primary', 'Status']);
```

Summary field helpers:

```
$sheet->addSummaryField('Total', '=COUNT([Primary]:[Primary])');
$sheet->getSummaryFields();
$sheet->getSummaryFieldByName('Total');
$sheet->updateSummaryField([
    'id' => 123,
    'title' => 'Total',
    'formula' => '=COUNT([Primary]:[Primary])',
]);
$sheet->updateSummaryFieldByName('Total', [
    'title' => 'Total',
    'formula' => '=COUNT([Primary]:[Primary])',
]);
$sheet->deleteSummaryField('123');
$sheet->deleteSummaryFields(['123', '456']);
$sheet->deleteAllSummaryFields();
```

### Rows

[](#rows)

Rows can be fetched directly from the client or from a sheet collection.

```
$row = $smartsheetClient->getRow('4583173393803140', '7813666446436228');

$row->getId();
$row->getSheet(); // Sheet
$row->getCells(); // Collection
$row->getCell('Primary'); // Cell|null

$row->addAttachmentLink([
    'attachmentType' => 'LINK',
    'name' => 'Project Docs',
    'description' => 'External project documentation',
    'url' => 'https://example.com/docs',
]);

$row->addAttachment('/path/to/file.pdf');
$row->delete();
```

### Workspace

[](#workspace)

Fetch a workspace and access its properties. See the [Workspace Object](https://smartsheet-platform.github.io/api-docs/#objects-28) for a list of possible properties.

```
$smartsheetClient = new \Smartsheet\SmartsheetClient([ 'token' => 'yourapitoken' ]);

$workspace = $smartsheetClient->getWorkspace('7116448184199044'); // \Smartsheet\Resources\Workspace

$workspace->getId(); // '7116448184199044'
$workspace->getName(); // 'New workspace'
$workspace->getSheets(); // array

// Fetch a sheet by name
$workspace->getSheet('sheet name'); // Sheet

// Create a sheet with some columns
$workspace->createSheet('sheet name', [
    [
        "title" => "Primary",
        "type" => "TEXT_NUMBER",
        "primary" => true
    ]
]);
```

### Folder

[](#folder)

Fetch a folder and access its properties. See the [Folder Object](https://smartsheet-platform.github.io/api-docs/#folders) for a list of possible properties.

```
$smartsheetClient = new \Smartsheet\SmartsheetClient([ 'token' => 'yourapitoken' ]);

$folder = $smartsheetClient->getFolder('7116448184199044'); // Folder

// Access some fields
$folder->getId(); // '7116448184199044'
$folder->get('name'); // 'Projects'
$folder->getPermaLink(); // 'https://app.smartsheet.com/...'
$folder->getSheets(); // array

$sheet = $folder->getSheet('sheet name');

$folder->createSheet('sheet name');
$folder->createSheets([
    'sheet one',
    'sheet two',
]);
```

### Contacts

[](#contacts)

Fetch account contacts:

```
$contacts = $smartsheetClient->listContacts(); // Collection
```

### Generic Resource Helpers

[](#generic-resource-helpers)

All resource objects extend `Smartsheet\Resources\Resource`, which provides a few helpers for accessing raw payload data:

```
$sheet = $smartsheetClient->getSheet('4583173393803140');

$sheet->getData(); // full API payload as an array
$sheet->get('permalink'); // a single field from the payload
$sheet->toJSON(); // payload encoded as JSON
```

Issues
------

[](#issues)

Use this repository's [issue tracker](https://github.com/Infamoustrey/smartsheet/issues) to resolve issues and ask questions.

Roadmap
-------

[](#roadmap)

Full api coverage! There's a lot missing, if you see something missing then put in a PR! Your help is appreciated!

Contributing
------------

[](#contributing)

Feel free to [submit a PR](https://github.com/Infamoustrey/smartsheet/compare), just be sure to explain what you are trying to fix/add when submitting it. If you do decide to add functionality, it must be covered by a test. See the [contribution guide](./CONTRIBUTING.md) for more info.

To run the tests simply run:

```
./vendor/bin/phpunit
```

Static analysis can be run with:

```
vendor/bin/phpstan analyse src tests --memory-limit 1G
```

###  Health Score

56

—

FairBetter than 97% of packages

Maintenance83

Actively maintained with recent releases

Popularity37

Limited adoption so far

Community19

Small or concentrated contributor base

Maturity71

Established project with proven stability

 Bus Factor1

Top contributor holds 78.1% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~113 days

Recently: every ~404 days

Total

21

Last Release

84d ago

Major Versions

0.2.1 → v1.0.12026-04-01

PHP version history (2 changes)v0.1.0PHP ^8.0

0.1.4PHP ^7.4|^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/84c1c608f6b369bc98394716aa9cf24fbf9bc50af1b919df8eb4267f2dab800f?d=identicon)[Infamoustrey](/maintainers/Infamoustrey)

---

Top Contributors

[![Infamoustrey](https://avatars.githubusercontent.com/u/5813665?v=4)](https://github.com/Infamoustrey "Infamoustrey (50 commits)")[![eneamuskaj](https://avatars.githubusercontent.com/u/71572300?v=4)](https://github.com/eneamuskaj "eneamuskaj (3 commits)")[![jordyyau](https://avatars.githubusercontent.com/u/3924485?v=4)](https://github.com/jordyyau "jordyyau (3 commits)")[![michaeldchin](https://avatars.githubusercontent.com/u/8571136?v=4)](https://github.com/michaeldchin "michaeldchin (3 commits)")[![sylvainfilteau](https://avatars.githubusercontent.com/u/337578?v=4)](https://github.com/sylvainfilteau "sylvainfilteau (2 commits)")[![sigurdne](https://avatars.githubusercontent.com/u/12719970?v=4)](https://github.com/sigurdne "sigurdne (2 commits)")[![alnutile](https://avatars.githubusercontent.com/u/365385?v=4)](https://github.com/alnutile "alnutile (1 commits)")

---

Tags

apiclientcollectionsphpsmartsheethttpclientlibrarysmartsheet

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StyleLaravel Pint

Type Coverage Yes

### Embed Badge

![Health badge](/badges/infamoustrey-smartsheet/health.svg)

```
[![Health](https://phpackages.com/badges/infamoustrey-smartsheet/health.svg)](https://phpackages.com/packages/infamoustrey-smartsheet)
```

###  Alternatives

[craftcms/cms

Craft CMS

3.6k3.6M2.9k](/packages/craftcms-cms)[illuminate/http

The Illuminate Http package.

11937.2M6.5k](/packages/illuminate-http)[meteocontrol/vcom-api-client

HTTP Client for meteocontrol's VCOM API - The VCOM API enables you to directly access your data on the meteocontrol platform.

177.2k1](/packages/meteocontrol-vcom-api-client)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
