> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.getsinbad.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.getsinbad.com/_mcp/server.

# Save a fee schedule draft

PUT https://us-central1-sinbad-staging-env.cloudfunctions.net/b2b-v1/v1/partner/fees/draft
Content-Type: application/json

Save a fee schedule draft.

**Credential:** Partner secret

**Before you call**

- A server-side partner secret for the owning partner. Do not send an Origin header.
- An enabled partner fee policy on the selected chain.
- Draft changes become active only after a manager transaction confirms.

Save a draft without publishing it. upperUsd and FLAT_USD values allow at most six decimal places; invalid precision returns 400 VALIDATION_ERROR. Upper bounds must increase, the last tier must cover $50,000, and each fee kind must satisfy its limits. Publish separately from the registered manager wallet.



> Confirm with Sinbad that this endpoint is enabled in your environment.

**Errors**

| Status | Code | What to do |
| --- | --- | --- |
| 400 | `VALIDATION_ERROR` | Correct the fields reported in details before retrying. |
| 401 | `UNAUTHENTICATED` | Create a new customer session or use a valid server credential. |
| 403 | `FORBIDDEN` | Check credential ownership, integration and the supplied Origin. |
| 409 | `CONFLICT` | Read the current state again before you prepare or retry. |
| 503 | `UPSTREAM_ERROR` | Retry with backoff; preserve the same idempotency key for a repeated mutation. |

Reference: https://docs.getsinbad.com/api-reference/partner-fees/save-partner-fee-draft

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Request

### Body (application/json)

This endpoint expects an object.

- `tiers` (list of V1PartnerFeesDraftPutRequestBodyContentApplicationJsonSchemaTiersItems, required)

## Response

### 200

Validated tenant-scoped draft saved.

- `partnerId` (string, required)
- `tiers` (list of TradesFeeDraftTiersItems, required)

## Errors

### 400 Bad Request Error

The request is invalid.

- `error` (V1PartnerFeesDraftPutResponsesContentApplicationJsonSchemaError, required)

### 401 Unauthorized Error

Authentication is required.

- `error` (V1PartnerFeesDraftPutResponsesContentApplicationJsonSchemaError, required)

### 403 Forbidden Error

You do not have permission to perform this action.

- `error` (V1PartnerFeesDraftPutResponsesContentApplicationJsonSchemaError, required)

### 409 Conflict Error

The request conflicts with the current state of the resource.

- `error` (V1PartnerFeesDraftPutResponsesContentApplicationJsonSchemaError, required)

### 503 Service Unavailable Error

Service temporarily unavailable.

- `error` (V1PartnerFeesDraftPutResponsesContentApplicationJsonSchemaError, required)

## Types

### V1PartnerFeesDraftPutRequestBodyContentApplicationJsonSchemaTiersItems

- `upperUsd` (string, required)
- `fee` (V1PartnerFeesDraftPutRequestBodyContentApplicationJsonSchemaTiersItemsFee, required)

### TradesFeeDraftTiersItems

- `upperUsdMicro` (string, required)
- `fee` (TradesFeeDraftTiersItemsFee, required)

### V1PartnerFeesDraftPutResponsesContentApplicationJsonSchemaError

- `code` (string, required)
- `numericId` (integer, required)
- `message` (string, required)
- `requestId` (string, optional)
- `details` (map from string to any, optional)

### V1PartnerFeesDraftPutRequestBodyContentApplicationJsonSchemaTiersItemsFee

- `kind` (enum, required)
  - Allowed values: `ZERO`, `PERCENT_BPS`, `FLAT_USD`
- `value` (string, required)

### TradesFeeDraftTiersItemsFee

- `kind` (enum, required)
  - Allowed values: `0`, `1`, `2`
- `value` (string, required) — Atomic integer: basis points for kind 1; USD micro-units for kind 2.

## Examples

**Request**

```json
{
  "tiers": [
    {
      "upperUsd": "50000",
      "fee": {
        "kind": "ZERO",
        "value": "0"
      }
    }
  ]
}
```

**Response**

```json
{
  "partnerId": "partner_demo",
  "tiers": [
    {
      "upperUsdMicro": "50000000000",
      "fee": {
        "kind": 0,
        "value": "0"
      }
    }
  ]
}
```

**SDK Code**

```python Default
import requests

url = "https://us-central1-sinbad-staging-env.cloudfunctions.net/b2b-v1/v1/partner/fees/draft"

payload = { "tiers": [
        {
            "upperUsd": "50000",
            "fee": {
                "kind": "ZERO",
                "value": "0"
            }
        }
    ] }
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.put(url, json=payload, headers=headers)

print(response.json())
```

```javascript Default
const url = 'https://us-central1-sinbad-staging-env.cloudfunctions.net/b2b-v1/v1/partner/fees/draft';
const options = {
  method: 'PUT',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"tiers":[{"upperUsd":"50000","fee":{"kind":"ZERO","value":"0"}}]}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Default
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://us-central1-sinbad-staging-env.cloudfunctions.net/b2b-v1/v1/partner/fees/draft"

	payload := strings.NewReader("{\n  \"tiers\": [\n    {\n      \"upperUsd\": \"50000\",\n      \"fee\": {\n        \"kind\": \"ZERO\",\n        \"value\": \"0\"\n      }\n    }\n  ]\n}")

	req, _ := http.NewRequest("PUT", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Default
require 'uri'
require 'net/http'

url = URI("https://us-central1-sinbad-staging-env.cloudfunctions.net/b2b-v1/v1/partner/fees/draft")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"tiers\": [\n    {\n      \"upperUsd\": \"50000\",\n      \"fee\": {\n        \"kind\": \"ZERO\",\n        \"value\": \"0\"\n      }\n    }\n  ]\n}"

response = http.request(request)
puts response.read_body
```

```java Default
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.put("https://us-central1-sinbad-staging-env.cloudfunctions.net/b2b-v1/v1/partner/fees/draft")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"tiers\": [\n    {\n      \"upperUsd\": \"50000\",\n      \"fee\": {\n        \"kind\": \"ZERO\",\n        \"value\": \"0\"\n      }\n    }\n  ]\n}")
  .asString();
```

```php Default
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('PUT', 'https://us-central1-sinbad-staging-env.cloudfunctions.net/b2b-v1/v1/partner/fees/draft', [
  'body' => '{
  "tiers": [
    {
      "upperUsd": "50000",
      "fee": {
        "kind": "ZERO",
        "value": "0"
      }
    }
  ]
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp Default
using RestSharp;

var client = new RestClient("https://us-central1-sinbad-staging-env.cloudfunctions.net/b2b-v1/v1/partner/fees/draft");
var request = new RestRequest(Method.PUT);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"tiers\": [\n    {\n      \"upperUsd\": \"50000\",\n      \"fee\": {\n        \"kind\": \"ZERO\",\n        \"value\": \"0\"\n      }\n    }\n  ]\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Default
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = ["tiers": [
    [
      "upperUsd": "50000",
      "fee": [
        "kind": "ZERO",
        "value": "0"
      ]
    ]
  ]] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://us-central1-sinbad-staging-env.cloudfunctions.net/b2b-v1/v1/partner/fees/draft")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```