API Reference

# Get opportunity evidence

Read bounded opportunity product knowledge, source evidence, community rules, or conversation history. Targets are scoped to the opportunity.

Server URL`https://api.rankhog.com/`

POST

``/`agent`/`v1`/`opportunities`/`evidence`

Send

Authorization

Body

Read bounded opportunity product knowledge, source evidence, community rules, or conversation history. Targets are scoped to the opportunity. Uses cached rules and normal thread caching, never forced refresh. Community reads additionally require reddit:rules:read. Continue text with nextOffset; reset offset when following nextBeforeSeq. Cache policy: live. Idempotency: none. Auth modes: api\_key, mcp\_oauth, session\_bearer.

## [Authorization](/content/docs/api/reference/get_opportunity_evidence/index.html#authorization)

`apiKeyAuth`

AuthorizationBearer <token>

Rankhog organization API key sent as `Authorization: Bearer rhog_...`.

In: `header`

## [Request Body](/content/docs/api/reference/get_opportunity_evidence/index.html#request-body)

`application/json`

TypeScript Definitions

Use the request body type in TypeScript.

Copy

managedRedditAccountId?string\|null

Default`null`Length`1 <= length <= 160`

organizationId\*string

Length`1 <= length <= 160`

websiteId\*string

Length`1 <= length <= 160`

opportunityId\*string

Length`1 <= length <= 160`

section\*string

Value in`"product" | "source" | "community" | "conversation"`

offset?integer

Default`0`Range`0 <= value`

beforeSeq?integer

Range`0 < value`

## [Response Body](/content/docs/api/reference/get_opportunity_evidence/index.html#response-body)

### 200  `application/json`

### 400  `application/json`

### 401  `application/json`

### 402  `application/json`

### 403  `application/json`

### 404  `application/json`

### 500  `application/json`

cURL

JavaScript

Go

Python

Java

C#

```
curl -X POST "https://api.rankhog.com/agent/v1/opportunities/evidence" \
  -H "Authorization: Bearer " \
  -H "Content-Type: application/json" \
  -d '{
    "organizationId": "org_example",
    "websiteId": "site_example",
    "opportunityId": "opp_example",
    "section": "product"
  }'
```

200400401402403404500

```
{
  "section": "product",
  "status": "available",
  "provenance": "saved product knowledge",
  "text": "Name: SupportLeaf",
  "truncated": false,
  "nextOffset": null,
  "nextBeforeSeq": null
}
```

```
{
  "error": {
    "code": "agentic_invalid_input",
    "details": {
      "issues": [\
        {\
          "code": "invalid_type",\
          "message": "Expected string, received undefined.",\
          "path": [\
            "organizationId"\
          ]\
        }\
      ]
    },
    "message": "Request body did not match the agentic capability schema."
  }
}
```

### Missing authentication

```
{
  "error": {
    "code": "agentic_unauthorized",
    "message": "Authenticate before using Rankhog agentic capabilities."
  }
}
```

### Invalid API key

```
{
  "error": {
    "code": "agentic_paid_plan_required",
    "details": {
      "managedAccountBillingStatus": "active",
      "productId": "site_demo",
      "subscriptionStatus": "past_due"
    },
    "message": "This product has no active plan or trial yet. Call get_product_setup with productId site_demo: it gives the link where the person starts the 7-day trial. Never pay for them."
  }
}
```

### Missing OAuth scope

```
{
  "error": {
    "code": "agentic_missing_scope",
    "details": {
      "missingScopes": [\
        "rankhog:read"\
      ]
    },
    "message": "Missing required scope: rankhog:read."
  }
}
```

### API key organization mismatch

### Organization access denied

### Website access denied

### Managed account not found

```
{
  "error": {
    "code": "agentic_managed_account_not_found",
    "message": "Managed Reddit account not found."
  }
}
```

### Opportunity not found

```
{
  "error": {
    "code": "agentic_internal_error",
    "message": "Rankhog could not complete this agentic request."
  }
}
```

[Get the link to buy creditsPOST\\
\\
Return a Rankhog billing link for a human to buy credits. Requires a signed-in billing manager at checkout; never charges or changes billing.](/content/docs/api/reference/get_credit_purchase_link/index.html) [Get Agentic ActorPOST\\
\\
Return the authenticated Rankhog agentic actor, source, organization, and granted scopes.](/content/docs/api/reference/get_agentic_me/index.html)
