Websites heeft vandaag twee openbare methoden, beide op de Account-microservice en beide alleen-lezen. Een website maken, bestanden uploaden, een versie publiceren, teruggaan naar een eerdere, een domein verbinden, verkeer lezen en een abonnement wijzigen doe je in het dashboard. Daarvoor is geen openbare methode.
| Methode | Wat hij beantwoordt |
|---|---|
get_account_static_websites | De websites die je bezit |
get_site_build_image_modes | Welke afbeeldingsmodi de AI-bouwer voor je account mag gebruiken |
Stuur een verzoek met je sleutel:
curl -s https://xuda.ai/cpi/get_account_static_websites \
-H 'content-type: application/json' \
-d '{"api_key":"YOUR_API_KEY"}'
const res = await fetch('https://xuda.ai/cpi/get_account_static_websites', {
method: 'POST',
headers: { 'content-type': 'application/json' },
body: JSON.stringify({ api_key: 'YOUR_API_KEY' }),
});
const { code, data } = await res.json();
import requests
res = requests.post(
'https://xuda.ai/cpi/get_account_static_websites',
json={'api_key': 'YOUR_API_KEY'},
)
Je websites tonen
get_account_static_websites neemt naast je sleutel geen veld. Hij antwoordt met elke website die je bezit, tot 1.000, als rijen:
{
"code": 1,
"data": {
"rows": [
{ "id": "WEBSITE_ID", "value": { "app_name": "Bean There", "app_type": "static_website" } }
]
}
}
Elke id is de eigen id van de website en elke value is het record van de website, hetzelfde dat het dashboard leest. Het bevat de naam van de site, zijn abonnement en zijn publicatiegegevens. Websites die met je zijn gedeeld, staan niet in deze lijst, alleen die je bezit, in welke werkruimte ze ook staan.
De afbeeldingsmodi lezen
get_site_build_image_modes vertelt welke soorten afbeeldingen de AI-bouwer voor je account mag gebruiken. Het is hetzelfde antwoord dat de bouwer gebruikt om zijn afbeeldingskeuzes te vergrendelen of te openen.
curl -s https://xuda.ai/cpi/get_site_build_image_modes \
-H 'content-type: application/json' \
-d '{"api_key":"YOUR_API_KEY"}'
{
"code": 1,
"data": {
"svg": true,
"stock": true,
"gen_low": false,
"gen_high": false,
"upgrade": true,
"reason": "AI image generation needs a paid website plan and a workspace credit plan. Upgrade to unlock it."
}
}
| Veld | Betekenis |
|---|---|
svg | Illustraties die in de pagina zelf zijn getekend. Altijd true |
stock | Stockfoto's. Altijd true |
gen_low | AI-afbeeldingen. true met een betaald lidmaatschap en een credit-abonnement voor de werkruimte |
gen_high | AI-afbeeldingen van hogere kwaliteit, onder dezelfde voorwaarden |
upgrade | true als de twee AI-modi zijn vergrendeld |
reason | Waarom ze zijn vergrendeld, in een zin. Leeg als ze open zijn |
Methoden
archive_account_profileArchive Account ProfileArchive Account ProfileArchives account profile.2 fieldsuserarchive_contactArchive ContactArchive ContactArchives contact.2 fieldsusercreate_account_profileCreate Account ProfileCreate Account ProfileCreates account profile.13 fieldsusercreate_contactCreate ContactCreate ContactAdds a person to the contact book by hand, from typed details rather than from a received message. Takes only the fields a contact has, name, email, phone, company, job title and its kind (personal or business, which then needs no model to classify it), and ignores anything else the caller happens to hold, such as a shipping address. The email is the book's key, so it is required and a repeat of one already filed returns the existing contact instead of a second copy.10 fieldsuserdelete_account_profileDelete Account ProfileDelete Account ProfileDeletes account profile.2 fieldsuserdelete_contactDelete ContactDelete ContactDeletes contact.2 fieldsuserfavorite_contactFavorite ContactFavorite ContactMarks contact as a favorite.2 fieldsusergenerate_contact_avatarGenerate Contact AvatarGenerate Contact AvatarClears a contact's existing pictures and regenerates its profile avatar (not available on free accounts).2 fieldsuserget_account_advertisingGet Account AdvertisingGet Account AdvertisingReturns the user's advertising campaigns (app_type:advertising) via a Mango query.No fieldsuserget_account_balancersGet Account BalancersGet Account BalancersReturns the user's load balancers (app_type:balancer) via a Mango query, so the sidenav bucket picks up a newly created balancer right after deploy.No fieldsuserget_account_datacentersGet Account DatacentersGet Account DatacentersReturns the datacenters associated with the account from the user_datacenters master view.No fieldsuserget_account_deploymentsGet Account DeploymentsGet Account DeploymentsReturns the deployments associated with the account from the user_deployments master view.No fieldsuserget_account_infoGet Account InfoGet Account InfoReturns the account data for the requesting user, optionally enforcing usage limits.No fieldsuserget_account_instancesGet Account InstancesGet Account InstancesReturns all instances associated with the account from the user_all_instances master view.No fieldsuserget_account_profilesGet ProfilesGet ProfilesRetrieves account profiles.12 fieldsuserget_account_projectsGet Account ProjectsGet Account ProjectsReturns the projects owned by the account (or all projects for superuser and support accounts) from the user_projects master view.No fieldsuserget_account_static_websitesGet Account WebsitesGet Account WebsitesReturns the user's websites (app_type:static_website) via a Mango query.No fieldsuserget_account_vpsGet Account VPSGet Account VPSReturns the standalone virtual servers associated with the account from the user_vps master view.No fieldsuserget_contactsGet ContactsGet ContactsRetrieves contacts.15 fieldsuserget_login_screenGet Login ScreenGet Login ScreenPublic pre-auth resolver for an account's effective login screen. Returns only source/media_type/file_url and the public branding view (UI-1752).3 fieldspublicget_site_build_image_modesGet Site Build Image ModesGet Site Build Image ModesReturns which website-builder image modes (svg, stock, gen_low, gen_high) the account may use. The two AI-generation modes require a paid membership and a workspace credit plan; otherwise they are locked and the UI shows an upgrade prompt.No fieldsusernot_spam_contactNot Spam ContactNot Spam ContactMarks a contact as not spam, whitelists its email, and refreshes its business or personal classification.2 fieldsuserpin_contactPin ContactPin ContactPins contact.2 fieldsuserset_deep_research_contactSet Deep Research ContactSet Deep Research ContactEnables deep research on a contact, enriching its business or personal info and processing related conversation transcripts.2 fieldsuserset_not_contactSet Not A ContactSet Not A ContactMoves a contact out of the Contacts list into Not contacts, for a sender that is not somebody to talk to (a bank's alerts, a store's receipts, a no-reply address). Its mail is still read as before. unset_not_contact puts it back.2 fieldsuserunarchive_account_profileUnarchive Account ProfileUnarchive Account ProfileRestores archived account profile.2 fieldsuserunarchive_contactUnarchive ContactUnarchive ContactRestores archived contact.2 fieldsuserunfavorite_contactUnfavorite ContactUnfavorite ContactRemoves the favorite state from contact.2 fieldsuserunfriend_contactUnfriend ContactUnfriend ContactEnds the friend relationship with a contact by closing its team request and clearing the link from the contact.2 fieldsuserunpin_contactUnpin ContactUnpin ContactRemoves the pinned state from contact.2 fieldsuserunset_deep_research_contactUnset Deep Research ContactUnset Deep Research ContactDisables deep research on a contact and clears its cached data.2 fieldsuserunset_not_contactUnset Not A ContactUnset Not A ContactPuts a contact from Not contacts back in the Contacts list, and keeps it there: the no-reply rule never moves it again.2 fieldsuserupdate_account_infoUpdate Account InfoUpdate Account InfoUpdates account information.32 fieldsuserupdate_account_profileUpdate Account ProfileUpdate Account ProfileUpdates account profile.22 fieldsuserupdate_entity_account_profilesUpdate Entity Account ProfilesUpdate Entity Account ProfilesUpdates entity account profiles.3 fieldsuser
Dit is dezelfde Account-tabel waarvan AI Workspace, Cloud Hosting en On-Prem elk hun eigen deel noemen.