FousDocs

Build or edit a tool

Build, edit or customize a tool, with explicit live-test authorization when the managed notice is active.

POST/v1/builds

Describe the data or action you need from a website and Fous explores it, builds the tool, verifies it with real runs and publishes it to your organization. Answers 202 with the build at once; poll GET /v1/builds/{build_id}?wait=170 until status is ready, failed or cancelled (a few minutes). With network sharing on, builds are free within the plan’s monthly allowance: 20 on pay-as-you-go, 50 on Plus and 100 on Pro, per UTC calendar month. Beyond the allowance, or with sharing off, a build costs 100 credits, charged when ready. Failed, cancelled or reused builds release unexpired reservations and do not count toward the allowance. Send Idempotency-Key to make the submission safe to repeat. Needs tools:write.

Requires Authorization: Bearer $FOUS_API_KEY. Create a key.

Headers

  • Idempotency-Keystring

    The same key with the same body returns the same build.

Request body

Required. JSON.

  • risk_acknowledgmentBuildRiskAcknowledgment

    Required once a managed build notice is active. A missing or outdated acknowledgment returns 409 risk_acknowledgment_required with the exact current notice in error.details.notice. Present its full text and affirmation and obtain explicit authorization before each build, edit or user-requested retry, then send its version. Live tests and repairs can perform repeated real actions. Never infer authorization from a request to build a tool.

  • promptstringrequired

    What the tool should return or do, in plain words. Name the website.

  • urlstring

    A page to start from.

  • urlsarray of string

    Pages to start from, when you know them.

  • apistring

    Edit this tool of yours instead of building a new one.

  • method_idinteger

    With api: customize this public method as your organization’s own.

  • connectionsobject

    Connected accounts the tool signs in with: alias → connection id.

  • environmentobject

    Keys the tool needs, by name → value (an .env). Saved with the tool, never returned.

  • visibilitystring

    private (the default) keeps the tool to your organization.

    "private""public"

  • contributeboolean

    Let Fous publish a general version to the network after ten runs. Eligible for the plan’s monthly free-build allowance; beyond it, a build costs 100 credits. Defaults to the organization’s setting.

  • idempotency_keystring

    Optional; the Idempotency-Key header does the same.

Response 202

Admitted; or the build this Idempotency-Key already started

  • successtruerequired
  • dataBuildrequired

    A build: from queued through exploring, compiling, verifying and publishing to ready, failed or cancelled. Once ready, api names the tool and method its operation; prepared_request carries an input the builder verified it with.

Errors

Every failure is an Error: branch on error.code. The errors guide lists each code.

  • 400
  • 401WWW-Authenticate
  • 402
  • 403
  • 404
  • 408
  • 409
  • 410
  • 413
  • 422
  • 429Retry-After
  • 500
  • 502
  • 503Retry-After
  • 504