PHPackages                             mikkelson/shortcut-php - 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. mikkelson/shortcut-php

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

mikkelson/shortcut-php
======================

Lightweight (dependency-free) php wrapper for Shortcut.com V3 REST API

1.0(2y ago)08MITPHP

Since Aug 7Pushed 2y ago1 watchersCompare

[ Source](https://github.com/mikkelson/shortcut-php)[ Packagist](https://packagist.org/packages/mikkelson/shortcut-php)[ Docs](https://github.com/mikkelson/shortcut-php)[ RSS](/packages/mikkelson-shortcut-php/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)DependenciesVersions (2)Used By (0)

Shortcut.com REST API php Wrapper
=================================

[](#shortcutcom-rest-api-php-wrapper)

This is a lightweight (dependency-free) php wrapper for the Shortcut.com REST version 3 API. See the official [Shortcut API docs here](https://developer.shortcut.com/api/rest/v3).

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

[](#installation)

To install **with Composer**:

```
composer require mikkelson/shortcut-php

```

After the package installation completes, use the autoloader provided by Composer.

```
require __DIR__ . '/vendor/autoload.php';
```

Or, **without Composer**:

Download this repo and include Shortcut.php

```
require_once('src/Shortcut.php');
```

Usage &amp; Setup
-----------------

[](#usage--setup)

Load the package namespace.

```
use Mikkelson\Shortcut;
```

Before making useful calls to Shortcut, create an instance of `Shortcut`, providing your Shortcut API token, which you can get [here](https://app.shortcut.com/settings/account/api-tokens).

```

    $token = '213901-dk9AJ-3SOJ-8dj9-KAAa0smsa';

    $shortcut = new Shortcut($token);
```

Epics
-----

[](#epics)

### Get

[](#get)

Get Epic returns information about the selected Epic.

```
$epic_id = '3000';

$epic = $shortcut->get('epics', $epic_id);
```

### Update

[](#update)

Update Epic can be used to update numerous fields in the Epic. See [complete list of available fields](https://shortcut.com/api/v3/#update-epic).

```
$epic_id = "4351";

$data = [
    'description' => 'Keep your developers happy by providing detailed descriptions (-;',
    'state' => 'to do'
];

$update = $shortcut->update('epics', $epic_id, $data);
```

### Delete

[](#delete)

Deletes an Epic

```
$epic_id = '3000';

$shortcut->delete('epics', $epic_id);
```

### List

[](#list)

List Epics returns a list of all Epics and their attributes.

```
$epics = $shortcut->get('epics');
```

### Create

[](#create)

Create Epic allows you to create a new Epic in Shortcut. See [complete list of available fields](https://shortcut.com/api/v3/#create-epic).

```
$new_epic = [
    'deadline' => '2020-08-16T12:30:00Z',
    'name' => 'Terraforming of Mars',
    'description' => 'Should be easy. Couple of astropeople, a trowel each. Easy.'
];

$epic = $shortcut->create('epics', $new_epic);
```

Files
-----

[](#files)

### Get

[](#get-1)

Get File returns information about the selected File.

```
$file_id = '3000';

$file = $shortcut->get('files', $file_id);
```

### Update

[](#update-1)

Update File can used to update the properties of a file uploaded to Shortcut. See [complete list of available fields](https://shortcut.com/api/v3/#update-file).

```
$file_id = "4351";

$data = [
    'description' => 'This file contains all of my most important passwords, in plain text.',
    'name' => 'Paswords.txt'
];

$update = $shortcut->update('files', $file_id, $data);
```

### Delete

[](#delete-1)

Delete File can be used to delete any previously attached File.

```
$file_id = '3000';

$shortcut->delete('files', $file_id);
```

### List

[](#list-1)

List Files returns a list of all Files and related attributes in your Shortcut.

```
$files = $shortcut->get('files');
```

Labels
------

[](#labels)

### Create

[](#create-1)

Create Label allows you to create a new Label in Shortcut.

```
$new_label = [
    'external_id' => 'thirdparty-id-123',
    'name' => 'My New Label'
];

$label = $shortcut->create('labels', $new_label);
```

### Update

[](#update-2)

Update Label allows you to replace a Label name with another name. If you try to name a Label something that already exists, you will receive a 422 response.

```
$label_id = "1234";

$data = [
    'name' => 'Updated Label Name'
];

$label = $shortcut->update('labels', $label_id, $data);
```

### Delete

[](#delete-2)

Delete Label can be used to delete any Label.

```
$label_id = '3000';

$shortcut->delete('labels', $label_id);
```

### List

[](#list-2)

List Labels returns a list of all Labels and their attributes.

```
$labels = $shortcut->get('labels');
```

Linked-Files
------------

[](#linked-files)

### Get

[](#get-2)

Get File returns information about the selected Linked File.

```
$link_id = 5000;

$linked_files = $shortcut->get('linked-files', $link_id);
```

### Create

[](#create-2)

Create Linked File allows you to create a new Linked File in Shortcut. See [complete list of available fields](https://shortcut.com/api/v3/#create-linked-file)

```
$new_link = [
    'name' => 'My Linked File',
    'description' => 'Description of the file',
    'type' => 'dropbox',
    'url' => 'http://dropbox.com/1sjsSA9Q/asd20j.txt
];

$linked_file = $shortcut->create('linked-files', $new_link);
```

### Update

[](#update-3)

Updated Linked File allows you to update properties of a previously attached Linked-File. See [complete list of available fields](https://shortcut.com/api/v3/#update-linked-file)

```
$link_id = "1234";

$data = [
    'name' => 'New name for linked file',
    'description' => 'Description of new linked file'
];

$linked_file = $shortcut->update('linked-files', $link_id, $data);
```

### Delete

[](#delete-3)

Delete Linked File can be used to delete any previously attached Linked-File.

```
$link_id = '3000';

$shortcut->delete('linked-files', $link_id);
```

### List

[](#list-3)

List Linked Files returns a list of all Linked-Files and their attributes.

```
$linked_files = $shortcut->get('linked-files');
```

Projects
--------

[](#projects)

### Get

[](#get-3)

Get Project returns information about the selected Project.

```
$project_id = '2990';

$project = $shortcut->get('projects', $project_id);
```

### Create

[](#create-3)

Create Project is used to create a new Shortcut Project. See [complete list of available fields](https://shortcut.com/api/v3/#create-project)

```
$new_project = [
    'name' => 'New Shortcut Project',
    'description' => 'Description of the project',
    'abbreviation' => 'ncp'
];

$project = $shortcut->create('projects', $new_project);
```

### Update

[](#update-4)

Update Project can be used to change properties of a Project. See [complete list of available fields](https://shortcut.com/api/v3/#update-project)

```
$project_id = 1234;

$data = [
    'name' => 'New name for project',
    'description' => 'Description update text'
];

$project = $shortcut->update('projects', $project_id, $data);
```

### Delete

[](#delete-4)

Delete Project can be used to delete a Project. Projects can only be deleted if all associated Stories are moved or deleted. In the case that the Project cannot be deleted, you will receive a 422 response.

```
$project_id = 3000;

$shortcut->delete('projects', $project_id);
```

### List

[](#list-4)

List Projects returns a list of all Projects and their attributes.

```
$projects = $shortcut->get('projects');
```

Story-Links
-----------

[](#story-links)

### Create

[](#create-4)

Story links allow you create semantic relationships between two stories. Relationship types are relates to, blocks / blocked by, and duplicates / is duplicated by. The format is subject -&gt; link -&gt; object, or for example “story 5 blocks story 6”. See [complete list of available fields](https://shortcut.com/api/v3/#create-story-link)

```
$new_link = [
    'object_id' => 100,
    'subject_id' => 250,
    'verb' => 'blocks' //blocks, relates, duplicates
];

$story_links = $shortcut->create('story-links', $new_link);
```

### Get

[](#get-4)

Returns information about the selected Story Link.

```
$storylink_id = 3000;

$story_links = $shortcut->get('story-links', $storylink_id);
```

### Delete

[](#delete-5)

Delete Story-Link can be used to delete any Story Link.

```
$storylink_id = 3000;

$shortcut->delete('story-links', $storylink_id);
```

Stories
-------

[](#stories)

### Search

[](#search)

> **Warning**Searching has changed in V3, and this library has not yet been fully updated, below is a hacky way you can search using this repo.

Search Stories lets you search Stories based on desired parameters. While all parameters are optional, you must include at least one parameter in order to receive a response.

See [complete list of available search parameters](https://developer.shortcut.com/api/rest/v3#Search-1273)

To search, for example, for all stories with a specific workflow state:

```
$query = "state:500005001";

$stories = $shortcut->get('search/stories?query='.$query);
```

### Create

[](#create-5)

Create Story is used to add a new story to your Shortcut. See [complete list of available fields](https://shortcut.com/api/v3/#create-story)

```
$new_story = [
    'name' => 'New story with some tasks',
    'project_id' => 6,
    'story_type' => 'feature', //feature, chore, bug
    'description' => 'Fuller descriptions make you more friends.',
    'tasks' => [
        ['description' => 'Task description 1'],
        ['description' => 'Task description 2']
    ]
];

$story = $shortcut->create('stories', $new_story);
```

### Get

[](#get-5)

Get Story returns information about a chosen Story.

```
$story_id = 2000;

$story = $shortcut->get('stories', $story_id);
```

### Update

[](#update-5)

Update Story can be used to change properties of a Story. See [complete list of available fields](https://shortcut.com/api/v3/#update-story)

```
$story_id = 1234;

$data = [
    'epic_id' => 29,
    'description' => 'Description update text'
];

$story = $shortcut->update('stories', $story_id, $data);
```

### Delete

[](#delete-6)

Deletes a Story.

```
$story_id = 300';

$shortcut->delete('stories', $story_id);
```

Users
-----

[](#users)

### List

[](#list-5)

List Users returns information about users in the organization.

```
$users = $shortcut->get('users');
```

### Get

[](#get-6)

Returns information about a User.

```
$user_id = '4JDaa9k-29d3-40s2-a4dc-a9bsd29sc';

$user = $shortcut->get('users', $user_id);
```

Workflows
---------

[](#workflows)

### List

[](#list-6)

List Workflows returns a list containing the single Workflow in the organization and its attributes.

```
$workflows = $shortcut->get('workflows');
```

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity43

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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

Unknown

Total

1

Last Release

1013d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/1b933b83a0f33884792b043818c32e8e66cbad819e559dfb7382fb5b3257a17c?d=identicon)[mikkelson](/maintainers/mikkelson)

---

Top Contributors

[![mikkelson](https://avatars.githubusercontent.com/u/5843723?v=4)](https://github.com/mikkelson "mikkelson (4 commits)")

---

Tags

phpapirestshortcutclubhouse

### Embed Badge

![Health badge](/badges/mikkelson-shortcut-php/health.svg)

```
[![Health](https://phpackages.com/badges/mikkelson-shortcut-php/health.svg)](https://phpackages.com/packages/mikkelson-shortcut-php)
```

PHPackages © 2026

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