---
updatedAt: 2026-04-22T18:05:56.000Z
---

Fetch the complete documentation index at: https://developers.pismo.io/pismo-docs/llms.txt. Use this file to discover all available pages before exploring further.

# Attach savings account to account

Attach a savings account product to an account.
This endpoint generates the [Account attached](https://developers.pismo.io/events/docs/deposit-product-account-attach-1) event.


# OpenAPI definition

```json
{
  "openapi": "3.1.3",
  "info": {
    "title": "Banking - Interest-bearing accounts",
    "version": "1.0.0",
    "description": "API for interest-bearing account functionality",
    "contact": {
      "name": "API Support",
      "url": "https://developers.pismo.io/support/"
    },
    "license": {
      "name": "Copyright Pismo"
    }
  },
  "servers": [
    {
      "url": "https://sandbox.pismolabs.io/savings-products",
      "description": "Sandbox API server for testing"
    }
  ],
  "tags": [
    {
      "name": "Account attachment",
      "description": "Endpoints that manage account attachments to interest-bearing account products"
    }
  ],
  "components": {
    "parameters": {
      "authorizationTokenHeader": {
        "name": "AuthorizationToken",
        "in": "header",
        "schema": {
          "type": "string"
        },
        "required": true,
        "description": "Account token. Token encoded with a Pismo account ID. Tokens can expire quickly, which can result in a 401 Unauthorized error.\n",
        "example": 1234
      },
      "accountId": {
        "description": "Account ID",
        "in": "path",
        "name": "accountId",
        "required": true,
        "schema": {
          "type": "integer"
        },
        "example": 123456
      }
    },
    "schemas": {
      "ErrorResponse": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "description": "Error type code",
            "example": "EIBACC0003"
          },
          "details": {
            "type": "string",
            "description": "Error details",
            "example": "error EIBACC0008: Validation error [(Field 'Order' is invalid)]"
          },
          "message": {
            "description": "Error message",
            "example": "Bad Request",
            "type": "string"
          }
        }
      },
      "SavingsAccountAttachRequest": {
        "type": "object",
        "required": [
          "product_id"
        ],
        "properties": {
          "product_id": {
            "type": "string",
            "description": "Product ID",
            "example": "2c336e9d-d04f-4fd0-8f6e-25808f48d70c"
          },
          "metadata": {
            "type": "object",
            "description": "The metadata object contains user-defined key-value pairs that offer additional context or custom information.<br>\nThe platform has no control over its content, it's controlled by the user.<br>\n\n**Note**: This field must not be used to send Personally Identifiable Information (PII), Payment Card Industry (PCI) data, or any sensitive/regulated information. Metadata fields are intended for operational, non-sensitive data only. For sensitive data, use the specific parameters designed for that purpose. For more information, refer to [Get started with Pismo APIs](https://developers.pismo.io/pismo-docs/reference/get-started-with-pismo-apis#metadata).\n",
            "example": {
              "key": "value"
            }
          }
        }
      }
    },
    "securitySchemes": {
      "BearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT"
      }
    },
    "responses": {
      "400BadRequest": {
        "description": "Bad request",
        "content": {
          "application/json": {
            "schema": {
              "oneOf": [
                {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              ]
            },
            "examples": {
              "invalidRequestBody": {
                "summary": "Bad Request",
                "value": {
                  "code": "EIBACC0008",
                  "message": "Bad Request",
                  "details": "error EIBACC0008: Validation error [(Field 'Order' is invalid)]"
                }
              },
              "maturityPeriodMutuallyExclusive": {
                "summary": "maturity_period — calendar_maturity_date and unit/value are mutually exclusive",
                "value": {
                  "code": "EIBACC0307",
                  "message": "Validation error",
                  "details": "maturity_period accepts either calendar_maturity_date OR unit+value, not both. Choose one: send calendar_maturity_date for an explicit date, or unit+value for a relative period."
                }
              },
              "calendarMaturityDateInvalidFormat": {
                "summary": "maturity_period — calendar_maturity_date is not in YYYY-MM-DD format",
                "value": {
                  "code": "EIBACC0305",
                  "message": "Validation error",
                  "details": "calendar_maturity_date must be in YYYY-MM-DD format"
                }
              },
              "calendarMaturityDateNotFuture": {
                "summary": "maturity_period — calendar_maturity_date is not a future date",
                "value": {
                  "code": "EIBACC0306",
                  "message": "Validation error",
                  "details": "calendar_maturity_date must be a future date (after today)"
                }
              },
              "effectiveDateInFuture": {
                "summary": "effective_date cannot be in the future",
                "value": {
                  "code": "EIBACC0308",
                  "message": "Effective date cannot be in the future"
                }
              },
              "effectiveDateTooFarInPast": {
                "summary": "effective_date exceeds maximum backdating limit",
                "value": {
                  "code": "EIBACC0309",
                  "message": "Effective date exceeds maximum backdating limit"
                }
              },
              "effectiveDateInvalidFormat": {
                "summary": "effective_date is not in YYYY-MM-DD format",
                "value": {
                  "code": "EIBACC0310",
                  "message": "Invalid effective date format. Expected YYYY-MM-DD"
                }
              }
            }
          }
        }
      },
      "404NotFound": {
        "description": "Bad request",
        "content": {
          "application/json": {
            "schema": {
              "oneOf": [
                {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              ]
            },
            "examples": {
              "invalidRequestBody": {
                "summary": "Bad Request",
                "value": {
                  "code": "EIBACC0064",
                  "message": "Product not found"
                }
              }
            }
          }
        }
      },
      "409Conflict": {
        "description": "Conflict",
        "content": {
          "application/json": {
            "schema": {
              "oneOf": [
                {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              ]
            },
            "examples": {
              "conflict": {
                "summary": "Conflict",
                "value": {
                  "code": "EIBACC0114",
                  "message": "Product is already detached"
                }
              }
            }
          }
        }
      },
      "500InternalServer": {
        "description": "Internal error",
        "content": {
          "application/json": {
            "schema": {
              "oneOf": [
                {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              ]
            },
            "examples": {
              "internalProcessingError": {
                "summary": "Internal processing error",
                "value": {
                  "code": "EIBACC0007",
                  "message": "Internal error",
                  "detail": "Internal error"
                }
              }
            }
          }
        }
      }
    }
  },
  "paths": {
    "/v1/savings-accounts/accounts/{accountId}/attach": {
      "post": {
        "tags": [
          "Account attachment"
        ],
        "summary": "Attach savings account to account",
        "description": "Attach a savings account product to an account.\nThis endpoint generates the [Account attached](https://developers.pismo.io/events/docs/deposit-product-account-attach-1) event.\n",
        "operationId": "interest-bearing-v1-savings-account-attach-account",
        "parameters": [
          {
            "$ref": "#/components/parameters/accountId"
          },
          {
            "$ref": "#/components/parameters/authorizationTokenHeader"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SavingsAccountAttachRequest"
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "Success - No Content"
          },
          "400": {
            "$ref": "#/components/responses/400BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/404NotFound"
          },
          "409": {
            "$ref": "#/components/responses/409Conflict"
          },
          "500": {
            "$ref": "#/components/responses/500InternalServer"
          }
        }
      }
    }
  },
  "security": [
    {
      "BearerAuth": []
    }
  ]
}
```