> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tryhellosearch.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Decide on an opportunity

> Accept, counter-offer or decline an opportunity that awaits your answer, with the effects of the buttons of the portal. Possible while `available_actions` is not empty. Sending the same decision twice in a row never decides twice; once a new proposal follows a counter-offer, a decision applies to it, so read the opportunity before deciding.

Your answer to an opportunity that awaits it, with the same effects as the buttons on its page in the portal:

| `decision` | What happens | `status_label` afterwards | `stage.key` |
| - | - | - | - |
| `accept` | the content work starts | `Content creation` | `content_creation` |
| `counter_offer` | your terms go to the HelloSearch team | `Your counter-offer sent` | `proposition` |
| `decline` | the opportunity closes, nothing is owed for it | `You passed` | `declined` |

The portal then shows the decision as made `via the API (key “name”)`, with the name of your key.

> [!WARNING]
>
> A decision is real, exactly as a press on the portal: an acceptance starts the work on the mention, which you pay once it is live. Decide from a script only on rules you trust, and from an assistant only after a person confirmed it.

```bash theme={null}
curl -s -X POST "https://app.tryhellosearch.com/api/v1/opportunities/4b1d2f9e-7c3a-4e8b-9a61-2f0d8c5e7b13/decision" \
  -H "Authorization: Bearer $HELLOSEARCH_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "decision": "counter_offer", "terms": "We can do $200 with a do-follow link." }'
```

## When it is possible

While `available_actions` of [Get an opportunity](https://docs.tryhellosearch.com/api-reference/get-opportunity.md) is not empty. The answer is the opportunity as it now stands, the same shape as that route.

## Safe to retry

Sending the same decision twice in a row never decides twice: the second call answers `409 not_awaiting_decision` and changes nothing; so does a decision on an opportunity already answered on the portal or on Slack, or taken back by us. Read the opportunity to see where it stands.

The guard is the opportunity's state, not the request: after a counter-offer of yours, we may come back with a new proposal, and a decision sent then applies to it. Do not replay an old decision later on; read the opportunity, then decide.

A counter-offer leaves `decision` at `null`: the question is ours to answer, and a new proposal may follow.


## OpenAPI

````yaml POST /opportunities/{id}/decision
openapi: 3.1.0
info:
  title: HelloSearch API
  version: '1'
  description: >-
    Your HelloSearch figures and opportunities, as your portal shows them. Every
    route reads the same data as the portal.
servers:
  - url: https://app.tryhellosearch.com/api/v1
security:
  - accessKey: []
paths:
  /opportunities/{id}/decision:
    post:
      summary: Decide on an opportunity
      description: >-
        Accept, counter-offer or decline an opportunity that awaits your answer,
        with the effects of the buttons of the portal. Possible while
        `available_actions` is not empty. Sending the same decision twice in a
        row never decides twice; once a new proposal follows a counter-offer, a
        decision applies to it, so read the opportunity before deciding.
      operationId: decideOpportunity
      parameters:
        - $ref: '#/components/parameters/OpportunityId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DecisionRequest'
            examples:
              accept:
                summary: Accept
                value:
                  decision: accept
              counter_offer:
                summary: Counter-offer
                value:
                  decision: counter_offer
                  terms: We can do $200 with a do-follow link.
              decline:
                summary: Decline
                value:
                  decision: decline
      responses:
        '200':
          description: The decision is recorded; the opportunity as it now stands.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OpportunityDetail'
        '400':
          description: '`invalid_body` or `invalid_parameter`.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error:
                  code: invalid_parameter
                  message: 'terms: …'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          description: The opportunity no longer awaits your answer. Nothing was changed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error:
                  code: not_awaiting_decision
                  message: …
components:
  parameters:
    OpportunityId:
      name: id
      in: path
      required: true
      description: The opportunity's id, as the list gives it.
      schema:
        type: string
        example: 4b1d2f9e-7c3a-4e8b-9a61-2f0d8c5e7b13
  schemas:
    DecisionRequest:
      type: object
      required:
        - decision
      properties:
        decision:
          type: string
          enum:
            - accept
            - counter_offer
            - decline
        terms:
          type: string
          maxLength: 2000
          description: >-
            Required with `counter_offer`, ignored otherwise. Your terms in your
            own words, spaces trimmed at both ends, then 2,000 characters at
            most; they reach the HelloSearch team as written.
    OpportunityDetail:
      type: object
      required:
        - id
        - title
        - site
        - format
        - offer
        - stage
        - status_label
        - awaiting_your_decision
        - available_actions
        - decision_due
        - price
        - brief
        - article
        - live_url
        - published_at
        - progress
        - decision
        - history
        - content
        - next_moves
      properties:
        id:
          type: string
        title:
          type: string
          description: The article's title once known, else the site's name.
        site:
          type: object
          properties:
            domain:
              type: string
            name:
              type: string
            url:
              type: string
              format: uri
            indicators:
              type: array
              items:
                type: object
                properties:
                  key:
                    type: string
                    enum:
                      - retrievals
                      - estimated_page_traffic
                  label:
                    type: string
                  value:
                    type:
                      - number
                      - 'null'
                    description: '`null` when nothing was measured, never a zero.'
                  display:
                    type: string
                  description:
                    type: string
        format:
          $ref: '#/components/schemas/Format'
        offer:
          type: object
          properties:
            title:
              type: string
            description:
              type: string
        stage:
          $ref: '#/components/schemas/Stage'
        status_label:
          type: string
        awaiting_your_decision:
          type: boolean
        available_actions:
          type: array
          description: What you may do now; empty when nothing is yours to decide.
          items:
            type: string
            enum:
              - accept
              - counter_offer
              - decline
        decision_due:
          type:
            - object
            - 'null'
          properties:
            caption:
              type: string
              example: Due Nov 22, 2026
            late:
              type: boolean
        price:
          allOf:
            - $ref: '#/components/schemas/Money'
            - type: object
              properties:
                breakdown:
                  type: array
                  items:
                    type: object
                    properties:
                      label:
                        type: string
                        example: HelloSearch fee
                      value:
                        type: string
                        example: $300
                not_included:
                  type: array
                  items:
                    type: string
        brief:
          type:
            - object
            - 'null'
          properties:
            target_keyword:
              type:
                - string
                - 'null'
            link_anchor:
              type:
                - string
                - 'null'
        article:
          type:
            - object
            - 'null'
          properties:
            url:
              type: string
              format: uri
            label:
              type: string
        live_url:
          type:
            - string
            - 'null'
          format: uri
        published_at:
          type:
            - string
            - 'null'
          format: date-time
        progress:
          type: object
          properties:
            caption:
              type: string
              example: Step 1 of 4
            current_step:
              type:
                - string
                - 'null'
            steps:
              type: array
              items:
                type: object
                properties:
                  label:
                    type: string
                  state:
                    type: string
                    enum:
                      - done
                      - current
                      - ahead
                  at:
                    type:
                      - string
                      - 'null'
                    format: date-time
        decision:
          type:
            - object
            - 'null'
          properties:
            kind:
              type: string
              enum:
                - accepted
                - passed
                - closed
            at:
              type: string
              format: date-time
            by:
              type: string
              example: via the API (key “Zapier”)
        history:
          type: array
          description: Newest first.
          items:
            type: object
            properties:
              status_label:
                type: string
              by:
                type: string
              at:
                type: string
                format: date-time
              note:
                type:
                  - string
                  - 'null'
                description: >-
                  Your own words, such as a counter-offer's terms, or, for a
                  decision pressed on Slack, who pressed it.
        content:
          type:
            - object
            - 'null'
          properties:
            versions:
              type: array
              items:
                type: object
                properties:
                  id:
                    type: string
                  label:
                    type: string
                  author:
                    type: string
                  submitted_at:
                    type: string
                    format: date-time
                  verdict_label:
                    type: string
                  verdict_reason:
                    type:
                      - string
                      - 'null'
                  body:
                    type: string
                  backlinks:
                    type: array
                    items:
                      type: object
                      properties:
                        anchor:
                          type: string
                        destination_url:
                          type: string
                          format: uri
        next_moves:
          type: array
          items:
            type: object
            properties:
              party:
                type: string
                enum:
                  - client
                  - hellosearch
              label:
                type: string
              due:
                type: string
              late:
                type: boolean
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
              enum:
                - unauthorized
                - invalid_body
                - invalid_parameter
                - not_found
                - not_awaiting_decision
              description: Stable, meant for a program.
            message:
              type: string
              description: Meant for a person; may change.
    Format:
      type: object
      properties:
        key:
          type: string
          enum:
            - link_insert
            - guest_post
        label:
          type: string
          example: Guest post
    Stage:
      type: object
      properties:
        key:
          type: string
          enum:
            - proposition
            - content_creation
            - deal_placement
            - live
            - declined
        label:
          type: string
          example: Proposition
    Money:
      type: object
      required:
        - amount
        - currency
        - display
      properties:
        amount:
          type: integer
          description: Whole US dollars.
          example: 300
        currency:
          type: string
          enum:
            - USD
        display:
          type: string
          example: $300
  responses:
    Unauthorized:
      description: No valid access key.
      headers:
        WWW-Authenticate:
          schema:
            type: string
            example: Bearer realm="HelloSearch API"
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: unauthorized
              message: A valid access key is required. …
    NotFound:
      description: No opportunity of your account has this id.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: not_found
              message: …
  securitySchemes:
    accessKey:
      type: http
      scheme: bearer
      description: >-
        An access key from your portal, under Settings > Access keys. It starts
        with `hs_live_`.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.