---
title: Find posts saved by this work
url: /docs/developers/reference/social-editions-by-run
---

# Find posts saved by this work

`social.editions.by-run@1`

Find the posts a piece of work actually saved, including drafts kept when it stopped. Requires **Read social**, current edition access and the exact run-inspector binding on the same key. This read never starts writing, approves or publishes.

## Find drafts kept after stopping

Use the root run returned by Generate. The response lists saved editions only. Unknown, foreign or undisclosable runs return no editions; denied edition access refuses without a result. Work must fit within ten editions and Automations' finite lineage projection bound.

```curl tabs
# A new operationId for each new request; the same one to retry it.
curl https://api.growlocal.site/api/v1/profiles/YOUR_BUSINESS_ID/invocations \
  -H "Authorization: Bearer gl_YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "target": {
    "featureId": "YOUR_FEATURE_ID",
    "export": "editionsByRun",
    "contractRef": "social.editions.by-run@1"
  },
  "operationId": "saved-posts-1",
  "input": {
    "source": {
      "featureId": "juniper-cakes.automations",
      "runRef": "YOUR_ROOT_RUN_REFERENCE"
    }
  }
}'
```

```javascript tabs
// A new operationId for each new request; the same one to retry it.
const response = await fetch(
  "https://api.growlocal.site/api/v1/profiles/YOUR_BUSINESS_ID/invocations",
  {
    method: "POST",
    headers: {
      Authorization: "Bearer gl_YOUR_API_KEY",
      "Content-Type": "application/json",
    },
    body: JSON.stringify({
      "target": {
        "featureId": "YOUR_FEATURE_ID",
        "export": "editionsByRun",
        "contractRef": "social.editions.by-run@1"
      },
      "operationId": "saved-posts-1",
      "input": {
        "source": {
          "featureId": "juniper-cakes.automations",
          "runRef": "YOUR_ROOT_RUN_REFERENCE"
        }
      }
    }),
  },
);
const receipt = await response.json();
console.log(response.status, receipt);
```

```python tabs
import requests

# A new operationId for each new request; the same one to retry it.
response = requests.post(
    "https://api.growlocal.site/api/v1/profiles/YOUR_BUSINESS_ID/invocations",
    headers={"Authorization": "Bearer gl_YOUR_API_KEY"},
    json={
        "target": {
            "featureId": "YOUR_FEATURE_ID",
            "export": "editionsByRun",
            "contractRef": "social.editions.by-run@1",
        },
        "operationId": "saved-posts-1",
        "input": {
            "source": {
                "featureId": "juniper-cakes.automations",
                "runRef": "YOUR_ROOT_RUN_REFERENCE",
            },
        },
    },
    timeout=30,
)
print(response.status_code, response.json())
```

## Parameters

What goes in `input`:

| Name | Type | Required | Description |
|---|---|---|---|
| `source` | object | Yes | The root run returned when the work started. |
| `source.featureId` | string | Yes | The Automations feature that owns the run, not the Social feature. |
| `source.runRef` | string | Yes | The opaque root run reference. A child reference does not select its parent's work. |

## Response

A call that worked answers `200` with an `applied` receipt; its `output` holds these fields. `GET /catalog/social.editions.by-run@1` answers the complete shape as JSON Schema.

| Name | Type | Description |
|---|---|---|
| `editions` | array of object | Up to ten currently readable saved editions, oldest first; no total or inferred account failures. |
| `editions[].editionRef` | object | The saved edition to open with the edition read or editor. |
| `editions[].editionRef.businessProfileId` | string | The business that owns the edition. |
| `editions[].editionRef.featureId` | string | The edition's Data feature. |
| `editions[].editionRef.collectionId` | string | The editions table. |
| `editions[].editionRef.id` | string | The edition row id. |
| `editions[].editionRevision` | integer | The edition's current revision, including later edits. |
| `editions[].accountRef` | object | The account the edition was saved for. |
| `editions[].accountRef.businessProfileId` | string | The business that owns the account. |
| `editions[].accountRef.featureId` | string | The account's Data feature. |
| `editions[].accountRef.collectionId` | string | The accounts table. |
| `editions[].accountRef.id` | string | The account row id. |
| `editions[].platform` | one of `facebook`, `instagram`, `linkedin`, `x`, `tiktok`, `youtube`, `pinterest`, `threads`, `bluesky` | The edition's saved destination platform. |

```json title="Response"
{
  "status": "applied",
  "operationId": "saved-posts-1",
  "output": {
    "editions": [
      {
        "editionRef": {
          "businessProfileId": "YOUR_BUSINESS_ID",
          "featureId": "juniper-cakes.data",
          "collectionId": "juniper-cakes.editions",
          "id": "YOUR_EDITION_ID"
        },
        "editionRevision": 1,
        "accountRef": {
          "businessProfileId": "YOUR_BUSINESS_ID",
          "featureId": "juniper-cakes.data",
          "collectionId": "juniper-cakes.social-accounts",
          "id": "YOUR_ACCOUNT_ID"
        },
        "platform": "facebook"
      }
    ]
  }
}
```

## Errors

It reads and changes nothing. Besides the answers every request can get ([Errors](../errors.md)), its receipt can say:

| Status | HTTP | What it means |
|---|---|---|
| `rejected` | 400, or 403 when it's a matter of access | Not done. `diagnostics` says why: each has a `code`, a `path` into what you sent and a `message`. |

The codes in `diagnostics` you're most likely to see:

| Code | Status | What it means |
|---|---|---|
| `DATA.POLICY_DENIED` | `rejected` | Current policy does not permit reading the editions; no result or count is disclosed. |
