Website Agent API

    The Website Agent builds a Fly site from the business's Google profile and keeps it in step, or works on the business's own site: it checks the pages, reads where the site ranks on Google and writes articles that go live once the owner approves.

    Through the API your code reads and changes the site, its domains and its articles, connects the owner's own site, and reads search rank and how AI answers name the business.

    What the Website Agent does and its plan

    The Website Agent plan, one for each website. The price is on the plans page.

    New to the API? Start with Getting started: the key, the address, the errors and the limits.

    Getting started with this agent

    These are done in the Fly app, signed in, because the API cannot do them.

    1. Choose the Website Agent plan. In the app: Billing.
    2. To work on the business's own site, connect it on the Website page, or with web_cms_connect (a CMS) or web_code_connect (a repository). The tool fly_connect_links with kinds set to ["web"] gives the web connect page, which opens without signing in, for whoever manages the site. In the app: Website (/app/l/{location_id}/website).
    3. Make a key on the AI assistants page and give it the Website Agent. In the app: AI assistants.
    4. Switch it on for the location with the settings op on the account page: changes.enabled_checks.web_agent set to true.

    The working loop

    1. Find the location: GET /v1/workspaces lists each location with its location_id; agents_on holds "web" where the Website Agent is switched on.
    2. Read the agent's home: POST /v1/tools/fly_home with location_id and agent "web" answers the Website Agent's cards that need the owner (cards.needs_you), the ones in flight, its recent activity, rank and health.
    3. Decide each card: POST /v1/locations/{location_id}/ops/respond with the card's id as action_id and a decision (approve, reject, done, dismiss, submit, change or undo_dismiss). The tool fly_card gives one card whole first.
    4. Read its report: POST /v1/tools/fly_report with agent "web" and from and to dates (YYYY-MM-DD) answers the headline numbers, each section and the first rows of each table; the op web_report on the account page answers the report whole.
    The Website Agent's home
    curl -X POST https://www.fly-social.com/api/v1/tools/fly_home \
      -H "Authorization: Bearer fmk_your_key" \
      -H "Content-Type: application/json" \
      -d '{"location_id":"3f6c2b1e-8d4a-4c7e-9b2f-1a5d7e9c0b84","agent":"web"}'

    The Fly website

    Ask for a Fly site, preview it, pick its look, send it photos, and read or put back its kept versions.

    The Fly website
    OperationKindWhat it doesParams
    website_buildWriteAsk for a Fly website.{}
    website_preview_startWriteStart that preview.{}
    website_preview_getReadThe private preview of a free site on the Web plan.{}
    website_looksReadThe looks a Web plan site may wear.{}
    website_look_setWriteChange the look.{ look: front-page | marquee | workshop | lantern | signboard }
    website_photosWriteSend photos for the website.{ photos: [{ url }] }
    website_versions_listReadThe website's kept versions.{}
    website_version_previewReadOne version's HTML.{ version_id }
    website_version_restoreWritePut a version back.{ version_id }
    site_previewReadA screenshot of a page.{ url }

    Example: The site's kept versions

    POST /v1/locations/{location_id}/ops/website_versions_list
    curl -X POST https://www.fly-social.com/api/v1/locations/3f6c2b1e-8d4a-4c7e-9b2f-1a5d7e9c0b84/ops/website_versions_list \
      -H "Authorization: Bearer fmk_your_key" \
      -H "Content-Type: application/json" \
      -d '{}'

    The answer. kept, can_restore, site and versions, newest first: when, what changed in plain words, the pages it touched and who asked.

    The website check and changes

    The latest website check and its recommendations, a change asked for on the Fly site and how it is going, and the developer handover email.

    The website check and changes
    OperationKindWhat it doesParams
    website_checkReadThe latest website check and its recommendations.{}
    website_changeWriteAsk for a change on the Fly website (counts on the trial).{ instruction }
    website_change_statusReadHow a website change is going.{ action_id? }
    website_developer_getReadThe developer handover email.{}
    website_developer_sendWriteSend the developer handover email (the website check card's id), or an Ads tracking tag card's tags to the web developer (ads_pixel_install, ads_conversion_tag; ADS-DEVMAIL-1).{ action_id, emails: string[], note?, auto_send?: boolean }

    Example: The latest website check

    POST /v1/locations/{location_id}/ops/website_check
    curl -X POST https://www.fly-social.com/api/v1/locations/3f6c2b1e-8d4a-4c7e-9b2f-1a5d7e9c0b84/ops/website_check \
      -H "Authorization: Bearer fmk_your_key" \
      -H "Content-Type: application/json" \
      -d '{}'

    The answer. check (the score, each part, the title, the summary lines and the site health), or null when no check has run yet, the open card and the recommendations.

    Domains

    The domains of the business: whether a name is free, the names proposed, and pointing the owner's own domain at the site through its provider or by DNS steps.

    Domains
    OperationKindWhat it doesParams
    domain_stateReadDomains: the site, the plan, the names held.{}
    domain_proposeReadDomain names proposed for the business.{ page? }
    domain_checkReadIs a domain available.{ name }
    domain_contactReadThe contact fields a domain order needs.{ name }
    domain_transfer_codeWriteThe transfer code of a domain Fly bought.{ domain }
    website_domain_setupWriteThe steps page for the owner's own domain.{ domain? }
    website_domain_connectWriteConnect a domain through its provider.{ domain, method: domain_connect | entri, return_path }
    website_domain_instructionsWriteEmail the DNS steps for a domain.{ domain, emails: string[] }
    website_domain_watchWriteWatch a domain until it points at the site.{ domain, method?: domain_connect | entri }

    Example: Is a domain free

    POST /v1/locations/{location_id}/ops/domain_check
    curl -X POST https://www.fly-social.com/api/v1/locations/3f6c2b1e-8d4a-4c7e-9b2f-1a5d7e9c0b84/ops/domain_check \
      -H "Authorization: Bearer fmk_your_key" \
      -H "Content-Type: application/json" \
      -d '{"name":"yourbusinessname.com"}'

    The answer. state (available, taken or unsupported) and domain, with up to five close names that are free when it is taken.

    The owner's own site

    Connect the owner's own site (a CMS such as WordPress, or a custom-built site's repository), read its pages, and ask for a change: the agent reads the page, makes only the change asked, writes it back and keeps Undo.

    The owner's own site
    OperationKindWhat it doesParams
    web_cms_kindsReadThe CMS kinds the Website Agent can connect.{}
    web_cms_connectWriteConnect the owner's own site (a CMS; Blogger signs in through Google in the app).{ kind: wordpress | shopify | wix | webflow | joomla | drupal | hubspot | ghost | duda | bigcommerce | magento | prestashop | contentful | strapi, fields: { site_url, login?, secret, ... } }
    web_cms_statusReadThe owner's own site connection.{}
    web_cms_disconnectWriteDisconnect the owner's own site.{}
    web_cms_pagesReadThe pages of the owner's own connected site (its own pages, not its posts), with their ids and addresses; unsupported where the kind lists none.{}
    web_cms_page_getReadOne page of the owner's own connected site as the site keeps it: its HTML (cut at 60 KB), title, excerpt and search title.{ remote_id? | url? }
    web_cms_changeWriteChange content on the owner's own connected site (WordPress, Ghost, Drupal, Magento, PrestaShop): the agent reads the page, makes only the change asked, writes it back and keeps Undo.{ instruction, page?: { remote_id? | url? } }
    web_cms_change_statusReadHow the changes asked for on the owner's own site are going: the newest 10, or one, with what was done and whether Undo is offered.{ action_id? }
    web_code_connectWriteConnect a custom-built site's repository.{ repo, access_token }
    web_code_statusReadA custom-built site's GitHub connection.{}
    web_code_disconnectWriteDisconnect the repository.{}

    Example: The own site's connection

    POST /v1/locations/{location_id}/ops/web_cms_status
    curl -X POST https://www.fly-social.com/api/v1/locations/3f6c2b1e-8d4a-4c7e-9b2f-1a5d7e9c0b84/ops/web_cms_status \
      -H "Authorization: Bearer fmk_your_key" \
      -H "Content-Type: application/json" \
      -d '{}'

    The answer. connected, kind, name, site_url, status, verified_at and last_error, the connection as it stands.

    Articles

    The articles on the Fly site and the owner's own: topics and articles the agent writes, the owner's own article prepared and published, and the questions the agent asks when an article is short of material.

    Articles
    OperationKindWhat it doesParams
    blogs_listReadThe Fly site's articles: published, scheduled, drafts.{}
    blog_topicsWriteArticle topics for the business (AI).{}
    blog_writeWriteWrite an article on a topic (AI).{ topic }
    blog_saveWriteSave an article, now or for a day.{ id?, title, body, at?, ai? }
    blog_unscheduleWriteTake an article off its day.{ id }
    article_anotherWriteSuggest another article on an article card.{ action_id }
    web_articles_listReadThe articles the Website Agent published, and the ones scheduled.{}
    web_article_prepareWritePrepare the owner's own article for publishing.{ title, body, search?, picture_url?: url | none, seo_title?, description?, target?: fly | cms, polish?: boolean }
    web_article_publishWritePublish it, now or at a time: send the same words and choices again (the prepared answer is not read back).{ title, body, search?, seo_title?, description?, picture_url?: url | none, target?: fly | cms, kind?: own | polished, source?: written | upload, file_name?, when?: ISO | now }
    web_article_cancelWriteCancel a scheduled article.{ action_id }
    web_interview_getReadThe questions for an article short of material.{ interview_id? }
    web_interview_answerWriteAnswer them (no interview_id: the newest open one).{ interview_id?, answers: [{ question_id, text, via?: typed | voice }], photos?: url[], allow_quote?: boolean, allow_name?: boolean, owner_name? }

    Example: The Fly site's articles

    POST /v1/locations/{location_id}/ops/blogs_list
    curl -X POST https://www.fly-social.com/api/v1/locations/3f6c2b1e-8d4a-4c7e-9b2f-1a5d7e9c0b84/ops/blogs_list \
      -H "Authorization: Bearer fmk_your_key" \
      -H "Content-Type: application/json" \
      -d '{}'

    The answer. site (the Fly site, or null), articles newest first (live, drafts waiting, scheduled, and the ones that could not go live in the last 30 days) and next_article_at.

    Search Console and Google Analytics

    The owner's own Google Search Console and Google Analytics: connecting them, picking the property, and the readings of each source.

    Search Console and Google Analytics
    OperationKindWhat it doesParams
    web_google_stateReadThe owner's own Google (Search Console, Analytics) connection.{}
    web_google_connect_startWriteStart connecting the owner's Google.{ kind: gsc | ga4 }
    web_google_connect_statusReadWhere that connection stands; with_resources lists the properties web_google_pick takes.{ kind: gsc | ga4, with_resources?: boolean }
    web_google_pickWritePick the property or stream.{ kind: gsc | ga4, resource_ref }
    web_google_disconnectWriteDisconnect the owner's Google.{ kind: gsc | ga4 }
    web_insights_getReadSearch Console and GA4 readings for the sites.{}
    web_insights_source_addWriteAdd a Search Console or GA4 source.{ kind: gsc | ga4, property, site? }
    web_insights_source_testWriteTest a source.{ source_id }
    web_insights_source_removeWriteRemove a source.{ source_id }

    Example: What is connected

    POST /v1/locations/{location_id}/ops/web_google_state
    curl -X POST https://www.fly-social.com/api/v1/locations/3f6c2b1e-8d4a-4c7e-9b2f-1a5d7e9c0b84/ops/web_google_state \
      -H "Authorization: Bearer fmk_your_key" \
      -H "Content-Type: application/json" \
      -d '{}'

    The answer. signed_in, site and connections with gsc and ga4: what is connected and which property each reads.