Skip to main content

Business details

The business behind a site, as its pages, its structured data for search engines and its emails show it: the name, a slogan, a phone number, an email address, the postal address, and social profile links. These are the console's Setup → Business card, and a write here is the card's own save.

Scopes: business:read to read, business:write to change.

The business details object​

{
"object": "business_details",
"site": "host_demo",
"name": "Demo Bakery",
"slogan": "Bread worth waking up for.",
"phone": "+1 512-555-0100",
"email": "hello@example.com",
"address": {
"street": "1 Main St",
"city": "Austin",
"region": "TX",
"postalCode": "78701",
"country": "US"
},
"socialLinks": [
{ "label": "Instagram", "url": "https://instagram.com/example" }
]
}
FieldTypeNotes
objectstringAlways "business_details".
sitestringThe site's id.
namestring | nullThe business name. null means the site's name is used.
sloganstring | nullA short line about the business.
phonestring | nullThe phone number, as customers should dial it.
emailstring | nullWhere customers write to the business.
addressobjectThe postal address in parts: street, city, region, postalCode, country. A part that is null is not set.
socialLinksarrayThe business's social profiles, each { "label", "url" }.

Endpoints​

Retrieve business details​

GET /v1/sites/{siteId}/business — scope business:read.

curl "https://app.aglyn.com/api/v1/sites/host_demo/business" \
-H "Authorization: Bearer aglyn_sk_…"

Update business details​

PATCH /v1/sites/{siteId}/business — scope business:write.

A member left out keeps its value. Returns the business details as saved.

curl -X PATCH "https://app.aglyn.com/api/v1/sites/host_demo/business" \
-H "Authorization: Bearer aglyn_sk_…" \
-H "Content-Type: application/json" \
-d '{
"phone": "+1 512-555-0199",
"address": { "street": "200 Congress Ave" },
"socialLinks": [
{ "label": "Instagram", "url": "https://instagram.com/example" },
{ "label": "Facebook", "url": "https://facebook.com/example" }
]
}'
MemberNotes
nameAt most 200 characters. Empty or null goes back to the site's name.
sloganAt most 120 characters.
phoneAt most 64 characters, as customers should dial it.
emailAn email address, such as you@example.com.
addressAn object of the five parts, each at most 200 characters. A part left out keeps its value, so { "street": "…" } changes only the street. null clears every part. country is a country name or its two-letter code.
socialLinksUp to 8 links, each { "label", "url" }; url is required. Replaces the whole list — send every link you want to keep. An empty list or null clears it.

Values are trimmed. An empty string or null clears a text member; a cleared field is removed rather than stored blank, as the console's card does.

Changes are live when saved​

The console has no draft for business details: a change is saved at once, and the live site refreshes right away — the details on its pages, in its structured data, and in the emails it sends from then on. There's no need to publish after it.

Because there is nothing to review afterwards, an app acting for a person should show the change and get their approval before it sends the write.

Errors​

StatustypeWhen
400bad_requestcode: "validation_failed" — a member or address part that isn't writable, a value over its limit, an email that isn't an address, more than 8 social links, or a link with no url. fields names each key, nested ones as address.city or socialLinks[0].url.
403insufficient_scopeKey lacks business:read, or business:write on a PATCH.
403forbiddencode: "site_permission_required" — a connected app whose person can't edit the site's content.
404not_foundUnknown or unowned site.
405method_not_allowedAllow: GET, PATCH.
423—The site is locked.
  • Search listing — how the site appears in search results.
  • Sites — the site these details belong to.