---
updatedAt: 2026-04-21T12:48:50.000Z
agentTools:
  projectIndex: https://finp2p-docs.ownera.io/llms.txt
---

# Update pinning configuration, add/remove/modify entries

Update pinning configuration

# OpenAPI definition

```json
{
  "openapi": "3.0.1",
  "info": {
    "title": "Operational API",
    "description": "This is the operational API reference for adapter development.",
    "termsOfService": "https://ownera.io/terms/",
    "contact": {
      "email": "support@ownera.io"
    },
    "version": "0.28"
  },
  "tags": [
    {
      "name": "discovery",
      "description": "Discovery service operations"
    }
  ],
  "paths": {
    "/discovery/pinning_config": {
      "patch": {
        "tags": [
          "discovery"
        ],
        "summary": "Update pinning configuration, add/remove/modify entries",
        "description": "Update pinning configuration",
        "operationId": "updatePinningConfig",
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "schema": {
              "$ref": "#/components/schemas/nonce"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "examples": {
                "pinning-config-update-example-1": {
                  "description": "* Removes bank-uk configuration\n* Updates ownera-custody address\n* Updates ownera-escrow token\n* Adds bank-us configuration\n",
                  "value": {
                    "bank-uk": null,
                    "ownera-custody": {
                      "address": [
                        {
                          "address": "ownera-custody.finp2p.local.ownera.io",
                          "port": 80,
                          "schemas": [
                            "http1.1"
                          ]
                        }
                      ]
                    },
                    "ownera-escrow": {
                      "token": "<token>"
                    },
                    "bank-us": {
                      "token": "<token>",
                      "address": [
                        {
                          "address": "bank-us.finp2p.local.ownera.io",
                          "port": 80,
                          "schemas": [
                            "http1.1",
                            "http2"
                          ]
                        }
                      ]
                    }
                  }
                }
              },
              "schema": {
                "$ref": "#/components/schemas/pinningConfigUpdate"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/pinningConfig"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIErrors"
                },
                "example": {
                  "errors": [
                    {
                      "code": 1002,
                      "message": "Invalid request format"
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIErrors"
                },
                "example": {
                  "errors": [
                    {
                      "code": 2202,
                      "message": "Internal service failure"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "pinningAddress": {
        "type": "object",
        "properties": {
          "address": {
            "type": "string",
            "format": "address",
            "minLength": 1,
            "maxLength": 1024
          },
          "port": {
            "type": "integer",
            "minimum": 1,
            "maximum": 65535
          },
          "schemas": {
            "type": "array",
            "uniqueItems": true,
            "minItems": 1,
            "items": {
              "type": "string",
              "enum": [
                "http1.1",
                "http2"
              ]
            }
          }
        }
      },
      "pinningConfig": {
        "type": "object",
        "minProperties": 1,
        "additionalProperties": {
          "$ref": "#/components/schemas/pinningConfigEntry"
        }
      },
      "pinningConfigEntry": {
        "type": "object",
        "required": [
          "token",
          "address"
        ],
        "properties": {
          "token": {
            "type": "string",
            "minLength": 1,
            "pattern": "^[A-Za-z0-9_-]{2,}(?:\\.[A-Za-z0-9_-]{2,}){2}$",
            "format": "jwt"
          },
          "address": {
            "type": "array",
            "minItems": 1,
            "items": {
              "$ref": "#/components/schemas/pinningAddress"
            }
          }
        }
      },
      "pinningConfigUpdate": {
        "type": "object",
        "minProperties": 1,
        "additionalProperties": {
          "oneOf": [
            {
              "$ref": "#/components/schemas/pinningConfigEntryUpdate"
            }
          ],
          "nullable": true,
          "x-go-type-skip-optional-pointer": true,
          "x-go-type": "PinningConfigEntryUpdate",
          "x-go-type-import": {
            "path": "github.com/owneraio/finp2p-core/apis/finapi/internal/api/common",
            "name": "model"
          }
        }
      },
      "pinningConfigEntryUpdate": {
        "type": "object",
        "properties": {
          "token": {
            "type": "string",
            "nullable": true,
            "x-go-type-skip-optional-pointer": true,
            "x-go-type": "model.Nullable[string]",
            "x-go-type-import": {
              "path": "github.com/owneraio/finp2p-core/apis/finapi/internal/api/common",
              "name": "model"
            },
            "format": "jwt",
            "pattern": "^[A-Za-z0-9_-]{2,}(?:\\.[A-Za-z0-9_-]{2,}){2}$"
          },
          "address": {
            "nullable": true,
            "x-go-type-skip-optional-pointer": true,
            "x-go-type": "model.Nullable[[]PinningAddress]",
            "x-go-type-import": {
              "path": "github.com/owneraio/finp2p-core/apis/finapi/internal/api/common",
              "name": "model"
            },
            "type": "array",
            "minItems": 1,
            "items": {
              "$ref": "#/components/schemas/pinningAddress"
            }
          }
        }
      },
      "nonce": {
        "type": "string",
        "description": "32 bytes buffer (24 randomly generated bytes by the client + 8 bytes epoch timestamp seconds) encoded to hex:\n\n  const nonce = Buffer.alloc(32);\n  nonce.fill(crypto.randomBytes(24), 0, 24);\n\n  const nowEpochSeconds = Math.floor(new Date().getTime() / 1000);\n  const t = BigInt(nowEpochSeconds);\n  nonce.writeBigInt64BE(t, 24);\n",
        "x-allowEmpty": true
      },
      "APIError": {
        "type": "object",
        "required": [
          "code",
          "message"
        ],
        "properties": {
          "code": {
            "type": "integer",
            "description": "Error code indicating the specific failure - for more information see [API Errors](./api-error-codes-reference).\n"
          },
          "message": {
            "type": "string",
            "description": "A descriptive message providing context about the error.",
            "pattern": ".*\\S.*",
            "x-autoMinLength": true
          }
        }
      },
      "APIErrors": {
        "type": "object",
        "required": [
          "errors"
        ],
        "properties": {
          "errors": {
            "type": "array",
            "minItems": 1,
            "items": {
              "$ref": "#/components/schemas/APIError"
            }
          }
        }
      }
    }
  }
}
```