> For the complete documentation index, see [llms.txt](https://docs.fieldmotion.com/fieldmotion-api-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.fieldmotion.com/fieldmotion-api-docs/marketingexpense/_new.md).

# \_new

Creates a new Marketing Expense

### Parameters

#### source

The ID of the Marketing Source related to the created Marketing Expense

expense

The cost of the Marketing Expense

expenseDate

The date that the expense occurred on

### Example

```
FM_api(
    'MarketingExpense_new',[
      'source' => '8',
      'expense' => '34.62',
      'expenseDate' => '2023-05-15'
    ]
);
```

### Results

#### On Success

```
{"ok":1}
```

#### On Failure

If the "source" parameter is not set

```
{"error":"missing or invalid parameter: source"}
```

If the "expense" parameter is not set

```
{"error":"missing or invalid parameter: expense"}
```

If the "expenseDate" parameter is not set

```
{"error":"missing or invalid parameter: expenseDate"}
```
