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

# Create ProposedAction

> Create a new ProposedAction record.

A ProposedAction is an AI-generated recommendation waiting in the operator AI Inbox, produced when one of the proactive agents spots an opportunity such as an overdue invoice, an expiring contract, a run of support tickets, a spike in one issue category or a gap in the FAQ. Each one carries a drafted message or an internal alert, a confidence score and a review deadline. Records are created by the proactive agents, never by hand, and cannot be deleted. Fields such as the drafted subject and body, the delivery channel and the review notes may be edited before the action goes out. Its lifecycle, however, is driven by the review operations: use the approve and reject commands (PROPOSEDACTION\_APPROVE, PROPOSEDACTION\_REJECT), which also deliver the message, rather than writing Status directly — setting Status by hand marks an action as handled without ever sending it. Which agents run and how they behave is configured through ProactiveActionConfig.

## Authentication

> [!NOTE]
>
> This endpoint requires OAuth2 authentication. Include a valid bearer token in the `Authorization` header.
> The authenticated user must be a full unrestricted administrator or have the **`ProposedAction-Create`** role.

## Enums

> [accordion] eProposedActionType — ActionType values
>
> | Value | Name |
> | - | - |
> | 1 | DraftMessage |
> | 2 | VoiceOutreach |
> | 3 | InternalNote |
> | 4 | TaskReminder |

> [accordion] eOutboundChannel — Channel values
>
> | Value | Name |
> | - | - |
> | 1 | Email |
> | 2 | Voice |
> | 3 | CoworkerMessage |
> | 4 | HelpDesk |
> | 5 | WhatsApp |

> [accordion] eProposedActionPriority — Priority values
>
> | Value | Name |
> | - | - |
> | 1 | Low |
> | 2 | Medium |
> | 3 | High |
> | 4 | Critical |

> [accordion] eProposedActionStatus — Status values
>
> | Value | Name |
> | - | - |
> | 1 | Pending |
> | 2 | Approved |
> | 3 | Rejected |
> | 4 | Expired |
> | 5 | AutoExecuted |
> | 6 | Snoozed |
> | 7 | Deferred |
> | 8 | AwaitingReply |

> [accordion] eHelpDeskMessagePriority
>
> | Value | Name |
> | - | - |
> | 1 | Low |
> | 2 | Normal |
> | 3 | High |
> | 4 | Critical |

## Request Body

### Required Fields

**BusinessId** `integer` *required*

ID of the location that owns this proposed action. Set from the location whose agents produced it..

**CriteriaType** `string` *required*

Identifier of the agent that produced this action, matching a criteria evaluator name such as DueInvoiceCriteria, ContractExpiryCriteria, SupportPatternCriteria, SupportIssueCategoryCriteria or MissingFaqCriteria. Behaviour for each is configured through ProactiveActionConfig..

**ActionType** `integer` *required*

What the action does once approved: DraftMessage sends a composed message to the customer, VoiceOutreach places an AI call, InternalNote raises an operator-only alert with no customer contact, TaskReminder records a follow-up. InternalNote actions have no customer target and no delivery channel..

**Channel** `integer` *required*

How an approved action reaches the customer: Email for an AI-tracked email conversation, Voice for an outbound AI call, CoworkerMessage for a message sent from a connected email account, HelpDesk to raise a ticket, or WhatsApp. Operators can change the channel at approval time. Ignored for InternalNote actions..

**Confidence** `number` *required*

AI confidence in this recommendation, on a 0.0–1.0 scale (not a percentage). When the matching ProactiveActionConfig enables auto-execution, an action at or above its AutoExecuteMinConfidence skips the review inbox..

**Priority** `integer` *required*

Urgency assigned by the agent that raised the action: Low, Medium, High or Critical. Drives inbox ordering and the urgency indicator; it does not change delivery behaviour..

**Status** `integer` *required*

Where the action sits in its lifecycle: Pending awaits review; Snoozed is hidden until its wake time; Approved has been accepted for delivery; AutoExecuted was sent without review because confidence cleared the configured threshold; Deferred is approved but waiting for the recipient's next calling window; AwaitingReply has sent a WhatsApp opt-in template and is waiting on the customer; Rejected was dismissed; Expired passed its review deadline unattended. Change it through the approve, reject and snooze operations rather than by writing this field..

**DeferralCount** `integer` *required*

Number of times delivery has been postponed for calling hours. Counts up from zero and helps spot actions that keep missing their window\..

### Optional Fields

**CoworkerId** `integer`

ID of the customer this action targets. Empty for internal alerts and for leads that have no customer record yet..

**AiChannelSessionId** `integer`

ID of the AI conversation that triggered this action. Only set for criteria that evaluate conversations, such as unanswered-question and dormant-lead detection..

**DraftSubject** `string`

AI-composed subject line for the proposed message. Operators may edit it before approving; for internal alerts it doubles as the alert headline..

**DraftBody** `string`

AI-composed message body, call script, or — for internal alerts — the alert text itself. Operators may edit it before approving..

**ReviewedById** `integer`

ID of the operator who last reviewed this action. Empty while it is still awaiting review or when the system expired it unattended..

**ReviewedOn** `string`

UTC time an operator last approved, rejected or snoozed this action..

**ReviewNotes** `string`

Notes recorded when an operator approves, rejects or snoozes the action. The system also appends here when it expires an action, for example because no calling window was available..

**ExecutedOn** `string`

UTC time the approved action was actually delivered or the outbound call placed. Empty while the action is still queued or deferred..

**OutcomeSessionId** `integer`

ID of the AI conversation created when this action was delivered. Use it to follow the reply thread, escalated tickets and messages that came out of the outreach..

**ExpiresOn** `string`

UTC review deadline, defaulting to three days after the action is created. A Pending action past this point is moved to Expired; for a Snoozed action this instead holds the wake time set by the snooze duration..

**DeduplicationKey** `string`

Read-only key that prevents duplicate proposals for the same trigger, shaped as "criteria-type:\{identifier}:\{tier}" (for example "invoice:123:reminder:1"). A new proposal is suppressed while a non-expired action with the same key exists inside the criteria's cooldown window\..

**ScheduledExecutionTime** `string`

UTC time a Deferred action becomes due, set automatically to the recipient's next calling window when approval lands outside permitted outbound hours..

**DeferralReason** `string`

System-written explanation of why delivery was postponed, recorded when an approved action falls outside the recipient's permitted calling hours..

**EmailAccountId** `integer`

ID of the connected email account used as the sender when an approved action goes out over the CoworkerMessage channel. Empty means the location's default outgoing mail settings are used and customer replies are not tracked back into the AI conversation..

**InternalNotes** `string`

Internal context carried onto the help desk ticket created when a HelpDesk-channel action is approved. Visible to operators only, never to the customer..

**HelpDeskDepartmentId** `integer`

ID of the help desk department the ticket is filed under when a HelpDesk-channel action is approved. Empty leaves the ticket unassigned..

**HelpDeskPriority** `integer`

Priority applied to the help desk ticket created when a HelpDesk-channel action is approved (Low, Normal, High, Critical). Empty for actions on any other channel.. See `eHelpDeskMessagePriority?` enum above.

## Code Examples

```bash cURL theme={null}
curl -X POST \
  "https://spaces.nexudus.com/api/sys/proposedactions" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "BusinessId": 0,
    "CriteriaType": "",
    "ActionType": 0,
    "Channel": 0,
    "Confidence": 0,
    "Priority": 0,
    "Status": 0,
    "DeferralCount": 0
}'
```

```javascript JavaScript theme={null}
const response = await fetch(
  'https://spaces.nexudus.com/api/sys/proposedactions',
  {
    method: 'POST',
    headers: {
      'Authorization': 'Bearer YOUR_TOKEN',
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({
      BusinessId: 0,
      CriteriaType: '',
      ActionType: 0,
      Channel: 0,
      Confidence: 0,
      Priority: 0,
      Status: 0,
      DeferralCount: 0
    })
  }
);

const data = await response.json();
```

```python Python theme={null}
import requests

response = requests.post(
    'https://spaces.nexudus.com/api/sys/proposedactions',
    headers={
        'Authorization': 'Bearer YOUR_TOKEN',
        'Content-Type': 'application/json'
    },
    json={
        'BusinessId': 0,
        'CriteriaType': '',
        'ActionType': 0,
        'Channel': 0,
        'Confidence': 0,
        'Priority': 0,
        'Status': 0,
        'DeferralCount': 0
    }
)

data = response.json()
```

## Response

### 200

**Status** `integer`

HTTP status code. `200` on success.

**Message** `string`

A human-readable message confirming the creation.

**Value** `object`

Contains the `Id` of the newly created record.

**WasSuccessful** `boolean`

`true` if the proposedaction was created successfully.

**Errors** `array`

`null` on success.

```json Example Response theme={null}
{
  "Status": 200,
  "Message": "ProposedAction was successfully created.",
  "Value": {
    "Id": 87654321
  },
  "OpenInDialog": false,
  "OpenInWindow": false,
  "RedirectURL": null,
  "JavaScript": null,
  "UpdatedOn": "2025-01-15T10:30:00Z",
  "UpdatedBy": "admin@example.com",
  "Errors": null,
  "WasSuccessful": true
}
```

### 400

**Message** `string`

A summary of the validation error(s), in the format `PropertyName: error message`.

**Value** `any`

`null` on validation failure.

**Errors** `object[]`

Array of validation errors.

**AttemptedValue** `any`

The value that was submitted for the field, or `null` if missing.

**Message** `string`

The validation error message.

**PropertyName** `string`

The name of the property that failed validation.

**WasSuccessful** `boolean`

`false` when the request fails validation.

```json Example Response theme={null}
{
  "Message": "CriteriaType: is a required field",
  "Value": null,
  "Errors": [
    {
      "AttemptedValue": null,
      "Message": "is a required field",
      "PropertyName": "CriteriaType"
    }
  ],
  "WasSuccessful": false
}
```


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