# List next-task offers

- **OpenAPI Version:** `3.2.0`
- **API Version:** `3.1.0`
- **Contact:** Syndai <https://syndai.ai>

## Contents

**Operations**

- [GET /api/v1/external/coding/backlog](#scalar-operation-get-apiv1externalcodingbacklog)

**Schemas**

- [BacklogOfferListResponse](#scalar-schema-backlogofferlistresponse)
- [BacklogOfferRead](#scalar-schema-backlogofferread)
- [CompileOfferFacts](#scalar-schema-compileofferfacts)
- [OfferLinkRead](#scalar-schema-offerlinkread)
- [SeoOfferFacts](#scalar-schema-seoofferfacts)
- [ProblemDetail](#scalar-schema-problemdetail)
- [ExternalErrorCode](#scalar-schema-externalerrorcode)

<a id="scalar-context-global-servers"></a>

## Servers

- **URL:** `https://api.syndai.ai`

<a id="scalar-context-global-authentication"></a>

## Authentication

- **CustomerApiKey**: HTTP bearer (`API Key`)

  Customer API key sent as a bearer token

## Tags

### Backlog

Work Syndai proposes for a repository: next-task offers and task groups you can add to the roadmap, edit, move to the top, start or dismiss. Viewing and dismissing is free; starting a task or group creates runs, which is billable work.

## Operations

<a id="scalar-operation-get-apiv1externalcodingbacklog"></a>

### List next-task offers

- **Method:** `GET`
- **Path:** `/api/v1/external/coding/backlog`
- **Operation ID:** `listBacklogOffers`
- **Tags:** Backlog

List the top open next-task offers on the tenant's active repositories: a completed run's own evidence-cited next steps (`suggested`, listed for 14 days), open pre-existing findings (`finding`), follow-up marks (`follow_up`) and evidence-backed Google search moves (`seo`, listed for 28 days after the weekly scan last re-saw them), bug-scan findings (`bug_scan`) and Project Home chat cards (`chat`, listed only to the signed-in person who asked for them; never to an API key). Pass `source` to list one source only (the SEO tab asks for `seo` so its moves are not crowded out by `limit`; `source=seo` lists Google moves only, each with its `seo` facts). `source` in the response is an open string: tolerate values you do not know. Ranked server-side by priority then recency, with at most one `finding` and one `bug_scan` unless fewer than `limit` other offers exist. Offers never run on their own: start one by sending its `id` as `backlog_task_id` on POST /runs. A group's parts are not listed here: GET /backlog/groups lists each group once.

**Servers:** [Inherited servers](#scalar-context-global-servers)

**Authentication:** [Global authentication](#scalar-context-global-authentication)

#### Query parameters

- **`customer_id`**: `string | null`, format: `uuid`
- **`coding_repository_id`**: `string | null`, format: `uuid`
- **`limit`**: `integer`, default: `3`, minimum: `1`, maximum: `20`
- **`source`**: `null | string`, possible values: `"suggested", "finding", "follow_up", "seo", "bug_scan", "chat", "goal", "roadmap", null`

#### Responses

##### 200 Request fulfilled, document follows

**Content type:** `application/json`

[BacklogOfferListResponse](#scalar-schema-backlogofferlistresponse)

<a id="scalar-example-1"></a>

**Generated example:**

```json
{
  "tasks": [
    {
      "accepted_at": "",
      "action": "",
      "added_by_syndai": false,
      "coding_repository_id": "",
      "compile": {
        "agent_month_usd": 1,
        "build_usd": 1,
        "fix_the_job": false,
        "goal_id": "",
        "payback_months": 1,
        "update_site_first": false
      },
      "created_at": "",
      "id": "",
      "link": {
        "anchor": "",
        "surface": ""
      },
      "price_label": "",
      "price_usd": "",
      "prompt": "",
      "reason": "",
      "repo_name": "",
      "seo": {
        "impressions": 1,
        "kind": "",
        "page": "",
        "queries": [
          ""
        ]
      },
      "source": "",
      "standing": "",
      "steps": [
        ""
      ],
      "synthesized": false,
      "title": ""
    }
  ]
}
```

##### 400, 401, 403, 404

- `400` Bad request syntax or unsupported method
- `401` Invalid or missing customer API key
- `403` Insufficient scope or forbidden customer access
- `404` Resource not found

**Content type:** `application/problem+json`

[ProblemDetail](#scalar-schema-problemdetail)

RFC 7807 problem detail returned for public CaaS errors.

<a id="scalar-example-2"></a>

**Generated example:**

```json
{
  "code": "BUDGET_EXHAUSTED",
  "detail": null,
  "existing_run_id": null,
  "instance": null,
  "status": 1,
  "title": "",
  "type": "about:blank",
  "additionalProperty": "anything"
}
```

##### 429 Rate limit exceeded

**Headers:**

- **`Retry-After`**

  Seconds to wait before retrying the request

  `integer`

**Content type:** `application/problem+json`

[ProblemDetail](#scalar-schema-problemdetail)

RFC 7807 problem detail returned for public CaaS errors.

[Generated example](#scalar-example-2)

##### default Unexpected error

**Content type:** `application/problem+json`

[ProblemDetail](#scalar-schema-problemdetail)

<a id="scalar-example-3"></a>

**Generated example:**

```json
null
```

## Schemas

<a id="scalar-schema-backlogofferlistresponse"></a>

### BacklogOfferListResponse

**Type:** `object`

- **`tasks` (required)**: array of [BacklogOfferRead](#scalar-schema-backlogofferread)

<a id="scalar-example-4"></a>

**Generated example:**

```json
{
  "tasks": [
    {
      "accepted_at": "",
      "action": "",
      "added_by_syndai": false,
      "coding_repository_id": "",
      "compile": {
        "agent_month_usd": 1,
        "build_usd": 1,
        "fix_the_job": false,
        "goal_id": "",
        "payback_months": 1,
        "update_site_first": false
      },
      "created_at": "",
      "id": "",
      "link": {
        "anchor": "",
        "surface": ""
      },
      "price_label": "",
      "price_usd": "",
      "prompt": "",
      "reason": "",
      "repo_name": "",
      "seo": {
        "impressions": 1,
        "kind": "",
        "page": "",
        "queries": [
          ""
        ]
      },
      "source": "",
      "standing": "",
      "steps": [
        ""
      ],
      "synthesized": false,
      "title": ""
    }
  ]
}
```

<a id="scalar-schema-backlogofferread"></a>

### BacklogOfferRead

**Type:** `object`

- **`coding_repository_id` (required)**: `string`, format: `uuid`
- **`created_at` (required)**: `string`, format: `date-time`
- **`id` (required)**: `string`, format: `uuid`
- **`prompt` (required)**: `string`
- **`repo_name` (required)**: `string`
- **`source` (required)**: `string`
- **`title` (required)**: `string`
- **`accepted_at`**: `string | null`, format: `date-time`
- **`action`**: `string | null`
- **`added_by_syndai`**: `boolean`, default: `false`
- **`compile`**: [CompileOfferFacts](#scalar-schema-compileofferfacts) | `null`
- **`link`**: [OfferLinkRead](#scalar-schema-offerlinkread) | `null`
- **`price_label`**: `string | null`
- **`price_usd`**: `string | null`
- **`reason`**: `string | null`
- **`seo`**: [SeoOfferFacts](#scalar-schema-seoofferfacts) | `null`
- **`standing`**: `string | null`
- **`steps`**: `array of string`
- **`synthesized`**: `boolean`, default: `false`

<a id="scalar-example-5"></a>

**Generated example:**

```json
{
  "accepted_at": "",
  "action": "",
  "added_by_syndai": false,
  "coding_repository_id": "",
  "compile": {
    "agent_month_usd": 1,
    "build_usd": 1,
    "fix_the_job": false,
    "goal_id": "",
    "payback_months": 1,
    "update_site_first": false
  },
  "created_at": "",
  "id": "",
  "link": {
    "anchor": "",
    "surface": ""
  },
  "price_label": "",
  "price_usd": "",
  "prompt": "",
  "reason": "",
  "repo_name": "",
  "seo": {
    "impressions": 1,
    "kind": "",
    "page": "",
    "queries": [
      ""
    ]
  },
  "source": "",
  "standing": "",
  "steps": [
    ""
  ],
  "synthesized": false,
  "title": ""
}
```

<a id="scalar-schema-compileofferfacts"></a>

### CompileOfferFacts

**Type:** `object`

- **`agent_month_usd` (required)**: `number`
- **`build_usd` (required)**: `number`
- **`goal_id` (required)**: `string`, format: `uuid`
- **`payback_months` (required)**: `integer`
- **`fix_the_job`**: `boolean`, default: `false`
- **`update_site_first`**: `boolean`, default: `false`

<a id="scalar-example-6"></a>

**Generated example:**

```json
{
  "agent_month_usd": 1,
  "build_usd": 1,
  "fix_the_job": false,
  "goal_id": "",
  "payback_months": 1,
  "update_site_first": false
}
```

<a id="scalar-schema-offerlinkread"></a>

### OfferLinkRead

**Type:** `object`

- **`surface` (required)**: `string`
- **`anchor`**: `string | null`

<a id="scalar-example-7"></a>

**Generated example:**

```json
{
  "anchor": "",
  "surface": ""
}
```

<a id="scalar-schema-seoofferfacts"></a>

### SeoOfferFacts

**Type:** `object`

- **`kind` (required)**: `string`
- **`queries` (required)**: `array of string`
- **`impressions`**: `integer | null`
- **`page`**: `string | null`

<a id="scalar-example-8"></a>

**Generated example:**

```json
{
  "impressions": 1,
  "kind": "",
  "page": "",
  "queries": [
    ""
  ]
}
```

<a id="scalar-schema-problemdetail"></a>

### ProblemDetail

**Type:** `object`

RFC 7807 problem detail returned for public CaaS errors.

- **`code` (required)**: `string`, possible values: `"BUDGET_EXHAUSTED", "QUOTA_EXCEEDED", "RUN_CONCURRENCY_LIMIT", "CUSTOMER_DISABLED", "REPO_NOT_BOUND", "IDEMPOTENCY_REPLAY", "CONFLICT", "MISSION_BUSY_RETRY", "HITL_REQUEST_CONFLICT", "HITL_REQUEST_SETTLED", "RUN_TERMINATED_BEFORE_RESPONSE", "INVALID_POLICY", "INVALID_SCOPE", "RATE_LIMITED", "INSTALLATION_INCOMPLETE", "SUBSCRIPTION_USAGE_UNAVAILABLE", "INVALID_TOKEN", "ROLE_REQUIRED", "PLAN_UPGRADE_REQUIRED", "EMAIL_MISMATCH", "EXPIRED_TOKEN", "NOT_FOUND", "OVERSCOPE_ACK_REQUIRED", "VERIFY_FAILED", "PUBLISH_IN_FLIGHT", "PUBLISH_UNSUPPORTED_REPO", "PUBLICATION_NOT_LIVE", "NO_APP_DATA", "FEATURE_REQUESTS_NEEDS_MEMBERS", "EMPTY_UPDATE", "BAD_CURSOR", "HUMAN_APPROVAL_REQUIRED", "PROTECTED_PATHS_MANAGED_ONLY", "RUN_IN_FLIGHT", "TEXT_EDIT_REFUSED", "CLI_UPGRADE_REQUIRED", "PRODUCTION_STEP_UP_REQUIRED", "PRICES_UPDATING", "GITHUB_UNAVAILABLE", "PUBLISH_NOT_SET_UP", "VERSION_NOT_DEPLOYED", "INTERNAL_ERROR"`

  Stable error codes surfaced to public CaaS clients.
- **`status` (required)**: `integer`
- **`title` (required)**: `string`
- **`detail`**: `string | null`, default: `null`
- **`existing_run_id`**: `string | null`, default: `null`
- **`instance`**: `string | null`, default: `null`
- **`type`**: `string`, default: `"about:blank"`

<a id="scalar-example-9"></a>

**Generated example:**

```json
{
  "code": "BUDGET_EXHAUSTED",
  "detail": null,
  "existing_run_id": null,
  "instance": null,
  "status": 1,
  "title": "",
  "type": "about:blank",
  "additionalProperty": "anything"
}
```

<a id="scalar-schema-externalerrorcode"></a>

### ExternalErrorCode

**Type:** `string`, possible values: `"BUDGET_EXHAUSTED", "QUOTA_EXCEEDED", "RUN_CONCURRENCY_LIMIT", "CUSTOMER_DISABLED", "REPO_NOT_BOUND", "IDEMPOTENCY_REPLAY", "CONFLICT", "MISSION_BUSY_RETRY", "HITL_REQUEST_CONFLICT", "HITL_REQUEST_SETTLED", "RUN_TERMINATED_BEFORE_RESPONSE", "INVALID_POLICY", "INVALID_SCOPE", "RATE_LIMITED", "INSTALLATION_INCOMPLETE", "SUBSCRIPTION_USAGE_UNAVAILABLE", "INVALID_TOKEN", "ROLE_REQUIRED", "PLAN_UPGRADE_REQUIRED", "EMAIL_MISMATCH", "EXPIRED_TOKEN", "NOT_FOUND", "OVERSCOPE_ACK_REQUIRED", "VERIFY_FAILED", "PUBLISH_IN_FLIGHT", "PUBLISH_UNSUPPORTED_REPO", "PUBLICATION_NOT_LIVE", "NO_APP_DATA", "FEATURE_REQUESTS_NEEDS_MEMBERS", "EMPTY_UPDATE", "BAD_CURSOR", "HUMAN_APPROVAL_REQUIRED", "PROTECTED_PATHS_MANAGED_ONLY", "RUN_IN_FLIGHT", "TEXT_EDIT_REFUSED", "CLI_UPGRADE_REQUIRED", "PRODUCTION_STEP_UP_REQUIRED", "PRICES_UPDATING", "GITHUB_UNAVAILABLE", "PUBLISH_NOT_SET_UP", "VERSION_NOT_DEPLOYED", "INTERNAL_ERROR"`

Stable error codes surfaced to public CaaS clients.
