Source: https://developers.tokportal.com/account-edit-request/
Markdown: https://developers.tokportal.com/account-edit-request.md

# Account Edit Request

Request a profile edit on a delivered (saved) account. The assigned account manager will update the username, display name, biography, and/or profile picture as specified.

**Cost:** 8 credits per edit request.

## Create Edit Request

```
POST /accounts/:id/edit-request
```

Submit a request to change one or more profile fields on a delivered account. TokPortal first uses the account's current eligible manager, then its still-active manager relationship, then eligible non-cancelled order history. A completed bundle remains eligible without a delivery-age limit. Cancelled orders are never restored.

### Prerequisites

- The account must have active TokPortal Coverage or be permanently grandfathered
- If an active order exists, its manager is authoritative and must still be an active Account Manager
- TokPortal walks completed orders newest-first and assigns the first historical manager who is still active
- The request appears directly in that manager's Calendar. `Accept & start` acknowledges the assigned work; it is not a marketplace claim
- Cancelled orders are never used as fallback
- No other edit request can be **in progress** for the same account
- You need at least **8 credits** in your balance

Coverage validation, manager assignment, the 8-credit debit, and task creation commit atomically. A failed prerequisite never creates a task or debit. If Coverage later pauses or lapses, the request is withheld from the manager queue and is not treated as late; reactivation restores it through the account-level resume flow.

### Request Body

| Field                           | Type   | Required | Description                                                                                                            |
| ------------------------------- | ------ | -------- | ---------------------------------------------------------------------------------------------------------------------- |
| `requested_username`            | string | Yes      | New username (1–24 characters)                                                                                         |
| `requested_visible_name`        | string | Yes      | New display name (1–30 characters)                                                                                     |
| `requested_biography`           | string | No       | New biography (max **150** characters on Instagram, **80** on other platforms; over the limit returns `INVALID_FIELD`) |
| `requested_profile_picture_url` | string | No       | URL of the new profile picture                                                                                         |
| `requested_link_in_bio`         | string | No       | Link in bio (Instagram only, must be a valid URL)                                                                      |

Username and visible name alone are not treated as a change: the request must also carry at least one of `requested_biography`, `requested_profile_picture_url`, or `requested_link_in_bio`.

```bash
curl -X POST https://app.tokportal.com/api/ext/accounts/{account_id}/edit-request \
  -H "X-API-Key: sk_xxx" \
  -H "Content-Type: application/json" \
  -d '{
    "requested_username": "new_username",
    "requested_visible_name": "New Display Name",
    "requested_biography": "Updated bio text",
    "requested_profile_picture_url": "https://example.com/new-photo.jpg"
  }'
```

### Response (201)

```json
{
  "data": {
    "edit_request_id": "uuid",
    "account_id": "uuid",
    "status": "pending",
    "requested_username": "new_username",
    "requested_visible_name": "New Display Name",
    "requested_biography": "Updated bio text",
    "requested_profile_picture_url": "https://example.com/new-photo.jpg",
    "requested_link_in_bio": null,
    "created_at": "2026-02-25T12:00:00Z"
  },
  "credits_charged": 8,
  "credits_remaining": 42
}
```

### Errors

| Code                           | Status | When                                                                                                                                                                                |
| ------------------------------ | ------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `EDIT_REQUEST_NO_CHANGES`      | 400    | Only `requested_username` and/or `requested_visible_name` were sent. At least one of `requested_biography`, `requested_profile_picture_url`, or `requested_link_in_bio` is required |
| `INVALID_FIELD`                | 400    | `requested_biography` exceeds the platform limit (150 on Instagram, 80 elsewhere)                                                                                                   |
| `SAVED_ACCOUNT_NOT_FOUND`      | 404    | Account ID not found                                                                                                                                                                |
| `SAVED_ACCOUNT_NOT_OWNED`      | 403    | Account belongs to another user                                                                                                                                                     |
| `MANAGED_ACCOUNT_TASK_BLOCKED` | 409    | Coverage is inactive or the account is detached, banned, missing Coverage, or otherwise unavailable. Fetch the account Coverage state and reactivate only when recoverable.         |
| `EDIT_REQUEST_NO_CM`           | 409    | The active order has no eligible active manager                                                                                                                                     |
| `EDIT_REQUEST_ALREADY_EXISTS`  | 409    | Another edit request is already in progress                                                                                                                                         |
| `EDIT_REQUEST_NO_ACTIVE_ORDER` | 409    | No non-cancelled support order or active historical manager can be resolved                                                                                                         |
| `INSUFFICIENT_CREDITS`         | 402    | Not enough credits (need 8)                                                                                                                                                         |

## List Edit Requests

```
GET /accounts/:id/edit-request
```

Returns all edit requests for the given account, newest first.

```bash
curl -X GET https://app.tokportal.com/api/ext/accounts/{account_id}/edit-request \
  -H "X-API-Key: sk_xxx"
```

### Response (200)

```json
{
  "data": [
    {
      "id": "uuid",
      "status": "pending",
      "requested_username": "new_username",
      "requested_visible_name": "New Display Name",
      "requested_biography": "Updated bio",
      "requested_profile_picture_url": null,
      "requested_link_in_bio": null,
      "feedback": null,
      "credits_cost": 8,
      "created_at": "2026-02-25T12:00:00Z",
      "updated_at": "2026-02-25T12:00:00Z",
      "finalized_at": null
    }
  ]
}
```

## Edit Request Statuses

| Status        | Meaning                                            |
| ------------- | -------------------------------------------------- |
| `pending`     | Waiting for the manager to start                   |
| `in_progress` | Manager is working on it                           |
| `in_review`   | Manager submitted changes, waiting for your review |
| `finalized`   | Completed successfully                             |

> **TIP: tip**
> You can poll `GET /accounts/:id/edit-request` to track the progress of your request. Once the status reaches `in_review`, you can review the changes made by the manager.
