---
search:
  tags:
    - Operator
    - POST
seo:
  description: >-
    Run an operator action as a merchant (audit-logged). Reference for the POST
    /operator/act-on-behalf endpoint in the Sarvex V1 API.
sidebar:
  label: Run an operator action as a merchant (audit-logged)
  badge: POST
title: Run an operator action as a merchant (audit-logged)
type: openapi-operation
---
`POST /operator/act-on-behalf`

**Request body** (`application/json`, required)

- `action` (string, required)
- `params` (object)

Request body example:

```json
{
  "action": "string",
  "params": {}
}
```

**Responses**

- `200` — Executed.
- `400` — X-Operate-As missing.
- `403` — Authenticated but not permitted (e.g. non-operator on an operator route).
- `422` — Request body failed validation.

Response example, 200:

```json
{
  "status": "success",
  "action": "string",
  "target": "string",
  "message": "string"
}
```

Response example, 403:

```json
{
  "error": {
    "code": "forbidden",
    "message": "Operator role required.",
    "details": null
  }
}
```

Response example, 422:

```json
{
  "error": {
    "code": "validation_error",
    "message": "One or more fields are invalid.",
    "details": {
      "fields": {
        "email": "must be a valid email address"
      }
    }
  }
}
```
