# Get logged actions by action type

Returns the logged actions (action history entries) of a given action type
for the site. Use the `id` returned by `GET /actions/types` as `actionId`.
Results can be restricted to a single customer or product with `entity` and
`entityId` (both are required together).
**Note:** without `entity` / `entityId`, all the logged actions of that type
for the site are returned.

Endpoint: GET /actions/{actionId}
Version: 1.6.0
Security: bearerAuth

## Security:

  - `bearerAuth` (unknown)
    http bearer opaque

## Path parameters:

  - `actionId` (integer, required)
    Action type ID (see `GET /actions/types`).

## Query parameters:

  - `entity` (string)
    Type of the target entity. Required when `entityId` is provided.

  - `entityId` (integer)
    ID of the target customer (`entity=contact`) or product (`entity=product`).
Required when `entity` is provided.

  - `done` (boolean)
    When present, only performed actions are returned (planned-only entries are excluded).

## Response 200:

  - `200` (unknown)
    Logged actions of the given type

## Response 200 fields (application/json):

  - `data` (array)

  - `data.id` (integer)
    Action log entry ID.
    Example: 98765

  - `data.action_id` (integer)
    Action type ID.
    Example: 10983

  - `data.name` (string | null)
    Label of the action type.
    Example: Appel téléphonique

  - `data.category_name` (string | null)
    Label of the action type category.

  - `data.parent_action_id` (integer | null)
    Parent action type ID (`0` or null when none).
    Example: 0

  - `data.secret` (boolean | null)
    Whether the action type is flagged as secret/confidential.
    Example: false

  - `data.customers_id` (integer | null)
    Customer the action is attached to (`0` if none).
    Example: 789

  - `data.products_id` (integer | null)
    Product the action is attached to (`0` if none).
    Example: 0

  - `data.compromis_id` (integer | null)
    Transaction the action is attached to (`0` if none).
    Example: 0

  - `data.user_id` (integer | null)
    User who performed the action.
    Example: 456

  - `data.result` (string | null)
    Action result/comment.
    Example: Client intéressé

  - `data.date_performed` (string | null)
    Date the action was performed.
    Example: 2026-01-15 14:30:00

  - `data.date_planning` (string | null)
    Planned date of the action.
    Example: 2026-01-20 10:00:00

  - `data.sites_id` (integer | null)
    Site the action belongs to.

## 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)

