# Follow-up Rules API

The Follow-up Rules API simplifies managing follow-up actions and configurations for effective workflow automation. This API allows users to create, retrieve, update, and delete follow-up rules, as well as manage configurations such as email aliases and time zones.<br>

For more detailed reference, visit the [FollowUpRobot API documentation](https://apirefs.aurinko.io/#tag/FollowUpRobot).

#### Creating a Follow-up Rule

***

To add a new follow-up rule, send a **`POST`** request to the <mark style="color:red;">`/v1/followup/rules`</mark> endpoint with a JSON payload containing the rule details.

**Request Example:**

```bash
curl -X POST https://api.yourdomain.com/v1/followup/rules \
-H "Authorization: Bearer <Access-Token>" \
-H "Content-Type: application/json" \
-d '{
    "name": "Follow-up for Leads",
    "expectThreadResponse": true,
    "templateBody": "Thank you for reaching out. We will follow up shortly.",
    "templateSubject": "Follow-up Confirmation",
    "actions": [
        {
            "intervalDays": 3,
            "message": "Reminder to respond to client."
        }
    ]
}'
```

#### Updating a Follow-up Rule

***

To update an existing follow-up rule, send a **`PUT`** request to the <mark style="color:red;">`/v1/followup/rules/{id}`</mark> endpoint, where <mark style="color:red;">`{id}`</mark> is the ID of the rule you want to update.

**Request Example:**

```bash
curl -X PUT https://api.yourdomain.com/v1/followup/rules/{id} \
-H "Authorization: Bearer <Access-Token>" \
-H "Content-Type: application/json" \
-d '{
    "name": "Updated Follow-up for Leads",
    "expectThreadResponse": false,
    "templateBody": "We appreciate your response. We will follow up shortly.",
    "templateSubject": "Follow-up Reminder",
    "actions": [
        {
            "intervalDays": 5,
            "message": "Final reminder to respond to client."
        }
    ]
}'
```

#### Getting Follow-up Rules

***

To retrieve all follow-up rules, send a **`GET`** request to the <mark style="color:red;">`/v1/followup/rules`</mark> endpoint.

**Request Example:**

```bash
curl -X GET https://api.yourdomain.com/v1/followup/rules \
-H "Authorization: Bearer <Access-Token>"
```

#### Deleting a Follow-up Rule

***

To delete an existing follow-up rule, send a **`DELETE`** request to the <mark style="color:red;">`/v1/followup/rules/{id}`</mark> endpoint, where <mark style="color:red;">`{id}`</mark> is the ID of the rule you wish to delete.

**Request Example:**

```bash
curl -X DELETE https://api.yourdomain.com/v1/followup/rules/{id} \
-H "Authorization: Bearer <Access-Token>"
```

#### Getting Follow-up Configuration

***

To retrieve the current follow-up configuration, send a **`GET`** request to the <mark style="color:red;">`/v1/followup/config`</mark> endpoint.

**Request Example:**

```bash
curl -X GET https://api.yourdomain.com/v1/followup/config \
-H "Authorization: Bearer <Access-Token>"
```

#### Updating Follow-up Configuration

***

To update the follow-up configuration, send a **`PUT`** request to the <mark style="color:red;">`/v1/followup/config`</mark> endpoint.

**Request Example:**

```bash
curl -X PUT https://api.yourdomain.com/v1/followup/config \
-H "Authorization: Bearer <Access-Token>" \
-H "Content-Type: application/json" \
-d '{
    "timezone": "America/New_York",
    "emailAliases": ["support@yourdomain.com", "info@yourdomain.com"]
}'
```

***


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.aurinko.io/unified-apis/follow-up-rules-api.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
