Pollaris Docs
Pollaris CLI

Create forms with an agent

Ask an AI agent to create a Pollaris form and finish authorization without opening the dashboard.

Configure production

Install the CLI using Installation, then configure the API in the terminal or agent environment:

export POLLARIS_API_URL=https://api.pollaris.cc

Ask in plain language

After installing the CLI, tell a terminal-capable agent:

Create a library feedback form via Pollaris. Make it short, include a 1–5 visit rating and an optional comment, and publish it. Give me only the authorization step and final public URL unless something fails.

The agent should run:

pollaris forms create \
  --prompt "Create a short library feedback form with a 1–5 visit rating and an optional comment" \
  --publish \
  --wait \
  --json

When authorization is required, the command exits with code 10 and returns:

{
  "schema_version": "1",
  "status": "requires_authorization",
  "operation_id": "00000000-0000-0000-0000-000000000000",
  "authorization": {
    "url": "https://app.example.com/connect/device?user_code=ABCDE-FGHIJ",
    "user_code": "ABCDE-FGHIJ",
    "expires_at": 1788869400
  },
  "next_action": {
    "command": "pollaris operations resume 00000000-0000-0000-0000-000000000000 --profile default --wait --timeout 45 --json"
  }
}

Open the URL and approve access. The agent runs next_action.command; you do not need to repeat the form request. If the agent session stopped, you can run that command yourself.

Completed output contains the form and public URL:

{
  "schema_version": "1",
  "status": "completed",
  "operation_id": "00000000-0000-0000-0000-000000000000",
  "job_id": "11111111-1111-1111-1111-111111111111",
  "form": {
    "id": "22222222-2222-2222-2222-222222222222",
    "title": "Library feedback",
    "status": "published",
    "version": 1,
    "public_url": "https://forms.example.com/f/example"
  },
  "warnings": []
}

Reliable agent instructions

Give your agent these rules when needed:

Use `pollaris ... --json` for every command. If the result is
`requires_authorization`, show me `authorization.url`, then run the returned
`next_action.command`. If the result is `pending`, continue with the same
operation ID. Never print credentials or create a second operation to retry.

Choose a workspace

Authorization applies to one workspace. If your account has several workspaces, select one on the authorization page or pass its ID:

pollaris forms create \
  --workspace 00000000-0000-0000-0000-000000000000 \
  --prompt "Create a member satisfaction form" \
  --json

Use a separate profile for a different workspace:

pollaris forms create --profile community-library --prompt "Create a visitor survey" --json

Create a draft

pollaris forms create \
  --prompt "Create a library feedback form" \
  --draft-only \
  --json

Draft output does not contain a public URL. Publish the inspected revision later with pollaris forms publish.

Continue after a timeout

A wait timeout does not cancel the backend job. Resume the saved operation:

pollaris operations resume OPERATION_ID --wait --timeout 45 --json

Use the same operation and idempotency key. Starting a fresh command may represent a second intended form.

On this page