Skip to content
Fous Docs
MarkdownStudio

Builds

Build a method, steer it with messages, and follow it to the end.

The Build object

  • idstringrequired

    bld_ followed by 26 characters.

  • statusstringrequired

    building: still going. ready: method is what it made. requires_auth: it waits for a connected account on the site and goes on by itself once there is one. unsupported: it ended without a method; reason says why.

    buildingreadyrequires_authunsupported

  • kindstringrequired

    new: a new method (based_on when it was started from another). change: a change of the method in based_on, which improves its version in place when the contract stays, else makes its next version. repair: Fous repairing a version of your method.

    newchangerepair

  • effectstring

    What the method does: read gets data; write does something on the site, which the build does once for real.

    readwrite

  • querystringrequired

    The request the builder works on; a follow-up’s also carries the request it goes on from.

  • askedstringrequired

    The person’s own words.

  • imagesarray of object

    The images sent with the request.

    Show child attributes
    • urlstringrequired

      GET it with your key.

  • platformstring
  • queueobject

    A change waiting for the one running on the same method (one change at a time per method, repairs first): how many are ahead of it.

    Show child attributes
    • aheadintegerrequired
  • eventsarray of objectrequired

    What the build said as it worked, oldest first.

    Show child attributes
    • atstringrequired
    • kindstringrequired

      note: what the builder found or decided, in its own words. status: what it is doing (the latest is the live line).

      notestatus

    • messagestringrequired
  • messagesarray of object

    What the person sent to the build, oldest first.

    Show child attributes
    • atstringrequired
    • textstringrequired
    • imagesarray of object
      Show child attributes
      • urlstringrequired

        GET it with your key.

    • seenbooleanrequired

      The builder took it in. One it did not take in went on to the next build (next), unless the build had done its action on the site.

  • followsstring

    The build of the same thread this one goes on from.

  • nextstring

    The next build of the thread: messages this one did not take in went on there.

  • reasonstring

    Why it ended as it did, in a plain sentence; for a version your organization is not on, what it changes and how to switch.

  • outcomeobject

    Once ended, what the build made: improved (the version revised in place, for everyone using it), new_version, new_method, already_done (the version already does this; free) or repaired.

    Show child attributes
    • typestringrequired

      improvednew_versionnew_methodalready_donerepaired

    • versioninteger
  • may_have_runboolean

    A write build ended unsure whether its action reached the site: check there before asking again.

  • based_onobject

    The method and version it changes or was started from.

    Show child attributes
    • idstringrequired
    • slugstringrequired
    • namestringrequired
    • versioninteger

      The version, when one is meant.

  • methodMethod
  • performedboolean

    A write build did the action once, for real.

  • resultobject

    performed: what the site answered.

    Show child attributes
    • dataJSON value
  • estimateobject

    While building: how long recent builds took. low_seconds to high_seconds is the middle half; median_seconds is the middle one.

    Show child attributes
    • low_secondsinteger
    • high_secondsinteger
    • median_secondsinteger
    • samplesinteger
  • created_atstringrequired
  • completed_atstring

List builds

Your organization’s 50 newest builds of the past 30 days, newest first, with the repairs of its methods; dismissed ones are left out. Free.

Returns

  • 200The builds.

The answer has these fields:

Build a method

Builds a method for one capability, on the site you name or on the sources that answer it best (merged when several have it), usually in about a minute (a site that is harder to read can take a few). A build makes a new method of your organization, public unless you send visibility private (anyone can find and run a public one, with their own accounts): search is where existing methods are found. With method it changes that method (any public one, or your own; @N starts from one version, else the latest): a change that keeps its inputs and outputs improves the version in place, for everyone using it, free, and only when it still answers the saved inputs at least as well; one that changes them makes the next version; a different capability, visibility private on another organization’s method, or a change by a non-owner to a method that signs in or acts makes a method of your own, based on it. One change at a time runs per method (queue says how many are ahead); a request the version already does ends at once with outcome already_done, free. Steer it with POST /v1/builds/{id}/messages. A public build is free within the plan’s monthly allowance, then 100 credits; a private one always costs 100 credits; a build that makes no new method is free.

Request body

Required, JSON.

  • querystringrequired

    What the method should read or do, in plain words.

  • platformstring

    The website (a domain); without it the builder picks the sources.

  • inputobject

    Values to build with: the first test input. A write build does the action once for real, with these values or made-up ones.

  • input_schemaobject

    The inputs you want the method to take, as a JSON Schema object.

  • output_schemaobject

    The fields you want back, as a JSON Schema object.

  • methodstring

    A method id or slug to change (@N: from that version): improved in place, its next version, or a method of your own from it.

  • imagesarray of object

    Up to 4 pictures that show what you mean (PNG, JPEG, WebP or GIF), 2.5 MB in all: each {"url"} (a public https address Fous reads) or {"media_type", "data"} (base64).

  • visibilitystring

    Required for a new method (without method). public: anyone can find and run it, with their own accounts. private: only your organization, for 100 credits; on another organization’s method it makes a method of your own. A new method made from one of your private methods is private unless you send public.

    publicprivate

  • connectionsarray of string

    The connections (logins or API keys, on any sites) the build may use: on each site it signs in to, the one of that site; an empty list builds without any. Without it, the site’s default login.

Returns

A Build object.

  • 200The same request already waits for a connected account (requires_auth); it goes on by itself once there is one.
  • 202Building: a new build, the same request already running (joined), or the change already running on that method, which takes this request as a message. Poll GET /v1/builds/{id}. The same Build, with status "building".

Errors

StatusCodeWhen
400invalid_requestInvalid body or schema
402insufficient_creditsAllowance used and not enough credits
403forbiddenOnly owners and admins build
404not_foundNo method to start from, or no such version of it
413invalid_requestThe body is over 4 MB
422not_buildablerequest_refusedNo website, app, account or API is involved (not_buildable), or the request check turned it away (request_refused, with its verdict as reason)
429rate_limitedToo many requests for the plan this minute
503service_unavailableThe builder or billing is briefly unavailable; nothing was charged

Get a build

The build: its status, what it said as it worked (events), the messages sent to it, and the method once ready. requires_auth means the site needs a connected account first. Free.

Path parameters

  • idstringrequired

Query parameters

  • waitintegerdefault 0

    Seconds to hold the answer while it is still running, 0 to 60.

  • afterinteger

    The number of events you have: a wait ends as soon as there are more.

Returns

A Build object.

  • 200Finished.
  • 202Still building. The same Build, with status "building".

Errors

StatusCodeWhen
404not_foundNo such build

Dismiss a build

Takes a finished build off the list; the method it made stays. A build waiting for a connected account ends. Free.

Path parameters

  • idstringrequired

Returns

  • 200Dismissed.

The answer has these fields:

  • idstring
  • dismissedboolean

Errors

StatusCodeWhen
404not_foundNo such build
409conflictStill building

Cancel a build

Cancels a build that is still going: it ends with the reason "Stopped." and nothing is charged for it. A write build that already sent its action says so. Free.

Path parameters

  • idstringrequired

Returns

A Build object.

  • 200Stopped.

Errors

StatusCodeWhen
404not_foundNo such build
409conflictAlready ended

Message a build

Sends a message to a build, checked like a build request. A running build takes it at its next step (202 with the same build; seen turns true once it has). After the build ended, the message starts the next build of the thread: a change to the method it made, or the request again with the message (a new build whose follows names this one, priced as a build).

Path parameters

  • idstringrequired

Request body

Required, JSON.

  • textstringrequired

    Your message, in plain words.

  • imagesarray of object

    Up to 4 pictures that go with it, 2.5 MB in all: each {"url"} (a public https address) or {"media_type", "data"} (base64).

Returns

A Build object.

  • 200The next build of the thread waits for a connected account (requires_auth).
  • 202The running build takes it at its next step, or the next build of the thread started. The same Build, with status "building".

Errors

StatusCodeWhen
400invalid_requestInvalid body
402insufficient_creditsAllowance used and not enough credits
403forbiddenOnly owners and admins change builds
404not_foundNo such build
413invalid_requestThe body is over 4 MB
422not_buildablerequest_refusedNo website, app, account or API is involved (not_buildable), or the request check turned it away (request_refused, with its verdict as reason)
429rate_limitedToo many requests for the plan this minute
503service_unavailableThe builder or billing is briefly unavailable; nothing was charged

Get a build image

An image sent with a build request or a message, by its position (the url in images names it). Free.

Path parameters

  • idstringrequired
  • positionintegerrequired

Returns

The file, as image/*.

  • 200The image.

Errors

StatusCodeWhen
404not_foundNo such image