# Visitor answers

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

## Contents

**Operations**

- [GET /api/v1/coding/repos/{repository\_id}/visitor-answers](#scalar-operation-get-apiv1codingreposrepository-idvisitor-answers)

**Schemas**

- [VisitorAnswersRead](#scalar-schema-visitoranswersread)
- [VisitorHelpRead](#scalar-schema-visitorhelpread)
- [VisitorFoundAnswer](#scalar-schema-visitorfoundanswer)
- [VisitorHelpGap](#scalar-schema-visitorhelpgap)
- [VisitorPageHelp](#scalar-schema-visitorpagehelp)
- [VisitorHelpStopped](#scalar-schema-visitorhelpstopped)
- [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

### Sites

Beta: may change without notice. Websites connected for search and AI visibility: connect a site, link it to Google Search Console, read its SEO tab, show or hide it on Google, and run a priced Ask AI check of how assistants answer about it.

## Operations

<a id="scalar-operation-get-apiv1codingreposrepository-idvisitor-answers"></a>

### Visitor answers

- **Method:** `GET`
- **Path:** `/api/v1/coding/repos/{repository_id}/visitor-answers`
- **Operation ID:** `getVisitorAnswers`
- **Tags:** Sites

Whether the site's agent answers visitors' questions, and this month's answers, spend and cap. Any member reads it.

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

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

#### Path parameters

- **`repository_id` (required)**: `string`, format: `uuid`

#### Responses

##### 200 Request fulfilled, document follows

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

[VisitorAnswersRead](#scalar-schema-visitoranswersread)

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

**Generated example:**

```json
{
  "answered_now": 0,
  "answers_this_month": 1,
  "asked_now": 0,
  "assumed_no": 0,
  "assumed_yes": 0,
  "capped_until": "",
  "disclosed": true,
  "enabled": true,
  "help": {
    "edited_at": "",
    "found": [
      {
        "answer": "",
        "found_at": "",
        "question": "",
        "sha": "",
        "sources": [
          ""
        ],
        "waiting": 1
      }
    ],
    "found_auto": true,
    "gaps": [
      {
        "after_fix": false,
        "asks": 1,
        "fix": "",
        "key": "",
        "langs": [
          ""
        ],
        "question": "",
        "task": "",
        "threads": 0
      }
    ],
    "generated_at": "",
    "page_help": [
      {
        "last_seen": "",
        "sha": "",
        "text": ""
      }
    ],
    "questions_disclosed": true,
    "setup": "",
    "stopped": [
      {
        "key": "",
        "question": ""
      }
    ],
    "text": ""
  },
  "hosting": "syndai",
  "monthly_cap_usd": 1,
  "pending_reason": "",
  "solved_no": 0,
  "solved_yes": 0,
  "spent_usd": 1,
  "state": "off"
}
```

##### 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-visitoranswersread"></a>

### VisitorAnswersRead

**Type:** `object`

- **`answers_this_month` (required)**: `integer`
- **`disclosed` (required)**: `boolean`
- **`enabled` (required)**: `boolean`
- **`monthly_cap_usd` (required)**: `number`
- **`spent_usd` (required)**: `number`
- **`state` (required)**: `string`, possible values: `"off", "refreshing_legal", "on", "capped"`
- **`answered_now`**: `integer`, default: `0`
- **`asked_now`**: `integer`, default: `0`
- **`assumed_no`**: `integer`, default: `0`
- **`assumed_yes`**: `integer`, default: `0`
- **`capped_until`**: `string | null`
- **`help`**: [VisitorHelpRead](#scalar-schema-visitorhelpread) | `null`
- **`hosting`**: `string`, default: `"syndai"`
- **`pending_reason`**: `string | null`
- **`solved_no`**: `integer`, default: `0`
- **`solved_yes`**: `integer`, default: `0`

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

**Generated example:**

```json
{
  "answered_now": 0,
  "answers_this_month": 1,
  "asked_now": 0,
  "assumed_no": 0,
  "assumed_yes": 0,
  "capped_until": "",
  "disclosed": true,
  "enabled": true,
  "help": {
    "edited_at": "",
    "found": [
      {
        "answer": "",
        "found_at": "",
        "question": "",
        "sha": "",
        "sources": [
          ""
        ],
        "waiting": 1
      }
    ],
    "found_auto": true,
    "gaps": [
      {
        "after_fix": false,
        "asks": 1,
        "fix": "",
        "key": "",
        "langs": [
          ""
        ],
        "question": "",
        "task": "",
        "threads": 0
      }
    ],
    "generated_at": "",
    "page_help": [
      {
        "last_seen": "",
        "sha": "",
        "text": ""
      }
    ],
    "questions_disclosed": true,
    "setup": "",
    "stopped": [
      {
        "key": "",
        "question": ""
      }
    ],
    "text": ""
  },
  "hosting": "syndai",
  "monthly_cap_usd": 1,
  "pending_reason": "",
  "solved_no": 0,
  "solved_yes": 0,
  "spent_usd": 1,
  "state": "off"
}
```

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

### VisitorHelpRead

**Type:** `object`

- **`gaps` (required)**: array of [VisitorHelpGap](#scalar-schema-visitorhelpgap)
- **`questions_disclosed` (required)**: `boolean`
- **`edited_at`**: `string | null`
- **`found`**: array of [VisitorFoundAnswer](#scalar-schema-visitorfoundanswer)
- **`found_auto`**: `boolean`, default: `true`
- **`generated_at`**: `string | null`
- **`page_help`**: array of [VisitorPageHelp](#scalar-schema-visitorpagehelp)
- **`setup`**: `string | null`
- **`stopped`**: array of [VisitorHelpStopped](#scalar-schema-visitorhelpstopped)
- **`text`**: `string | null`

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

**Generated example:**

```json
{
  "edited_at": "",
  "found": [
    {
      "answer": "",
      "found_at": "",
      "question": "",
      "sha": "",
      "sources": [
        ""
      ],
      "waiting": 1
    }
  ],
  "found_auto": true,
  "gaps": [
    {
      "after_fix": false,
      "asks": 1,
      "fix": "",
      "key": "",
      "langs": [
        ""
      ],
      "question": "",
      "task": "",
      "threads": 0
    }
  ],
  "generated_at": "",
  "page_help": [
    {
      "last_seen": "",
      "sha": "",
      "text": ""
    }
  ],
  "questions_disclosed": true,
  "setup": "",
  "stopped": [
    {
      "key": "",
      "question": ""
    }
  ],
  "text": ""
}
```

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

### VisitorFoundAnswer

**Type:** `object`

- **`answer` (required)**: `string`
- **`found_at` (required)**: `string`
- **`question` (required)**: `string`
- **`sha` (required)**: `string`
- **`sources` (required)**: `array of string`
- **`waiting` (required)**: `integer`

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

**Generated example:**

```json
{
  "answer": "",
  "found_at": "",
  "question": "",
  "sha": "",
  "sources": [
    ""
  ],
  "waiting": 1
}
```

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

### VisitorHelpGap

**Type:** `object`

- **`asks` (required)**: `integer`
- **`fix` (required)**: `string`
- **`key` (required)**: `string`
- **`question` (required)**: `string`
- **`after_fix`**: `boolean`, default: `false`
- **`langs`**: `array of string`
- **`task`**: `string | null`
- **`threads`**: `integer`, default: `0`

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

**Generated example:**

```json
{
  "after_fix": false,
  "asks": 1,
  "fix": "",
  "key": "",
  "langs": [
    ""
  ],
  "question": "",
  "task": "",
  "threads": 0
}
```

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

### VisitorPageHelp

**Type:** `object`

- **`last_seen` (required)**: `string`
- **`sha` (required)**: `string`
- **`text` (required)**: `string`

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

**Generated example:**

```json
{
  "last_seen": "",
  "sha": "",
  "text": ""
}
```

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

### VisitorHelpStopped

**Type:** `object`

- **`key` (required)**: `string`
- **`question` (required)**: `string`

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

**Generated example:**

```json
{
  "key": "",
  "question": ""
}
```

<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", "INSUFFICIENT_CREDITS", "RUN_CONCURRENCY_LIMIT", "CUSTOMER_DISABLED", "REPO_NOT_BOUND", "REPO_ARCHIVED", "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", "PUBLISH_TAG_EXISTS", "PUBLISH_VERSION_EXISTS", "VERSION_NOT_DEPLOYED", "DATA_REFUSED", "HARNESS_MODEL_UNSUPPORTED", "ECONOMY_CONFLICTS_WITH_MODEL", "HARNESS_UNKNOWN", "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-10"></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", "INSUFFICIENT_CREDITS", "RUN_CONCURRENCY_LIMIT", "CUSTOMER_DISABLED", "REPO_NOT_BOUND", "REPO_ARCHIVED", "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", "PUBLISH_TAG_EXISTS", "PUBLISH_VERSION_EXISTS", "VERSION_NOT_DEPLOYED", "DATA_REFUSED", "HARNESS_MODEL_UNSUPPORTED", "ECONOMY_CONFLICTS_WITH_MODEL", "HARNESS_UNKNOWN", "INTERNAL_ERROR"`

Stable error codes surfaced to public CaaS clients.
