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| Flag | Required | Default | Description |
|---|---|---|---|
--type | No | — | Filter by entry type. Valid values: person, organization. |
--status | No | — | Filter by status. Valid values: active, inactive. |
--limit | No | 25 | Maximum entries to return (1-100). |
--cursor | No | — | Pagination cursor from a previous response. |
directory get
Get a single directory entry by ID.
nextpay --env dev directory get entry_abc123| Argument | Required | Description |
|---|---|---|
id | Yes | Entry 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"}'| Flag | Required | Description |
|---|---|---|
--type | Yes | Entry type. Valid values: person, organization. |
--name | No | Display name (derived from fields if not set). |
--fields | No | Fields 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/Flag | Required | Description |
|---|---|---|
id | Yes | Entry ID to update. |
--name | No | New display name. |
--fields | No | Fields to update as a JSON object. |
directory delete
Delete a directory entry.
nextpay --env dev directory delete entry_abc123| Argument | Required | Description |
|---|---|---|
id | Yes | Entry ID to delete. |
directory tags list
List all tags in the workspace.
nextpay --env dev directory tags list