---
updatedAt: 2026-05-22T00:42:24.000Z
agentTools:
  projectIndex: https://docs.oneschema.co/llms.txt
---

# Create S3 Account

Create a new S3 Account connected to OneSchema.

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "S3 Accounts",
    "version": "0.0.2",
    "contact": {
      "name": "OneSchema Support",
      "email": "support@oneschema.co"
    },
    "license": {
      "name": "proprietary",
      "url": "https://www.oneschema.co/terms-and-conditions"
    },
    "termsOfService": "https://www.oneschema.co/terms-and-conditions",
    "description": "An API for managing S3 Accounts connected to OneSchema.\n\n`role_arn` values must be valid AWS IAM role ARNs. The partition is `aws` or a\nlowercase hyphen-separated `aws-*` value such as `aws-us-gov`, `aws-cn`, or\n`aws-eu`. The account ID is a 12-digit AWS account ID. The role portion is a\n`/`-separated path ending with the role name; intermediate path segments may\ncontain any printable ASCII character except `/`, and the role name may\ncontain letters, digits, and `+=,.@_-`. Examples:\n`arn:aws:iam::123456789012:role/MyRole` or\n`arn:aws:iam::123456789012:role/team/platform/MyRole`. Blank or invalid\n`role_arn` values are rejected with a `parameter_invalid` error."
  },
  "tags": [
    {
      "name": "S3 Accounts",
      "description": "S3 Accounts connected to OneSchema"
    }
  ],
  "paths": {
    "/v0/s3-accounts": {
      "post": {
        "operationId": "create-s3-account",
        "summary": "Create S3 Account",
        "description": "Create a new S3 Account connected to OneSchema.",
        "parameters": [],
        "responses": {
          "201": {
            "description": "The request has succeeded and a new resource has been created as a result.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/s3-account-resource"
                }
              }
            }
          },
          "400": {
            "description": "Bad request — validation error, including a missing or invalid `role_arn`, a duplicate `name`, or a duplicate `role_arn`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error-response"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized (missing or invalid API key)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error-response"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error-response"
                }
              }
            }
          }
        },
        "tags": [
          "S3 Accounts"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/s3-account-post-request"
              }
            }
          }
        },
        "x-readme": {
          "hidden": true
        }
      }
    }
  },
  "security": [
    {
      "ApiKeyAuth": []
    }
  ],
  "components": {
    "schemas": {
      "error-response": {
        "type": "object",
        "required": [
          "message"
        ],
        "properties": {
          "code": {
            "type": "string",
            "description": "A machine-readable error code"
          },
          "param": {
            "type": "string",
            "description": "The parameter that caused the error"
          },
          "message": {
            "type": "string",
            "description": "A human-readable error message"
          },
          "data": {
            "type": "object",
            "description": "Additional error context"
          }
        }
      },
      "s3-account-post-request": {
        "type": "object",
        "required": [
          "name",
          "role_arn",
          "external_id"
        ],
        "properties": {
          "name": {
            "type": "string",
            "description": "The name of the S3 Account"
          },
          "role_arn": {
            "type": "string",
            "description": "The IAM role ARN used to access S3 buckets via STS AssumeRole. Must match one\nof these forms:\n\n- No path: `arn:<partition>:iam::<12-digit-account-id>:role/<role-name>`\n- With path: `arn:<partition>:iam::<12-digit-account-id>:role/<role-path>/<role-name>`\n\n`<partition>` is `aws` or a lowercase hyphen-separated `aws-*` value such as\n`aws-us-gov`, `aws-cn`, or `aws-eu`. `<role-path>` segments may contain any\nprintable ASCII character except `/` and may be nested. `<role-name>` may\ncontain letters, digits, and `+=,.@_-`. Examples:\n`arn:aws:iam::123456789012:role/MyRole` or\n`arn:aws:iam::123456789012:role/team/platform/MyRole`."
          },
          "external_id": {
            "type": "string",
            "description": "The external ID used for secure cross-account role assumption"
          }
        }
      },
      "s3-account-resource": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "The unique identifier of the S3 Account"
          },
          "name": {
            "type": "string",
            "description": "The name of the S3 Account"
          },
          "role_arn": {
            "type": "string",
            "description": "The IAM role ARN used to access S3 buckets via STS AssumeRole"
          }
        }
      }
    },
    "securitySchemes": {
      "ApiKeyAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "X-API-KEY"
      }
    }
  },
  "servers": [
    {
      "url": "https://api.oneschema.co",
      "description": "Production server (hosted in the US)",
      "variables": {}
    },
    {
      "url": "https://api.eu.oneschema.co",
      "description": "Production server (hosted in the EU)",
      "variables": {}
    },
    {
      "url": "https://api.ca.oneschema.co",
      "description": "Production server (hosted in Canada)",
      "variables": {}
    },
    {
      "url": "https://api.au.oneschema.co",
      "description": "Production server (hosted in Australia)",
      "variables": {}
    }
  ],
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  }
}
```