> ## 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 Category

> Push categories to a workspace

Upload local preference categories and translations to a workspace. Reads `categories_preferences.json` and translation files from the input directory. By default, changes are committed immediately (`--commit=true`).

You can pass `--commit=false` to push without committing, then commit later using the [`category commit`](/reference/cli-category-commit) command to make them live.

## Syntax

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

## Flags

| 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 category files                           | `./suprsend/category/` |
| `-j, --json string`           | Categories (and optional translations) as a JSON object       | –                      |

## Example

```bash theme={"system"}
# Push categories from default directory
suprsend category push

# Push categories from custom directory
suprsend category push --dir categories

# Push categories to production workspace
suprsend category push --workspace production

# Push categories with commit message
suprsend category push --commit=true --commit-message "Update notification preferences"

# Push categories inline via JSON
suprsend category push --json '{"categories":{"root_categories":[...]}}'

# Push categories with translations inline
suprsend category push --json '{"categories":{"root_categories":[...]},"translations":{"es":{"sections":{},"categories":{}}}}'
```

***

### Frequently Asked Questions

<Accordion title="I have pushed my categories but don’t see the updated categories in live mode.">
  You can view detailed logs by enabling debug mode `export DEBUG=true` in your terminal.
  In most cases, this happens when an existing preference category is being overridden by the latest push and that category is already linked to a workflow. When this occurs, the changes cannot be committed to **live mode**.

  The updated categories will still appear in **draft** mode, but you’ll need to update or unlink the workflows before committing the changes live.
</Accordion>
