Skip to main content
PATCH
/
v1
/
schemas
/
{schemaName}
curl --request PATCH \
  --url https://api.dynamosql.com/v1/schemas/{schemaName} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "tableAllowlist": [
    "Users",
    "Orders",
    "Products",
    "Inventory"
  ]
}
'
{
  "success": true,
  "data": {
    "tenantId": "tenant-abc123",
    "schemaName": "myschema",
    "region": "us-east-1",
    "accountId": "123456789012",
    "roleArn": "arn:aws:iam::123456789012:role/DynamoSQLReadRole",
    "externalId": "dsql-ext-7f3a9c2b",
    "tableAllowlist": [
      "Users",
      "Orders",
      "Products",
      "Inventory"
    ],
    "status": "active",
    "createdAt": "2026-01-15T10:30:00.000Z",
    "updatedAt": "2026-03-11T14:00:00.000Z"
  }
}
Required scope: schemas:write

Authorizations

Authorization
string
header
required

Bearer token obtained from POST /v1/auth/token. Pass in the Authorization header as Bearer <token>.

Path Parameters

schemaName
string
required

The schema name to update.

Body

application/json

All fields are optional; include only what you want to change. At least one field must be provided.

region
string

New AWS region for DynamoDB access.

Example:

"eu-west-1"

accountId
string

New AWS account ID.

Example:

"999888777666"

roleArn
string

New IAM role ARN to assume.

Example:

"arn:aws:iam::999888777666:role/DynamoSQLReadRole"

externalId
string

New external ID for sts:AssumeRole.

Example:

"dsql-ext-newvalue"

tableAllowlist
string[]

Replace the table allowlist. Pass an empty array [] to remove the allowlist restriction. Pass ["*"] for explicit wildcard. Pass table names for explicit access.

Example:
["Users", "Orders", "Products"]
status
enum<string>

Set to disabled to suspend the schema without deleting it. Set to active to re-enable. Re-enabling triggers a background metadata refresh.

Available options:
active,
disabled
Example:

"active"

Response

Schema updated.

success
boolean
required

true when the request was processed without errors, false otherwise. Always present.

data
object

A DynamoSQL schema record. A schema connects a logical name to the IAM role and AWS region DynamoSQL uses to access DynamoDB on your behalf via cross-account role assumption.

error
object

Present in the response body when success is false.