The Connection object
idstringrequiredconn_ followed by 26 characters.
sitestringrequiredThe site’s domain, like example.com.
site_namestringrequiredThe site’s name, like Example.
typestringrequiredsession: a website login; api_key: the site’s own API key.
sessionapi_keystatusstringrequiredpending: not signed in yet. active: runs use it. needs_attention: the site signed it out, or the key stopped working; sign in again (connect_url, or POST /v1/connections/{id}/sign-in).
pendingactiveneeds_attentiondefaultbooleanrequiredRuns on this site use it unless a call names another. A site’s logins and its API keys each have their own default.
account_hintstring or nullWhat account this is: session, the identifier it signed in with, in full; api_key, the last characters of the saved key.
labelstring or nullThe organization’s name for the account ("US warehouse"), to tell several on one site apart; null: none.
connect_urlstringsession, until active or while it signs in again: a Fous Studio page where a person signs in to this connection.
countrystringsession only: the country the login signs in and every run on it leaves from.
renewalobjectsession only: whether the login can sign back in by itself when its session ends. status ready: it can; needs_setup: it needs an authenticator key (PATCH totp) or verification emails forwarded to inbound_email; manual: only a person can (device approval, no saved password, or the site turned the saved details down). message says which, in a sentence for people.
Show child attributesHide child attributes
statusstringrequiredreadyneeds_setupmanualfactorstringrequiredThe second factor sign-in saw last: none, an authenticator (totp), an emailed or texted code, code when the screen did not say from where, or approval on a device.
nonetotpemailsmscodedevicemessagestringrequiredinbound_emailstringThe address to forward this login’s verification emails to (in_<token>@…). Whoever knows it can deliver codes to its sign-in.
totp_savedbooleantrue when an authenticator key is saved on this login. The key itself is never returned.
waiting_workflowsarray of stringneeds_attention, when this one connection is read: the names of the workflows waiting on it.
sign_inobjectA website sign-in, while it runs and for a while after it failed. Answer its step with POST /v1/connections/{id}/sign-in.
Show child attributesHide child attributes
statusstringrequiredworking: Fous is on the site, wait (GET /v1/connections/{id}?wait=). input: the site asks for fields or a choice, or Fous asks how to go on (question). approval: the person approves the sign-in on their device or by email, wait. failed: message says why.
workinginputapprovalfailedstep_idstringinput and approval: the step an answer is for.
messagestringrequiredWhat the site asks for, or why it failed, in a sentence for the person.
codestringapproval: the number the site shows, which the person picks on their device.
factorstringA code or approval step: the second factor it asks for. totp: an authenticator app; email or sms: where the code was sent; code: the screen did not say; device: approval on a device.
totpemailsmscodedevicetry_countrybooleanfailed: the site could not be opened or says it does not serve this country; signing in again with country may work.
rejectedbooleaninput: true when the website turned down the last answer; message says so and the same fields are asked again.
questionbooleaninput: Fous could not tell how to sign in from this page and asks; message says what it sees, choices are the page’s ways forward. Answer with a choice, or with hint (what to do, or the sign-in page’s address). It waits at most 3 idle minutes, then the browser closes.
screenshotstringquestion, repeated or check: a picture of the page as Fous sees it (a JPEG data URL), with what is typed in its fields hidden.
repeatedbooleaninput: the website came back to the step just answered without saying the answer was wrong. message says why, in the page’s own words when it gave any; the same fields or choices are asked again.
checkbooleaninput: the website shows a check that a person is there, which Fous’s browser did not pass by itself. The person completes it in screenshot: send each click as click with step_id. Fous never solves a check itself; a sign-in with no person reports that one is needed.
started_atstringWhen the sign-in started.
fieldsarray of objectrequiredWhat the site asks for. Values are never stored or returned.
Show child attributesHide child attributes
idstringrequiredThe key of its value in fields.
labelstringrequiredWhat to ask the person for.
typestringrequiredcheckbox: true or false. select: one of options’ values. link: a sign-in link the person copies from an email without opening it. Every other type: text.
emailtextpasswordcodeselectcheckboxlinkrequiredbooleanrequiredoptionsarray of objectselect: the values it takes.
Show child attributesHide child attributes
valuestringrequiredlabelstringrequired
lengthintegercode: how many characters, when known.
choicesarray of objectrequiredinput: ways to go on (send one as choice), such as where to send a code.
Show child attributesHide child attributes
idstringrequiredlabelstringrequired
expires_atstringWhen the sign-in ends unless it moves on.
sign_in_endedobjectA sign-in the call waited on ended without signing in. An account connected before is unchanged.
Show child attributesHide child attributes
reasonstringrequiredcancelledmessagestringrequired
messagestringPOST /v1/connections for a site whose login is already connected: states that runs use this connection and how to add another.
checked_atstring or nullcreated_atstring
List connections
Your organization’s connections, with any sign-in that runs. Free.
Returns
- 200The organization’s connections.
The answer has these fields:
Connect an account
type "session": a website login, signed in inside Fous one step at a time. The response carries the first step (sign_in, after up to wait seconds): the fields the site asks for, which you answer with POST /v1/connections/{id}/sign-in, or the person signs in at connect_url, a Fous Studio page. After its first sign-in, a connection is active and becomes the site’s default unless the site already has a working default. If the site already has a login that needs signing in (a sign-in never finished, or the site signed it out), a sign-in starts and the response is 200 with its first step; a working login comes back as it is. To add another account instead, send another: true or a label no connection on the site has; a new website login counts against the plan’s logins. To sign in a different account on the same connection, restart its sign-in. type "api_key": the site’s own API key, stored encrypted and never returned. Sending the same key again returns 200 with the existing connection (made the site’s default), unless you send another: true or a different label. API keys do not count against the plan’s logins.
Request body
Required, JSON.
sitestringrequiredThe site’s domain, like example.com.
typestringrequiredsessionapi_keyapi_keystringtype api_key only.
login_urlstringtype session only: the site’s sign-in page (https, on the site), when it is not the obvious one.
hintstringtype session only: how the person says to sign in, in their words ("use SSO, then pick the Acme workspace"). Fous follows it, and the way it took is remembered for signing in again unattended. Never a password, code or key: those are refused (400).
labelstringA name for the account ("Client A"), to tell several on one site apart. A label no connection on the site has creates an additional connection; a label one has returns that connection.
totpstringtype session only: an authenticator setup key (a base32 key, or an otpauth:// or otpauth-migration:// URL), so Fous can answer the site’s authenticator codes. Never returned.
countrystringtype session only: the country the login signs in from and every run on it leaves from, as a two-letter code such as us or de. Left out, Fous chooses from the site. Changing it means signing in again, with country on the sign-in.
anotherbooleanCreate an additional connection on a site that already has one, instead of returning the existing one. The site’s working default stays the default.
waitintegerdefault30type session: seconds to wait for the sign-in’s first step.
Returns
A Connection object.
- 200The site’s connection already there: its login (with its sign-in, started when the login needs one), or that API key saved before.
- 201Created; a login’s sign-in is under way. The same Connection, with status "pending".
Errors
| Status | Code | When |
|---|---|---|
| 400 | invalid_request | Invalid body |
| 403 | plan_limit | The plan’s website logins are all in use |
| 429 | rate_limited | Too many requests for the plan this minute |
| 503 | service_unavailable | Sign-in is temporarily unavailable |
Check a connection
The connection and its sign-in, if one runs. With wait, the answer is held while the sign-in works or waits for the person’s approval, until it moves on.
Path parameters
idstringrequiredconn_ followed by 26 characters.
Query parameters
waitintegerdefault0Seconds to hold the answer while the sign-in works or waits for an approval, 0 to 60.
Errors
| Status | Code | When |
|---|---|---|
| 400 | invalid_request | wait is not 0 to 60 |
| 404 | not_found | Unknown connection |
Update a connection
Makes the connection its site’s default: the account runs and builds on that site use when a call names none (a working connection still comes before a default that does not work); or names it (label).
Path parameters
idstringrequiredconn_ followed by 26 characters.
Request body
Required, JSON.
defaultbooleantruetotpstring or nullAn authenticator setup key to save (a base32 key, or an otpauth:// or otpauth-migration:// URL); null removes the saved one.
labelstring or nullThe account’s name; null or "" clears it.
Errors
| Status | Code | When |
|---|---|---|
| 404 | not_found | Unknown connection |
Delete a connection
Disconnects the account, the same as Disconnect in Studio: any running sign-in stops, its browser sessions close, and its saved key or sign-in is wiped. Works with an API key or a Studio session; a session needs the owner, admin or member role.
Path parameters
idstringrequiredconn_ followed by 26 characters.
Returns
- 200Disconnected.
The answer has these fields:
idstringdeletedboolean
Errors
| Status | Code | When |
|---|---|---|
| 404 | not_found | Unknown connection |
Run a sign-in
A website login’s sign-in, run inside Fous. {"start": true} starts one (or answers with the one that runs); {"restart": true} starts again in its place, for instance to sign in another account; login_url names the sign-in page and starts one too. {"step_id", "fields"} answers the current step with the person’s details, by field id; {"step_id", "choice"} picks one of its choices; {"step_id", "hint"} tells Fous in words what to do (it reads the screen again with it); {"step_id", "click"} passes the person’s click on a check step’s picture to the page. Reading a sign-in going on is GET /v1/connections/{id}?wait=. Starting a sign-in is your word, under the Terms, that you may use the account; the connection keeps who started it and when. Each call waits up to wait seconds while the sign-in works, then answers with the connection and its next step (sign_in), until it is active. Values are used once to sign in and never returned; Fous keeps them sealed only to sign the account in again by itself when the site signs it out. Starting a sign-in counts against the plan’s requests per minute.
Path parameters
idstringrequiredconn_ followed by 26 characters.
Request body
Required, JSON.
startbooleantrue: start a sign-in, or answer with the one that runs.
restartbooleantrue: start a sign-in in place of the one that runs.
countrystringSign in from this country (two letters): the login moves there once the sign-in succeeds; until then it stays where it is.
login_urlstringThe site’s sign-in page (https, on the site) to start the sign-in at.
totpstringAn authenticator setup key to keep (a base32 key, or an otpauth:// or otpauth-migration:// URL). Sent alone while a code step waits, its current code is typed in.
step_idstringThe step you answer (sign_in.step_id).
fieldsobjectWith step_id: a value for each of the step’s field ids (required ones filled in).
choicestringWith step_id: the id of one of the step’s choices.
clickobjectWith step_id, on a check step (sign_in.check): where the person clicked in its screenshot, as fractions of its width and height. Fous clicks the page there, then shows the next step (a new picture while the check is still there).
Show child attributesHide child attributes
xnumberrequiredynumberrequired
hintstringThe person’s instruction in their words ("use SSO", or the sign-in page’s address). With step_id alone, Fous reads the screen again with it; with start or restart, the sign-in starts with it. Followed until done, then dropped. Never a password, code or key (400); while a step asks for a password or a code, a single word is refused too.
waitintegerdefault30Seconds to wait for the next step.
Returns
A Connection object.
- 200The connection and its next step; active, without sign_in, once signed in.
Errors
| Status | Code | When |
|---|---|---|
| 400 | invalid_request | Invalid answer, an API key, or nothing to do (no start, restart, login_url or answer) |
| 404 | not_found | No such connection, or no sign-in runs |
| 409 | conflict | Still working on the last answer, or not the current step |
| 429 | rate_limited | Too many requests for the plan this minute |
| 503 | service_unavailable | Sign-in is temporarily unavailable |
Cancel the sign-in
Stops the sign-in that runs (none: nothing to stop). The connection keeps its status.
Path parameters
idstringrequiredconn_ followed by 26 characters.
Errors
| Status | Code | When |
|---|---|---|
| 400 | invalid_request | An API key |
| 404 | not_found | Unknown connection |
Deliver a verification code or link
Hands Fous a verification code or a sign-in link for this login, from anything that can POST: an SMS forwarder, a Power Automate flow, a script reading a mailbox. content is the raw message; Fous finds the code or link in it. A sign-in waiting on one takes it at once; otherwise the next unattended sign-in does. Stale messages are ignored.
Path parameters
idstringrequiredconn_ followed by 26 characters.
Request body
Required, JSON.
contentstringrequiredThe message, as received.
waitintegerdefault0Seconds to wait for the sign-in to take it.
Errors
| Status | Code | When |
|---|---|---|
| 404 | not_found | Unknown connection |