---
title: "Test a comment automation"
method: POST
path: "/comment-automations/{id}/test"
tags: ["Comment automations"]
---

# Test a comment automation

`POST /comment-automations/{id}/test`

## Request

- Base URL: `https://api.rizamo.com/v1`
- URL: `https://api.rizamo.com/v1/comment-automations/{id}/test`
- Auth: HTTP bearer

Whether a comment with this text would trigger it, and the messages it would send, with their Rizamo links: each as its text and its button (the link, or the follow gate's reply button). Nothing is sent or recorded. Whether the person already got it, follows the account or is within Meta's windows is only known for real comments.

## Path parameters

- `id` string, required: The comment automation's id (`cauto_`).

## Headers

- `Idempotency-Key` string

## Request body

- object
  - `text` string, required: A sample comment.

## Response `200`

OK

- CommentAutomationTest
  - `triggers` boolean, required
  - `reason` string, required: Why it would or would not answer, in a sentence.
  - `keyword` string, nullable, required: The keyword that matched.
  - `privateReply` object, nullable, required: The first private reply, as it would go out: the message with its Rizamo links, or the follow gate's ask.
    - `text` string, required
    - `button` object, nullable, required: One button inside the message, under the text. Null for text alone.
      - `title` string, required
      - `url` string, nullable, required: Where it opens: the Rizamo link, or the address while clicks are not counted. Null for the follow gate's button, whose tap sends its title as their reply.
  - `afterFollow` object, nullable, required: Follow gate: the message sent once they reply as a follower.
    - `text` string, required
    - `button` object, nullable, required: One button inside the message, under the text. Null for text alone.
      - `title` string, required
      - `url` string, nullable, required: Where it opens: the Rizamo link, or the address while clicks are not counted. Null for the follow gate's button, whose tap sends its title as their reply.
  - `reminder` object, nullable, required: Follow gate: sent once if they reply without following.
    - `text` string, required
    - `button` object, nullable, required: One button inside the message, under the text. Null for text alone.
      - `title` string, required
      - `url` string, nullable, required: Where it opens: the Rizamo link, or the address while clicks are not counted. Null for the follow gate's button, whose tap sends its title as their reply.
  - `publicReplies` string[], required: One of these is posted under the comment, at random, after the private reply.
  - `markDone` boolean, required

## Other responses

- `400`: `invalid_request`: A field is missing or wrong, or the request cannot be done as asked: the message names the field or says what to change.
- `401`: `unauthorized`: No API key or sign-in, or the key does not work: it was deleted, or it expired.
- `403`: `forbidden`: The caller may not do this: the key or agent lacks the scope (the message names it), or the action needs another role or a fresh sign-in.
- `404`: `not_found`: No such object, or it is outside your team or the profiles your key reaches.
- `409`: `conflict`: The object's state does not allow it now, such as an account that needs a new login. `queue_empty`: A post with `queue: true` whose profile has no posting times: set them, or give a `scheduledAt`. `queue_full`: No posting time free for the post's accounts in the next 90 days: add times, or give a `scheduledAt`. `idempotency_key_in_use`: A request with this `Idempotency-Key` is still running: try again in a moment.
- `413`: `payload_too_large`: The body is over 1 MB: files go up through the upload links of `POST /v1/media`.
- `415`: `unsupported_media_type`: The body is not JSON: send it with `Content-Type: application/json`.
- `422`: `capability_missing`: The account cannot do this: see its `capabilities`. `idempotency_key_reused`: This `Idempotency-Key` was used for a different request in the last 24 hours: send a new key.
- `429`: `rate_limited`: Over one of Rizamo's limits, or a network asked Rizamo to slow down: wait for `Retry-After` seconds, or as long as the message says.
- `500`: `internal`: Our side failed: retry, and send the `requestId` if it keeps failing.
- `503`: `timeout`: The request took too long to work out, most often a report: try again in a moment, or ask a report for a shorter period or one profile.

---

[API](https://skmtc.dev/rizamo/apis/rizamo-api.md) - [All operations](https://skmtc.dev/rizamo/apis/rizamo-api/llms.txt) - [OpenAPI document](https://skmtc.dev/rizamo/apis/rizamo-api/revisions/31b0c1b1ffb5?raw)
