> ## Documentation Index
> Fetch the complete documentation index at: https://docs.suprsend.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Push Schema

> Push schemas

Upload local schema JSON files to a workspace. Reads `.json` files from the input directory and pushes them. By default, changes are committed immediately (`--commit=true`). Use `--slug` to push a single schema. <br />
Any schema that fails validation will be skipped and not pushed to the workspace.

## Syntax

```bash theme={"system"}
suprsend schema push [flags]
```

## Options

| Flag                          | Description                                                                                | Default             |
| ----------------------------- | ------------------------------------------------------------------------------------------ | ------------------- |
| `-h, --help`                  | Show help for the command                                                                  | –                   |
| `-c, --commit string`         | Promote changes from draft to live after pushing (true/false)                              | `true`              |
| `-m, --commit-message string` | Message describing the changes being committed                                             | –                   |
| `-d, --dir string`            | Directory containing schema JSON files                                                     | `./suprsend/schema` |
| `-g, --slug string`           | Schema slug to push (omit to push all)                                                     | –                   |
| `-j, --json string`           | Schema definition as a JSON object (requires `--slug`). Must be a valid JSON Schema object | –                   |

## Example

```bash theme={"system"}
# Push schemas to staging workspace (default)
suprsend schema push

# Push schemas to production workspace
suprsend schema push --workspace production

# Push individual schema by passing it's slug
suprsend schema push --slug my-schema

# Push schemas and commit them
suprsend schema push --commit=true --commit-message "Commit message"

# Push a single schema inline via JSON
suprsend schema push --slug order-payload --json '{"type":"object","properties":{"key":{"type":"string"}}}'
```

***

<Warning>
  🚨 **Push and Commit Behavior**:

  * **Schemas not showing up in live mode?** → Check if they're linked to workflows
  * **Fix**: Update your workflow files to include the new schemas, or remove the workflow links
</Warning>
