# profiles.drift_reject

`POST /api/public/v1/profiles/{id}/drift/reject`

Reject an unexpected drift event with session.start also checked; preserve baseline. BUSY while open; CONFLICT for a decided event.

- Capability: `profile.edit`
- Command (idempotent): yes — send a `command_id`; resending the same id and body returns the stored receipt
- Idempotency: resend the same `idempotency_key` on retry; never generate a new key.
- MCP tool: `profiles_drift_reject`

## Parameters

| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `id` | path | string (uuid) | Yes | Profile id |
| `command_id` | body | string (uuid) | Yes | Client-generated UUID for this command. Send the same id (and body) again to get the stored receipt instead of a second change; a different body under the same id is CONFLICT. |
| `idempotency_key` | body | string | No | (min length 1, max length 163) |
| `event_id` | body | string (uuid) | Yes |  |

## Response

`200` with `{ ok, data, operation_id, state_version, retryable, next }`; command admission does not prove worker completion.

| Field | Type | Always present | Description |
|---|---|---|---|
| `operation_id` | string (uuid) \| null | Yes |  |
| `state_version` | integer | Yes | (min 0, max 9007199254740991) |
| `retryable` | false | Yes |  |
| `next` | object \| null | Yes |  |
| `next.operation` | "operations.get" | Yes |  |
| `next.operation_id` | string (uuid) | Yes |  |
| `ok` | true | Yes |  |
| `data` | object | Yes |  |

New fields can appear at any time; ignore the ones you do not know.

## Errors

| Code | HTTP | Retryable |
|---|---|---|
| `UNAUTHENTICATED` | 401 | No |
| `FORBIDDEN` | 403 | No |
| `RATE_LIMITED` | 429 | Yes |
| `VALIDATION_FAILED` | 422 | No |
| `NOT_FOUND` | 404 | No |
| `CONFLICT` | 409 | No |
| `OUTCOME_UNKNOWN` | 202 | Yes |
| `ACTION_OUTCOME_UNKNOWN` | 202 | No |
| `IDEMPOTENCY_KEY_REUSED` | 409 | No |
| `BUSY` | 409 | Yes |
| `DEPENDENCY_UNAVAILABLE` | 503 | Yes |
| `UNKNOWN` | 500 | No |

## Examples (curl)

```bash
curl -X POST "https://browlix.com/api/public/v1/profiles/<id>/drift/reject" \
  -H "Authorization: Bearer $BROWLIX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"command_id":"<uuid>","event_id":"<event_id>"}'
```

## Examples (TypeScript SDK)

```ts
import { Browlix } from "@browlix/sdk";

const bx = new Browlix({ apiKey: process.env.BROWLIX_API_KEY! });
const reply = await bx.call("profiles.drift_reject", { path: { id: "<id>" }, body: {"event_id":"<event_id>"} });
console.log(reply.data);
```

## Examples (Python)

```python
import os, uuid
import requests

r = requests.post(
    "https://browlix.com/api/public/v1/profiles/<id>/drift/reject",
    headers={"Authorization": f"Bearer {os.environ['BROWLIX_API_KEY']}"},
    json={"command_id":str(uuid.uuid4()),"event_id":"<event_id>"},
    timeout=60,
)
print(r.status_code, r.json())
```

## Examples (MCP)

```json
{
  "method": "tools/call",
  "params": {
    "name": "profiles_drift_reject",
    "arguments": {
      "id": "<id>",
      "event_id": "<event_id>"
    }
  }
}
```
