CLI Reference

Directory Commands

CLI commands for managing directory entries — people and organizations

Directory Commands

The directory command group manages directory entries (contacts, payees, companies) within the active workspace.

directory list

List directory entries with optional filtering and pagination.

nextpay --env dev directory list
nextpay --env dev directory list --type person
nextpay --env dev directory list --type organization --status active --limit 50
nextpay --env dev directory list --cursor abc123
FlagRequiredDefaultDescription
--typeNoFilter by entry type. Valid values: person, organization.
--statusNoFilter by status. Valid values: active, inactive.
--limitNo25Maximum entries to return (1-100).
--cursorNoPagination cursor from a previous response.

directory get

Get a single directory entry by ID.

nextpay --env dev directory get entry_abc123
ArgumentRequiredDescription
idYesEntry ID (e.g., entry_abc123).

directory create

Create a new directory entry. Fields are passed as a JSON object.

# Create a person
nextpay --env dev directory create --type person \
  --fields '{"first_name":"Juan","last_name":"Dela Cruz","email":"juan@example.com"}'

# Create an organization
nextpay --env dev directory create --type organization \
  --fields '{"name":"Acme Corp","industry":"Technology"}'

# With explicit display name
nextpay --env dev directory create --type person --name "Juan Dela Cruz" \
  --fields '{"first_name":"Juan","last_name":"Dela Cruz"}'
FlagRequiredDescription
--typeYesEntry type. Valid values: person, organization.
--nameNoDisplay name (derived from fields if not set).
--fieldsNoFields as a JSON object. Required fields depend on type: person needs first_name and last_name; organization needs name.

directory update

Update an existing directory entry. Only provided fields are changed.

nextpay --env dev directory update entry_abc123 \
  --fields '{"email":"new@example.com"}'

nextpay --env dev directory update entry_abc123 --name "Updated Name"
Argument/FlagRequiredDescription
idYesEntry ID to update.
--nameNoNew display name.
--fieldsNoFields to update as a JSON object.

directory delete

Delete a directory entry.

nextpay --env dev directory delete entry_abc123
ArgumentRequiredDescription
idYesEntry ID to delete.

directory tags list

List all tags in the workspace.

nextpay --env dev directory tags list