Skip to content

Grok Bot

For managers, users, and agents. Your office only sees this when Grok Bot is turned on. See Office options.

A Grok Bot uses your own login. It can do what you can already do in this office. It cannot do more.

The Grok Bot page in the portal has the token, who may connect, and the change list. This article is the full reference for the API.


Who turns it on

MRE turns Grok Bot on for the office.

MRE can name one Manager who controls Allow and Approve. The other Managers do not see that list. They can still connect when that Manager allows them. Until a Manager is named, every Manager can change Allow and Approve.

The named Manager opens Grok Bot and chooses Allow or Remove for each User, Manager, or Agent.

Approve sits beside Allow. It starts ticked when you press Allow. Clear it and that person can still connect and create a pending order, and they cannot set an order to Approved. Tick it again when they should approve. The product still has to be ticked GBot.

The person who was allowed creates the token. A Manager does not create a token for someone else.


Your token

Open Grok Bot.

Button What it does
Create token Shows a token once. If you already had one, that one stops immediately. The token lasts 90 days.
Stop token Calls stop immediately. Create a new token when you want them again.

Copy the token when it is shown. It is not shown again. Paste it into one of the shared bots below. A Teams account and an Individual account use this same token.

The page shows the token status, the start of the token, when it expires, and when it was last used.


Shared bots

Open one of these and paste the token from this page into it.

Bot Address
MRE Connect x.ai/bot/Y0QupVH_Unotf3ebPVAAB
MRE Properties x.ai/bot/670gls50H6E_sMg7UhD8A
MRE Magazines x.ai/bot/FuN6NvH2un60w82mKASRd
MRE Admin x.ai/bot/UWflVyaGg7a0RGf84ywXQ

Calls

Every call sends:

Authorization: Bearer gbot…
Portal Address
Australia https://myhubexpress.app/api/grok/v1/index.php
United States https://us.myhubexpress.app/api/grok/v1/index.php

The Grok Bot page shows the address for the portal you are signed into.

GET that address, with no token, returns the tool names and the arguments each tool takes. A Listing API token and a platform-read token are refused.

POST a JSON body:

{ "tool": "whoami", "arguments": {} }

Start with whoami. It returns this login, whether Approve is on, the tools, the arguments, and the listing fields and banners for this office.

A photo or PDF can be sent as a form upload. The file field is file. tool and the ids go in the form as well. The same bytes can be sent as image_base64 or pdf_base64 inside arguments.

Some tools ask before they act. The first call returns needs_confirm and a confirm_id. Send that confirm_id on the same tool, with the same ids, to apply it. Those tools are archive_property, archive_property_image, mark_property_ready, set_order_approved, unapprove_order, send_for_approval, cancel_order, publish_ebook, magazine_reload, magazine_remove_property, magazine_properties when it removes listings, and undo.

Idempotency-Key can be sent on create_property, create_order, create_personnel, create_office, duplicate_order, and duplicate_magazine. A repeat of the same key returns the first result and does not create a second record. The key is at most 80 characters.

60 calls a minute for the token, including calls that are refused. 120 a minute from the same network address. The reply says to wait a minute.

HTTP When
401 The token is missing, stopped, expired, or is not a Grok Bot token
403 This login cannot do that, or GBot / Approve is off for that product or person
400 The tool, a field, or a value is not valid
404 That listing, order, booklet, person, office, or photo was not found in this office
409 The order is in the wrong state, or the proof is not ready
429 The rate limit was reached
500 The call did not finish

What your login can do

The bot follows your login. whoami lists capabilities for that login.

Login Can Cannot
User Read and edit listings, photos, copy, magazines, and orders. Create a pending order when that product and quantity are ticked GBot. Approve it when Approve is ticked for them and the product is ticked GBot. Send for Approval. Cancel a pending order. Unapprove. Cancel an approved order. Add or edit personnel or offices.
Manager Everything a User can do. Unapprove an order that is still approved. Cancel an approved order that is not yet printed. Add and edit personnel and offices. Undo another person's change in this office. Approve or unapprove a product that is not ticked GBot.
Agent Read listings, orders, statistics, and the listing QR. Create a pending order when that product and quantity are ticked GBot. Approve it when Approve is ticked for them and the product is ticked GBot. Edit the listing, photos, magazines, personnel, or offices. Send for Approval. Cancel an order.

Find a record

Tool Arguments What it returns
whoami None This login, Approve, tools, and the listing guide
search entity, q, limit, offset A page of rows. limit is 1 to 100 and starts at 50. offset starts at 0.
get entity and id One property, order, magazine, person, or office
order_counts None How many orders and magazines this office has in each status
property_qr property_id The listing short URL, the short code, and the scan stats
order_status id or order_id, and kind Status times, proof, and when the approval text was sent
list_changes entity, id, limit The change list. Leave entity and id off for the full list. id needs entity.

entity on search and get is property, order, magazine, personnel, or office.

q matches the street on a property, an order id or a street on an order, the booklet name on a magazine, the name or email on a person, and the name on an office.

status on a property search is Active, Pending, Off market, Sold, or Withdrawn. On an order it is pending, approved, proofed, printed, dispatched, or cancelled. A magazine uses state for those same words. Send state or status on a magazine, not two different values.

get on a property includes labels for the agent, the second agent, the office, the sell method, and the banner. No banner is None. attributes holds the stored fields. Each photo includes web as yes or no when Hosted listing site is on.

get on a magazine includes page_count. It is the same count magazine_pages returns.


Listings

suburb is required on create_property. active starts as yes. locked starts as no. An update changes only the fields you send.

Tool Arguments What it does
create_property Address, copy, and the fields below Adds a listing and returns property_id
update_property property_id or id, plus any field to change Changes that listing
archive_property property_id, then confirm_id Sets the listing inactive
set_show_in_magazine property_id and show (yes or no) The Show in Magazine tick
mark_property_ready property_id, then confirm_id Sets Add to completed and runs the copy, photo position, hero, and Web ID work this office already has on. Undo does not reverse that work.

Address

Name What to send
number Street number
specific Street name
generic Street type, such as Street or Road
suburb Suburb. Required when creating
postcode Postcode
type residential, rural, commercial, business, land, or rental
active yes or no
locked yes or no
status Active, Pending, Off market, Sold, or Withdrawn

Copy

Name Usual label
heading Heading
description Long copy
headingextra Short heading
descriptionextra Short copy
headingextra2, descriptionextra2 Copy 4 heading and copy. An office may rename these
headingextra3, descriptionextra3 Copy 5
headingextra4, descriptionextra4 Copy 6. Some offices use the heading as the signboard heading

Details

Name What to send
agent The agent's contact id, or blank to clear. agentalt is the second agent. Both must be active agents in this office.
bedrooms, bathrooms, carspace, garagespace, carportspace A whole number, or blank. carspace is Car Space.
price Digits only. Display text goes in priceprepared.
priceprepared The display price, up to 100 characters.
office The listing's office id, or blank. office_id is the same value. Send one of them. On create_order the order's office is office_id.
sellmethod 0 For sale, 1 Auction, 2 EOI, 3 POA, 4 Tender, 5 Contact agent. 6 Lease when Lease is on for the office. The name is accepted too. Private sale is 0, the same as For sale.
banner 0 or None, a banner id, or the banner name. whoami lists the banners this office may use. Just Listed is in that list only when this office has it.
auctiondate The auction or EOI date.
inspection The inspection text, the same box as on the listing.
magazine yes or no. This is Show in Magazine. set_show_in_magazine sets the same tick.
web yes or no, only when Hosted listing site is on. This is Show on Web. yes sends the listing to the office website. no takes it off. whoami lists it when the office has it.

Photos

Tool Arguments What it does
upload_property_image property_id, and image_base64 or a file, and filename Stores the photo and returns image_id. A new photo starts with Web no.
update_property_image image_id, and position, category, or web Sets the slot, the category, or the Web tick
archive_property_image image_id, then confirm_id Takes the photo off the listing

position is 1 to 40, or empty to clear the number. Position 1 is the main photo. A number already used on that listing is refused.

Photo Web is the Web tick under the photo on Images. It is separate from Show on Web on the listing. web is yes or no on update_property_image, when Hosted listing site is on. yes sends that photo to the office website when the listing itself is Show on Web. Print and brochures ignore this tick. Upload the file first, then set web.

set_order_image changes a photo inside a brochure. set_image_layout changes a photo inside a magazine. Those are under Orders and Magazines.


Orders

id and order_id both name the order on every order tool. kind is order or magazine. Leave kind out and the call uses order.

GBot on Prices is set by MRE, per product and quantity, for this office. It starts off. The bot can create or duplicate a pending order only when that product and quantity are ticked GBot. The order stays pending.

Approve on the person's row has to be ticked as well before set_order_approved or unapprove_order can run. The proof still has to be ready. Mail, the print file, and Zoho (when Auto is also ticked) then run the same way as Approve in the portal. Auto and GBot are separate. Auto sends an approved order to Zoho. GBot decides whether the bot may create that product and, with the person's Approve tick, whether the bot may approve it.

When GBot is clear, or Approve is clear for that person, approve it in the portal or the MRE Agent App.

Tool Arguments What it does
create_order property_id, attribute (the product id), quantity, note, office_id Creates a pending order. A warning is included when the listing copy is longer than the office limit. The brochure still cuts that copy off.
duplicate_order id or order_id Copies an order into a new pending order. The product and quantity still have to be ticked GBot.
update_order id or order_id, and note, due, quantity, or office_id Changes a pending order. due is YYYY-MM-DD. An approved, printed, or cancelled order is left as it is. Undo puts those four fields back while the order is still pending.
order_status id or order_id, kind Current status, the first time it reached each status, proof_ready, proof_built_at, and sent_for_approval_at. That last time is null until the first approval text.
order_proof id or order_id, kind proof_url, proof_built_at, and the file size. The PDF is not in this reply.
order_layout id or order_id, kind Each photo frame and each copy field. kind magazine reads a booklet page the same way.
set_order_image id or order_id, slot, and scale, position, rotate, or image_id Moves, resizes, or turns one photo on a pending brochure.
send_for_approval id or order_id, kind, then confirm_id Texts Agent 1. A User or a Manager sends this.
set_order_approved id or order_id, kind, then confirm_id Approves a pending order once the proof is ready.
unapprove_order id or order_id, kind, then confirm_id A Manager sets an approved order back to pending. The Approve tick and the GBot tick still apply.
cancel_order id or order_id, kind, then confirm_id Cancels a pending order. A Manager can also cancel an approved order that is not yet printed, and that order leaves the print list.

Proof

proof_ready is true when the same proof Approve waits for is ready. proof_built_at is when that proof file was compiled, so a new proof has a new time.

Fetch proof_url with the same bearer token. The address is /api/grok/v1/proof.php with order_id and kind. GET or POST. The reply is the PDF. It does not approve the order.

Photo on the brochure

slot is the frame, image1 through image40. scale is cover, or a percent of at least 100, so the photo fills the frame. cover fills the frame and centres it. position still moves that photo, including with cover. Examples are center center and 50% 40%. rotate is 0, 90, 180, or 270, and that turn is drawn. image_id picks a photo already on the listing.

The proof is queued again. A proof that is already rendering is finished, then built again, so proof_ready does not stay false. Change the photo again to put a different crop on. Undo does not recall the proof.

A new brochure uses the photo numbered for that frame. Frame 1 is Main, position 1. When no photo has that number, the next photo with no number is used. order_layout names that same photo.

Page check

order_layout lists each photo frame. covers_frame is true when that photo fills the frame, including after a turn. A frame with no photo is false. Each copy field includes length, max_len, and over_limit. over_limit means the copy is longer than the character limit for that office. It is not a measurement of the printed box. A heading or description length counts the characters after HTML entities, so an ampersand stored as & counts as one character. proof_url, when the proof is ready, is the picture of the page.

Send for Approval

This texts Agent 1 a link that opens that pending brochure in the MRE Agent App, when Agent 1's Personnel Status is App ready. The text names the product, such as the brochure or the board. order_status says when the button would be on the order. The first call names the agent and returns confirm_id. The second call sends the text. It can be sent again later. A magazine does not get this text. It does not approve the order.


Magazines

id and magazine_id both name the booklet.

Find and read

search with entity magazine lists this office's booklets. Each row includes template_name.

Flag Meaning
ebook_available Publish eBook would show on that row
ebook_processing That file is still being made and the button would be grey
ebook_published This edition is online now. ebook_url is that link
ebook_latest The newest dated edition that can be published
ebook_latest_id That edition, even when it is not on this page of the list

get_magazine reads one booklet, including those flags, page_count, and ebook_url when this edition is online.

magazine_pages reads one booklet. It does not change it. Each content block includes its label, template, start_page, end_page, and previous_end. previous_end is the last page already in the book before that block. The following block starts on previous_end + 1 when the sections sit one after another.

Each row on a listing page is a property, a filler, or empty. empty is a gap. A filler that spans extra rows marks those rows blank. A numeric filler id is returned as a number.

Copy and headings on a property include length, max_len, and over_limit. over_limit is the same Recommended length as Properties → Edit, not a measurement of the printed box. Field Manager wins. A copy field with no Field Manager limit uses the office copy length. A heading with no limit stays at 80. The character count is the same rule as on a brochure: an ampersand stored as & counts as one character.

magazine_pages also says what each block can take. pdf_file is the file on a PDF page. text_fields include a section headline, such as the catalogue title, when that block has one, and cover or page-title lines when the template has them. image is true when that page has an image to replace. feature_fields are the property slots on a feature page.

proof_url is the booklet PDF. Each page includes thumb_url. Fetch either address with the same token. The picture is not inside the magazine_pages reply. thumb_ready is false while that page is still being made. The page picture is GET /api/grok/v1/page.php?magazine_id=…&page=1. The reply is a JPEG when that page is ready.

Create and publish

Tool Arguments What it does
duplicate_magazine id or magazine_id Copies a booklet into a new pending edition. It does not approve it, and it does not reload the listings. The copy starts with today's date.
update_magazine id or magazine_id, and description, date, quantity, comment, or office_id date is YYYY-MM-DD. Quantity 1 is the eBook-only quantity. A print quantity has to meet that booklet's minimum. The edition stays pending.
publish_ebook id or magazine_id, then confirm_id Publishes the online edition and returns ebook_url. A following get shows ebook_published true. Publishing replaces the online file for that booklet. Undo does not put the previous file back. A pending or cancelled booklet cannot be published.

Pending booklet

These tools change a pending booklet. An approved booklet is left as it is.

Tool Arguments What it does
magazine_reload id or magazine_id, then confirm_id Reload All. Rebuilds the listings from Show in Magazine and refreshes the proof. Undo puts the previous listings back.
add_magazine_content id or magazine_id, template_id, start_page, label Adds a page section from a template this office can use. The reply includes content_id, text_fields, image, and feature_fields. Undo removes that section.
set_magazine_start id or magazine_id, content_id, start_page Sets that block's start page. The block that should follow straight on uses previous_end + 1. Undo puts the previous start page back.
magazine_add_property id or magazine_id, property_id Adds one listing. It does not ask.
magazine_remove_property id or magazine_id, property_id, then confirm_id Removes that one listing. The first call asks.
magazine_properties id or magazine_id, add, remove Adds and removes several listings. add and remove are property ids separated by commas. A remove asks once, then applies. Adding on its own does not ask. Undo puts the previous listings back.
magazine_fillers None This office's fillers, each with filler_id, name, and rows
set_magazine_filler id or magazine_id, page, position, filler_id Places one filler on an empty row. page is the booklet page and position is the row. A filler that covers more than one row needs those following rows empty too. Undo puts the previous filler back.
set_image_layout magazine_id, property_id, slot (1 to 40), and scale, position, selected, or rotate The crop of one listing photo on a magazine page. rotate is 0, 90, 180, or 270. Undo does not put the crop back. Change it again with the same tool, or in the editor.

Copy, files, and feature pages

These apply on the first call. Undo puts the previous value back.

Tool Arguments What it does
set_magazine_copy id or magazine_id, property_id, and a copy field Changes that listing's heading or copy. The listing has to be in the booklet. The copy changes everywhere the listing is used, including a brochure.
set_magazine_pdf id or magazine_id, content_id, pdf_base64 or a PDF file, filename Replaces one PDF page. filename is the stored file name. The block must be a PDF page.
set_magazine_image id or magazine_id, content_id, and image_base64 or a file Replaces the image when magazine_pages says image is true.
set_magazine_feature id or magazine_id, content_id, property_id, field Sets the listing on a feature field. field defaults to property. feature_fields on that block names the fields.
set_magazine_text id or magazine_id, content_id, field, value Sets one of that block's text_fields.

Copy fields on set_magazine_copy are heading, description, headingalt, descriptionalt, headingextra, descriptionextra, headingextra2 through headingextra4, descriptionextra2 through descriptionextra4, featurecopy1, and featurecopy2. Each value is at most 8,000 characters.


Personnel and offices

A Manager adds and edits these. A User can read them. An Agent cannot.

Tool Arguments What it does
create_personnel The fields below Adds a person and returns contact_id
update_personnel contact_id, plus any field to change Changes that person
archive_personnel contact_id, then confirm_id Sets the person inactive
upload_personnel_image contact_id, and image_base64 or a file Replaces that person's photo. Undo does not put the previous photo back.
create_office The office fields below Adds an office and returns office_id. name is required.
update_office office_id, plus any office field Changes that office

A person needs name_first, name_last, email, and a phone (phone_mobile or phone_office).

Name What to send
name_first, name_last Required on create
title Title
phone_mobile, phone_office At least one is required
email Required. Must be an email address.
type Agent or Other. A new person starts as Agent.
office_id An office in this account, or 0
active yes or no
copy_long, copy_short The long and short copy on the person
website Website

An office takes name, phone, fax, website, email, address, and addressee.


Changes and Undo

Grok Bot → Changes lists what was changed, who did it, and whether it was the person or their Grok Bot.

list_changes reads that list. entity is property, order, magazine, personnel, office, or image. A Manager sees the office. Anyone else sees their own changes.

Undo is on the row for 14 days. Undo the newest change on that record first. undo takes change_id, then confirm_id. Undoing a row adds a line to the list, and the reply includes that line as undo_change_id. That line cannot itself be undone, and it does not block the previous change. The line itself stays for a year after the Undo button has gone.

Undo does not unsend email, a text, or a file that has already gone to print. Those rows say why Undo is not offered. A Manager can still unapprove in Orders, with unapprove_order, while the order is still approved.