---
updatedAt: 2026-10-13T14:01:24.000Z
agentTools:
  projectIndex: https://developer.doit.com/llms.txt
---

# Reassign a shared-payer account

Reassigns one AWS account under a linked shared payer - a member account or the payer's own management account - to the reseller itself or to a T3 end customer within its hierarchy. Requires the `SharedPayersAdmin` permission and the AWS integration (`pdi:aws`) entitlement. User API tokens must include the permission in their scope.

# OpenAPI definition

```json
{
  "openapi": "3.0.1",
  "info": {
    "title": "DoiT Cloud Intelligence",
    "description": "Programmatic access to DoiT Platform",
    "version": "v1"
  },
  "servers": [
    {
      "url": "https://api.doit.com"
    }
  ],
  "security": [
    {
      "api_key": []
    },
    {
      "tenantId": [],
      "api_key": []
    }
  ],
  "tags": [
    {
      "name": "Shared Payers",
      "description": "Link and manage shared-payer account mappings for PartnerOps resellers (T2), reassigning AWS accounts under a shared payer to T3 end customers."
    }
  ],
  "paths": {
    "/customers/v1/customers/{customerId}/shared-payer-accounts/{assetId}": {
      "patch": {
        "tags": [
          "Shared Payers"
        ],
        "summary": "Reassign a shared-payer account",
        "description": "Reassigns one AWS account under a linked shared payer - a member account or the payer's own management account - to the reseller itself or to a T3 end customer within its hierarchy. Requires the `SharedPayersAdmin` permission and the AWS integration (`pdi:aws`) entitlement. User API tokens must include the permission in their scope.",
        "operationId": "reassignSharedPayerAccount",
        "parameters": [
          {
            "$ref": "#/components/parameters/customerId"
          },
          {
            "name": "assetId",
            "in": "path",
            "required": true,
            "description": "Asset ID of the AWS account to reassign, as returned by `listSharedPayerAccountMappings`.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SharedPayerAccountReassignRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK - Account reassigned.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SharedPayerAccountReassignResult"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400"
          },
          "401": {
            "$ref": "#/components/responses/401"
          },
          "403": {
            "$ref": "#/components/responses/403"
          },
          "404": {
            "$ref": "#/components/responses/404"
          },
          "500": {
            "$ref": "#/components/responses/500"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "SharedPayerAccountReassignRequest": {
        "type": "object",
        "required": [
          "customerId"
        ],
        "properties": {
          "customerId": {
            "type": "string",
            "description": "Customer to reassign the account to: `{customerId}` (the reseller itself) or a T3 end customer within its hierarchy."
          }
        }
      },
      "SharedPayerAccountReassignResult": {
        "type": "object",
        "properties": {
          "assetId": {
            "type": "string",
            "description": "Asset ID of the reassigned account."
          },
          "customerId": {
            "type": "string",
            "description": "Customer the account was reassigned to."
          }
        }
      },
      "Error": {
        "type": "object",
        "description": "Standard error response structure.",
        "properties": {
          "error": {
            "type": "string",
            "description": "Detailed error message."
          }
        },
        "example": {
          "error": "The request could not be completed."
        }
      }
    },
    "responses": {
      "400": {
        "description": "Bad Request - The server cannot process the request, often due to a malformed request.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "401": {
        "description": "Unauthorized - Invalid API key.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "403": {
        "description": "Forbidden - The client is not authorized to perform the request.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "404": {
        "description": "Not Found - The requested resource does not exist.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "500": {
        "description": "Internal Server Error - Something went wrong with the DoiT API server.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      }
    },
    "parameters": {
      "customerId": {
        "name": "customerId",
        "in": "path",
        "required": true,
        "description": "Customer ID. Must match the customer resolved from the bearer token - a token scoped to a different customer gets `403`.",
        "schema": {
          "type": "string"
        }
      }
    },
    "securitySchemes": {
      "api_key": {
        "type": "apiKey",
        "name": "Authorization",
        "description": "Use the \"Bearer <API_KEY>\" format or sign in for autofill",
        "in": "header"
      },
      "tenantId": {
        "type": "apiKey",
        "name": "X-Tenant-Id",
        "description": "Customer (tenant) ID for the request. Separate from your API token: always authenticate with `Authorization: Bearer <token>` (personal or service account). See [Get Started](https://developer.doit.com/docs/start). Omit when your token is scoped to a single customer (resolved automatically). A service account can select an active direct or nested descendant of its home customer; the endpoint's normal permissions, entitlements, and resource-ownership checks still apply. A service-account target outside that customer subtree returns `403 Forbidden`. Prefer this header over the legacy `customerContext` query parameter, which only applies to legacy API keys and is ignored by personal and service account tokens.",
        "in": "header"
      }
    }
  },
  "x-samples-languages": [
    "curl",
    "go",
    "node",
    "python"
  ],
  "x-cli-config": {
    "security": "oauth2",
    "params": {
      "client_id": "cli"
    }
  }
}
```