API Reference

# Choose the subreddit for a post

Move a post you started yourself to another community, until its first confirm.

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

POST

``/`agent`/`v1`/`growth`/`set-opportunity-target-subreddit`

Send

Authorization

Body

Move a post you started yourself to another community, until its first confirm. Works only on a post started from New or start\_conversation (a user-lane reddit\_post) that is not closed, has no confirmed draft and no queued or running send; edit the post first to take a confirmed one back. The draft text and revision stay as they are; the submit address is built from the new community at the next confirm. The same community again changes nothing. Never sends or rewrites the draft; an audit verdict from the old community is cleared, so run audit\_opportunity\_draft for the new one. Refused while a draft is being written. Cache policy: live. Idempotency: required. Auth modes: api\_key, mcp\_oauth, session\_bearer.

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

`apiKeyAuth`

AuthorizationBearer <token>

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

In: `header`

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

`application/json`

TypeScript Definitions

Use the request body type in TypeScript.

Copy

organizationId\*string

Length`1 <= length <= 160`

websiteId\*string

Length`1 <= length <= 160`

managedRedditAccountId\*string

Length`1 <= length <= 160`

redditAccountId?string

Length`1 <= length <= 160`

idempotencyKey\*string

Length`1 <= length <= 200`

opportunityId\*string

Length`1 <= length <= 160`

subreddit\*string

Length`1 <= length <= 60`

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

### 200  `application/json`

### 400  `application/json`

### 401  `application/json`

### 402  `application/json`

### 403  `application/json`

### 404  `application/json`

### 409  `application/json`

### 429  `application/json`

cURL

JavaScript

Go

Python

Java

C#

```
curl -X POST "https://api.rankhog.com/agent/v1/growth/set-opportunity-target-subreddit" \
  -H "Authorization: Bearer " \
  -H "Content-Type: application/json" \
  -d '{
    "organizationId": "org_demo",
    "websiteId": "site_demo",
    "managedRedditAccountId": "mra_demo",
    "idempotencyKey": "growth-request-1",
    "opportunityId": "opp_demo",
    "subreddit": "SaaS"
  }'
```

200400401402403404409429

```
{
  "changed": true,
  "opportunityId": "opp_demo",
  "plannedRedditActionId": "act_demo",
  "subreddit": "saas",
  "title": "Post in r/saas"
}
```

```
{
  "error": {
    "code": "agentic_invalid_input",
    "message": "Name the community like r/SaaS."
  }
}
```

```
{
  "error": {
    "code": "agentic_unauthorized",
    "message": "Authentication is required."
  }
}
```

```
{
  "error": {
    "code": "agentic_paid_plan_required",
    "message": "An active paid product is required."
  }
}
```

```
{
  "error": {
    "code": "agentic_missing_scope",
    "message": "The required permission has not been granted."
  }
}
```

```
{
  "error": {
    "code": "agentic_website_not_found",
    "message": "Product not found."
  }
}
```

### agentic\_post\_locked

```
{
  "error": {
    "code": "agentic_post_locked",
    "message": "This post is confirmed. Edit it to take it back, then change the community."
  }
}
```

### agentic\_idempotency\_conflict

```
{
  "error": {
    "code": "agentic_write_rate_limited",
    "message": "Growth mutations are limited to 120 per actor and organization per hour."
  }
}
```

[Choose the account for a cardPOST\\
\\
Select a granted eligible Reddit account without sending or rewriting the opportunity draft.](/content/docs/api/reference/set_opportunity_executor/index.html) [Get the drafting profilePOST\\
\\
Read the existing writing profile, the chosen Reddit humanizer level, the three built-in levels and the default prompts.](/content/docs/api/reference/get_draft_profile/index.html)
