# Update underwriting details (sunsetting)

Create or update the account's underwriting.

Read our [underwriting guide](https://docs.moov.io/guides/accounts/requirements/underwriting/) to learn more.

To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
you'll need to specify the `/accounts/{accountID}/profile.write` scope.

## PUT

/accounts/{accountID}/underwriting

### Ask

```shell
curl -X PUT "https://api.moov.io/accounts/{accountID}/underwriting" \
  -H "Authorization: Bearer {token}" \
  -H "X-Moov-Version: v2026.07.00" \
  -d '{
  "averageTransactionSize": 0,
  "maxTransactionSize": 0,
  "averageMonthlyTransactionVolume": 0,
  "volumeByCustomerType": {
    "businessToBusinessPercentage": 0,
    "consumerToBusinessPercentage": 0
  },
  "cardVolumeDistribution": {
    "ecommercePercentage": 0,
    "cardPresentPercentage": 0,
    "mailOrPhonePercentage": 0,
    "debtRepaymentPercentage": 0
  },
  "fulfillment": {
    "hasPhysicalGoods": true,
    "isShippingProduct": true,
    "shipmentDurationDays": 0,
    "returnPolicy": "none"
  }
}'
```

### Ask

```go
mc, _ := moov.NewClient()

var accountID string

update := moov.UpdateUnderwriting{
  AverageTransactionSize:          1_500,
  MaxTransactionSize:              1_200,
  AverageMonthlyTransactionVolume: 11_000,
  VolumeByCustomerType: moov.VolumeByCustomerType{
    BusinessToBusinessPercentage: 60,
    ConsumerToBusinessPercentage: 40,
  },
  CardVolumeDistribution: moov.CardVolumeDistribution{
    EcommercePercentage:     60,
    CardPresentPercentage:   40,
    MailOrPhonePercentage:   0,
    DebtRepaymentPercentage: 0,
  },
  Fulfillment: moov.Fulfillment{
    HasPhysicalGoods:     true,
    IsShippingProduct:    true,
    ShipmentDurationDays: 3,
    ReturnPolicy:         moov.EXCHANGE_ONLY,
  },
}

mc.UpsertUnderwriting(ctx, accountID, update)
```

### Ask

```typescript
import { Moov } from "@moovio/sdk";

const moov = new Moov({
  security: {
    username: "",
    password: "",
  },
});

async function run() {
  const result = await moov.underwriting.upsert({
    accountID: "371bf394-45df-4ba8-a615-ad5483b1f963",
    updateUnderwriting: {
      averageTransactionSize: 622191,
      maxTransactionSize: 123692,
      averageMonthlyTransactionVolume: 438164,
      volumeByCustomerType: {
        businessToBusinessPercentage: 671399,
        consumerToBusinessPercentage: 482010,
      },
      cardVolumeDistribution: {
        ecommercePercentage: 47450,
        cardPresentPercentage: 146275,
        mailOrPhonePercentage: 309315,
        debtRepaymentPercentage: 990303,
      },
      fulfillment: {
        hasPhysicalGoods: true,
        isShippingProduct: true,
        shipmentDurationDays: 388451,
        returnPolicy: "other",
      },
    },
  });

console.log(result);
}

run();
```

### Ask

```php
declare(strict_types=1);

require 'vendor/autoload.php';

use Moov\
