# Create an action for a customer

Logs a new commercial action on a customer record.
**Important:** The action is always recorded in the application journal.
However, it will only appear in the customer's action history tab if the
action type has child actions configured for the site. This depends on
the agency's action workflow configuration.
Use `GET /actions/types` to list available action types and check which
ones have child actions configured.

Endpoint: POST /customers/{customerId}/actions
Version: 1.6.0
Security: bearerAuth

## Security:

  - `bearerAuth` (unknown)
    http bearer opaque

## Path parameters:

  - `customerId` (integer, required)
    ID of the customer.

## Request fields (application/json):

  - `action_id` (integer, required)
    Action type ID. Must be active for the site.
Use `GET /actions/types` to discover available action types.
    Example: 15

  - `user_id` (integer | null)
    User (agent) ID who performed the action. When omitted,
no user is associated with the action.
    Example: 456

  - `result` (string | null)
    Action result/comment (free text).
    Example: Client intéressé, rappeler la semaine prochaine

  - `date_performed` (string | null)
    Date when the action was performed. ISO 8601 format.
When omitted, defaults to now.
    Example: 2026-01-15T14:30:00+01:00

## Response 201:

  - `201` (unknown)
    Action created

## Response 201 fields (application/json):

  - `data` (object)

  - `data.id` (integer)
    ID of the created action log entry.

## Response 403:

  - `403` (unknown)
    Access denied. The error `code` is always `FORBIDDEN`; the `message` gives the cause:
- `You do not have permission to perform this action.`
 — the access does not

hold the API pack / right required by the endpoint.
- `Insufficient scope for this request.`
 — the resource targeted by the request

(user, customer, product, agency, transaction, ...) is outside the scope of

the authenticated access.
- `Access denied for this editor.`
 /
`Your IP address has been blocked.`
 —

editor or IP restriction.

## Response 403 fields (application/json):

  - `error` (object)

  - `error.code` (string, required)

  - `error.message` (string, required)

## Response 422:

  - `422` (unknown)
    Validation failed

## Response 422 fields (application/json):

  - `error` (object)

  - `error.code` (string)
    Enum: "VALIDATION_ERROR"

  - `error.message` (string)

  - `error.details` (array)

  - `error.details.field` (string)

  - `error.details.message` (string)

## Response 403 examples:

  - `Missing API pack / right` (unknown)

  - `Resource outside the scope of the access` (unknown)

