---
updatedAt: 2026-05-28T07:49:36.000Z
agentTools:
  projectIndex: https://finp2p-docs.ownera.io/llms.txt
---

# Add an account to an owner profile

Adds a custody managed account to an owner

# OpenAPI definition

```json
{
  "openapi": "3.0.1",
  "info": {
    "title": "Transactional API",
    "description": "This is the transactional API reference for application development over the FinP2P Router network.",
    "termsOfService": "https://ownera.io/terms/",
    "contact": {
      "email": "support@ownera.io"
    },
    "version": "0.28"
  },
  "tags": [
    {
      "name": "profiles",
      "description": "Access to Profiles"
    }
  ],
  "paths": {
    "/profiles/owner/{ownerId}/account": {
      "post": {
        "tags": [
          "profiles"
        ],
        "summary": "Add an account to an owner profile",
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "schema": {
              "$ref": "#/components/schemas/nonce"
            }
          },
          {
            "name": "ownerId",
            "in": "path",
            "description": "ID of the owner profile",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/ownerId"
            }
          }
        ],
        "description": "Adds a custody managed account to an owner",
        "operationId": "addAccount",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "required": [
                  "orgId"
                ],
                "type": "object",
                "properties": {
                  "orgId": {
                    "$ref": "#/components/schemas/orgId"
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "successful operation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/accountOperationResult"
                }
              }
            }
          },
          "202": {
            "description": "accepted operation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/operationBase"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIErrors"
                },
                "example": {
                  "errors": [
                    {
                      "code": 1000,
                      "message": "General error has occurred, For more information, please contact Support Team."
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIErrors"
                },
                "example": {
                  "errors": [
                    {
                      "code": 3000,
                      "message": "Authentication error"
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIErrors"
                },
                "example": {
                  "errors": [
                    {
                      "code": 3400,
                      "message": "Access denied"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIErrors"
                },
                "example": {
                  "errors": [
                    {
                      "code": 1100,
                      "message": "Resource not found"
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIErrors"
                },
                "example": {
                  "errors": [
                    {
                      "code": 9999,
                      "message": "The operation could not be completed successfully. Please contact Support team"
                    }
                  ]
                }
              }
            }
          },
          "502": {
            "description": "Bad Gateway",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIErrors"
                },
                "example": {
                  "errors": [
                    {
                      "code": 6000,
                      "message": "General external service error"
                    }
                  ]
                }
              }
            }
          },
          "503": {
            "description": "Service Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIErrors"
                },
                "example": {
                  "errors": [
                    {
                      "code": 2002,
                      "message": "Service unavailable"
                    }
                  ]
                }
              }
            }
          },
          "504": {
            "description": "Gateway Timeout",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIErrors"
                },
                "example": {
                  "errors": [
                    {
                      "code": 2003,
                      "message": "Gateway timeout"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    }
  },
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "description": "Ownera's custom bearer authentication\n\nThe Ownera authorization header is required to communicate with the Ownera APIs, the header should represent\na JSON object which contains the associated organization id, API key, nonce, timestamp and one time generated access token.\n\nThe one time access token is required to be generated for each request to the Ownera APIs, one time access tokens are time bounded\nby the timestamp value of the authorization object and are limited for one time use, tokens which their timestamp is outside of the\naccepted time range or that the token was already previously used will be rejected.\n\nAccess token is generated by concatenation of the API key, random nonce value and current epoch timestamp in seconds,\nthis digest signed using the associated secret of the API key (HS256, RS256) and encoded as an hexadecimal string.\n\nThe authorization object, including the generated access token, is base64 encoded an sent to the API as bearer authorization header.\n\nsample code snippet (RS256):\n\nconst nonce = crypto.randomBytes(16).toString('hex');\nconst timestamp = Math.floor(new Date().getTime() / 1000);\n\nconst rawAccessToken = `${API_KEY}${nonce}${timestamp}`;\n\nconst accessToken = crypto.createSign('SHA256').update(rawAccessToken).sign(Buffer.from($PRIVATE_KEY)).toString('hex');\n\nconst authInfo = {\n  organization: $ORGANIZATION_ID,\n  apiKey: $API_KEY,\n  nonce,\n  timestamp,\n  accessToken\n};\n\nconst authorizationHeader = Buffer.from(JSON.stringify(authInfo)).toString(\"base64\");\n"
      }
    },
    "schemas": {
      "operationBase": {
        "type": "object",
        "required": [
          "isCompleted"
        ],
        "properties": {
          "cid": {
            "type": "string",
            "description": "unique correlation id which identify the operation"
          },
          "isCompleted": {
            "type": "boolean",
            "description": "flag indicating if the operation completed, if true then error or response must be present (but not both)",
            "default": false
          }
        }
      },
      "accountOperationResult": {
        "type": "object",
        "properties": {
          "custodyOrgId": {
            "$ref": "#/components/schemas/orgId"
          },
          "finId": {
            "$ref": "#/components/schemas/finId"
          }
        }
      },
      "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"
            }
          }
        }
      },
      "ownerId": {
        "type": "string",
        "description": "The Owner resource id",
        "pattern": "^[^:](?:.+):101:(?:.+)",
        "maxLength": 150,
        "example": "bank-x:101:511c1d7f-4ed8-410d-887c-a10e3e499a01"
      },
      "orgId": {
        "type": "string",
        "description": "Organization Id",
        "maxLength": 150,
        "pattern": "^[^:]*$",
        "x-go-type": "OrgIdValidatable",
        "minLength": 1,
        "x-autoMinLength": true
      },
      "finId": {
        "type": "string",
        "format": "finid",
        "description": "Existing owner hex representation of a secp256k1 public key 33 bytes compressed",
        "pattern": "^[0-9a-f]*$",
        "minLength": 64,
        "maxLength": 66,
        "x-autoMinLength": true
      }
    }
  }
}
```