---
title: "Create a new predefined action"
description: "POST /predefined_actions — Creates a predefined action template. text (max 140 characters) and days are required; text can embed placeholders like [first name] that are substituted when the action is applied to a contact."
canonical_url: https://developer.onepagecrm.com/api/reference/predefined-actions/post-predefined_actions/
source: Markdown mirror of https://developer.onepagecrm.com/api/reference/predefined-actions/post-predefined_actions/
---

`POST /predefined_actions`

Creates a predefined action template. text (max 140 characters) and days are required; text can embed placeholders like [first name] that are substituted when the action is applied to a contact.

Resource: [Predefined Actions](https://developer.onepagecrm.com/api/reference/predefined-actions/) · [API Reference](https://developer.onepagecrm.com/api/reference/)

## Request

```bash
curl -X POST "https://app.onepagecrm.com/api/v3/predefined_actions" \
  -u $user_id:$api_key \
  -H "Content-Type: application/json" \
  -d '{
    "id": "5acddaa7d556733c507ff405",
    "text": "#1 Email [firstname] introducing our organization",
    "days": 4
  }'
```

Authentication is HTTP Basic — `user_id` as username, `api_key` as password.
See https://developer.onepagecrm.com/api/authentication/.

## Request body

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | string (bson-id) |  | ID of the predefined action |
| `text` | string | yes | Description text of the predefined action |
| `days` | integer (int32) | yes | Suggested number of days until the action becomes due |

## Responses

### 201

Created

```json
{
  "status": 0,
  "message": "OK",
  "timestamp": 1528373119,
  "data": {
    "predefined_action": {
      "id": "5acddaa7d556733c507ff405",
      "text": "#1 Email [firstname] introducing our organization",
      "days": 4
    }
  }
}
```

Standard error responses: 400, 401, 403, 404, 409, 500 — shared across the API. See https://developer.onepagecrm.com/api/errors/.

## Related guides

- [Authentication](https://developer.onepagecrm.com/api/authentication/)
- [Errors](https://developer.onepagecrm.com/api/errors/)
- [Rate limits](https://developer.onepagecrm.com/api/rate-limits/)
