Keystone Developers
Open Keystone
API reference

Console API

Business

6 endpoints.

POST/api/v1/admin/businesses

Create business

Create a business. company_name required; id optional (server generates if omitted).

Parameters

NameInTypeDescription
authorizationheaderstring | null

Request bodyrequired

application/jsonBusinessCreateBody
FieldTypeDescription
company_namerequiredstring
year_foundedinteger | null
website_urlstring | null
taglinestring | null
addressAddress | null
Address fields
FieldTypeDescription
line1string | null
line2string | null
citystring | null
statestring | null
zip_codestring | null
countrystring | null
descriptionsDescriptions | null
Descriptions fields
FieldTypeDescription
company_descriptionstring | null
aboutstring | null
mission_statementstring | null
valuesstring[]
string[] fields
contact_infoContactInfo | null
ContactInfo fields
FieldTypeDescription
primary_phonestring | null
primary_emailstring | null
support_emailstring | null
sales_emailstring | null
external_management_urlstring | null
social_profilesSocialProfiles | null
SocialProfiles fields
FieldTypeDescription
facebookstring | null
instagramstring | null
twitterstring | null
linkedinstring | null
youtubestring | null
tiktokstring | null
google_my_businessstring | null
pintereststring | null
yelpstring | null
tripadvisorstring | null
google_reviewstring | null
industriesBusinessIndustries | null
BusinessIndustries fields
FieldTypeDescription
primarystring | null
secondarystring[]max items 5
string[] fields
terms_of_service_markdownstring | null
privacy_policy_markdownstring | null
is_activebooleandefault true

Responses

201Successful Response
application/jsonSuccessResponse_BusinessProfileData_
FieldTypeDescription
request_idrequiredstring
successtruedefault true
datarequiredBusinessProfileData
BusinessProfileData fields
FieldTypeDescription
idrequiredstring
company_namestring | null
year_foundedinteger | null
website_urlstring | null
taglinestring | null
addressAddress | null
Address fields

Address, expanded above.

descriptionsDescriptions | null
Descriptions fields

Descriptions, expanded above.

contact_infoContactInfo | null
ContactInfo fields

ContactInfo, expanded above.

social_profilesSocialProfiles | null
SocialProfiles fields

SocialProfiles, expanded above.

industriesBusinessIndustries | null
BusinessIndustries fields

BusinessIndustries, expanded above.

terms_of_service_markdownstring | null
privacy_policy_markdownstring | null
is_activebooleandefault true
timezonestringdefault "America/New_York"
timezone_sourcestringdefault "default"
created_atinteger | null
metadataResponseMetadata | null
ResponseMetadata fields
FieldTypeDescription
paginationPaginationMetadata | null
PaginationMetadata fields
FieldTypeDescription
limitrequiredinteger
next_cursorstring | null
prev_cursorstring | null
has_morerequiredboolean
has_prevbooleandefault false
total_countinteger | null
status_countsobject | null
object | null fields

Map of string to integer

lifecycle_countsLifecycleCounts | null
LifecycleCounts fields
FieldTypeDescription
leadintegerdefault 0
prospectintegerdefault 0
customerintegerdefault 0
former_customerintegerdefault 0
classification_countsClassificationCounts | null
ClassificationCounts fields
FieldTypeDescription
signalobject
object fields

Nested object (not expanded)

touchobject
object fields

Nested object (not expanded)

stageobject
object fields

Nested object (not expanded)

metaResponseMeta | null
ResponseMeta fields
FieldTypeDescription
totalinteger | null
total_countinteger | null
pageinteger | null
per_pageinteger | null
  • 400Bad request
  • 401Unauthorized
  • 403Forbidden
  • 404Not found
  • 422Validation error
  • 500Internal server error
  • 503Service unavailable

Error bodies: ErrorResponse. See Errors.

GET/api/v1/admin/businesses/{business_id}

Get business details

Get business by id. 404 if not found.

Parameters

NameInTypeDescription
business_idrequiredpathstring (uuid)
authorizationheaderstring | null

Responses

200Successful Response
application/jsonSuccessResponse_BusinessProfileData_
FieldTypeDescription
request_idrequiredstring
successtruedefault true
datarequiredBusinessProfileData
BusinessProfileData fields

BusinessProfileData, expanded above.

metadataResponseMetadata | null
ResponseMetadata fields

ResponseMetadata, expanded above.

metaResponseMeta | null
ResponseMeta fields

ResponseMeta, expanded above.

  • 400Bad request
  • 401Unauthorized
  • 403Forbidden
  • 404Not found
  • 422Validation error
  • 500Internal server error
  • 503Service unavailable

Error bodies: ErrorResponse. See Errors.

PATCH/api/v1/admin/businesses/{business_id}

Update specific fields of business profile

Partial update (PATCH). 404 if not found.

Parameters

NameInTypeDescription
business_idrequiredpathstring (uuid)
authorizationheaderstring | null

Request bodyrequired

application/jsonBusinessUpdateBody
FieldTypeDescription
company_namestring | null
year_foundedinteger | null
website_urlstring | null
taglinestring | null
addressAddress | null
Address fields

Address, expanded above.

descriptionsDescriptions | null
Descriptions fields

Descriptions, expanded above.

contact_infoContactInfo | null
ContactInfo fields

ContactInfo, expanded above.

social_profilesSocialProfiles | null
SocialProfiles fields

SocialProfiles, expanded above.

industriesBusinessIndustries | null
BusinessIndustries fields

BusinessIndustries, expanded above.

terms_of_service_markdownstring | null
privacy_policy_markdownstring | null
is_activeboolean | null
timezonestring | null

Responses

200Successful Response
application/jsonSuccessResponse_BusinessProfileData_
FieldTypeDescription
request_idrequiredstring
successtruedefault true
datarequiredBusinessProfileData
BusinessProfileData fields

BusinessProfileData, expanded above.

metadataResponseMetadata | null
ResponseMetadata fields

ResponseMetadata, expanded above.

metaResponseMeta | null
ResponseMeta fields

ResponseMeta, expanded above.

  • 400Bad request
  • 401Unauthorized
  • 403Forbidden
  • 404Not found
  • 422Validation error
  • 500Internal server error
  • 503Service unavailable

Error bodies: ErrorResponse. See Errors.

GET/api/v1/admin/businesses/{business_id}/api-key

Get business public API credentials (URL + key)

Return the public API URL and active key for a business. 404 if the business doesn't exist.

The full key is returned so the console can offer copy-to-clipboard; it is never rendered in full. ``key_prefix``/``api_key`` are null when the business has no active key.

Parameters

NameInTypeDescription
business_idrequiredpathstring (uuid)
authorizationheaderstring | null

Responses

200Successful Response
application/jsonSuccessResponse_BusinessApiKeyData_
FieldTypeDescription
request_idrequiredstring
successtruedefault true
datarequiredBusinessApiKeyData
BusinessApiKeyData fields
FieldTypeDescription
api_urlrequiredstring
key_prefixstring | null
api_keystring | null
metadataResponseMetadata | null
ResponseMetadata fields

ResponseMetadata, expanded above.

metaResponseMeta | null
ResponseMeta fields

ResponseMeta, expanded above.

  • 400Bad request
  • 401Unauthorized
  • 403Forbidden
  • 404Not found
  • 422Validation error
  • 500Internal server error
  • 503Service unavailable

Error bodies: ErrorResponse. See Errors.

GET/api/v1/admin/businesses/{business_id}/dashboard

Get dashboard info for a specific business

Counts (services, locations, team, faq, jobs, photos) for a specific business.

Access control is handled by ``auth_admin("viewer")``: the caller must have a ``business_users`` row for ``business_id``, OR carry ``global_business_access`` (super-admins). Otherwise 403. Returns 404 NOT_FOUND when the business id doesn't exist.

Parameters

NameInTypeDescription
business_idrequiredpathstring (uuid)
authorizationheaderstring | null

Responses

200Successful Response
application/jsonSuccessResponse_BusinessDashboardData_
FieldTypeDescription
request_idrequiredstring
successtruedefault true
datarequiredBusinessDashboardData
BusinessDashboardData fields
FieldTypeDescription
business_idrequiredstring
business_namerequiredstring
services_countrequiredinteger
packages_countrequiredinteger
service_items_countrequiredinteger
locations_countrequiredinteger
team_countrequiredinteger
faq_countrequiredinteger
jobs_countrequiredinteger
photos_countrequiredinteger
metadataResponseMetadata | null
ResponseMetadata fields

ResponseMetadata, expanded above.

metaResponseMeta | null
ResponseMeta fields

ResponseMeta, expanded above.

  • 400Bad request
  • 401Unauthorized
  • 403Forbidden
  • 404Not found
  • 422Validation error
  • 500Internal server error
  • 503Service unavailable

Error bodies: ErrorResponse. See Errors.

GET/api/v1/admin/businesses/dashboardDeprecated

[Deprecated] Dashboard info for authenticated user's business — use /businesses/{business_id}/dashboard

Get business name and counts (services, locations, team, faq, jobs, photos) for the user's *own* business.

Returns 404 NOT_FOUND when the caller has no ``business_users`` row — including for admins who aren't directly attached to any business. Use ``GET /businesses/{business_id}/dashboard`` to fetch counts for a specific business (with the standard business-access auth check).

Parameters

NameInTypeDescription
authorizationheaderstring | null

Responses

200Successful Response
application/jsonSuccessResponse_BusinessDashboardData_
FieldTypeDescription
request_idrequiredstring
successtruedefault true
datarequiredBusinessDashboardData
BusinessDashboardData fields

BusinessDashboardData, expanded above.

metadataResponseMetadata | null
ResponseMetadata fields

ResponseMetadata, expanded above.

metaResponseMeta | null
ResponseMeta fields

ResponseMeta, expanded above.

  • 400Bad request
  • 401Unauthorized
  • 403Forbidden
  • 404Not found
  • 422Validation error
  • 500Internal server error
  • 503Service unavailable

Error bodies: ErrorResponse. See Errors.