GoHighLevel
These are the routes behind the GoHighLevel parts of the app: the GoHighLevel column and card on Sub-accounts, and GoHighLevel in Settings → Integrations. Use them to pick which Ready sub-account each GoHighLevel location sends from, to set up new sub-accounts on their own, to give each GoHighLevel user their own sending number, and to pull contacts in. Connecting itself needs GoHighLevel’s approval screen in a browser, so do that once in the app: see GoHighLevel setup. To stop a location sending through Ready, click Change on the GoHighLevel card of its sub-account and pick None, disconnect it, or remove the Ready app in GoHighLevel. Test keys can’t call the routes that change something (403 test_key_not_allowed).
#List connected locations
Every GoHighLevel location connected to your account or a sub-account you manage, and the accounts you can move one to.
Returns
connectionsobject[]- One per location:
id(the connection id the routes below take),location_id(GoHighLevel’s),name,account_id(the Ready account it sends from),ghl_company_id,live(its texts go through Ready),uninstalled, andstageandnext_step, the setup step the app shows. Other fields are for the app and can change. accountsobject[]- The Ready accounts you manage:
id,label,main(your main account),agency,registered, andholds, the location it already sends for. uninstalled_locationsobject[]- Locations whose agency removed Ready in GoHighLevel.
auto_new_subaccountsboolean- Whether new GoHighLevel locations are set up automatically (below).
#Link a location to a sub-account
Moves a connected location to another Ready account you manage, for example the sub-account you made for that business with POST /v1/sub-accounts. Its GoHighLevel texts then send from that account’s numbers. You can move it back within 24 hours with undo. Needs the manage_campaigns permission.
Parameters
idinteger, pathRequired- The connection
idfrom the list. account_idintegerRequired- The Ready account to send from: yours or a sub-account you manage.
Returns
location_id,account_idstring, integer- The location and the account it now sends from. Moving it to the account it is on already changes nothing.
Errors
| HTTP | Code | When |
|---|---|---|
| 403 | account_not_yours | account_id isn’t an account you manage. |
| 404 | not_found | No connection with this id on your accounts. |
| 409 | sends_queued | Texts for this location are still waiting to go out. Try again in a minute. |
| 409 | agency_workspace | The target is your agency account, which can’t send texts for a GoHighLevel location. |
| 409 | account_taken | The target already sends for another location. Each account sends for one. |
| 409 | changed_underneath | The location moved while this ran. Reload and try again. |
#Undo a location move
Moves the location back to the account it left, within 24 hours of the move. Takes no body. Needs the manage_campaigns permission.
Returns
location_id,account_idstring, integer- The location and the account it sends from again.
Errors
| HTTP | Code | When |
|---|---|---|
| 404 | not_found | No connection with this id on your accounts. |
| 409 | no_undo | No move of this location in the last 24 hours. Move it with Link a location to a sub-account instead. |
| 403 | account_not_yours | The account it would move back to is no longer one you manage. |
| 409 | sends_queued | Texts for this location are still waiting to go out. Try again in a minute. |
| 409 | agency_workspace | The account it would move back to is your agency account, which can’t send texts for a GoHighLevel location. |
| 409 | account_taken | The account it would move back to already sends for another location. |
| 409 | changed_underneath | The location moved while this ran. Reload and try again. |
#Set up new GoHighLevel locations automatically
Turns on or off automatic setup for the GoHighLevel locations your agency creates from now on, so you don’t connect each one by hand. Only your main account can change it. Needs the manage_campaigns permission.
Parameters
enabledbooleanRequired- A JSON boolean.
Errors
| HTTP | Code | When |
|---|---|---|
| 400 | invalid_field | enabled is missing or isn’t a JSON boolean. |
| 403 | not_main_account | The key is a sub-account’s. |
#List reps and their numbers
The GoHighLevel users of your locations, with the Ready number each one texts from, and the numbers you can give them. A rep with no number sends from the location’s usual numbers.
Query parameters
account_idinteger- Only the reps and locations of this one account.
Returns
repsobject[]id,location_id,company_name,ghl_user_id,label,phone_number_id(nullfor none),source,last_seen_atandlast_contact_name.locationsobject[]location_idandcompany_name.numbersobject[]- Your active numbers:
idandphone_number.
#Set a rep’s number
Saves a rep’s label and the number they text from. Needs the manage_campaigns permission.
Parameters
idinteger, pathRequired- The rep’s
idfrom the list. labelstring- A name for the rep.
phone_number_idinteger | null- One of your numbers, or
nullto use the location’s usual numbers.
Errors
| HTTP | Code | When |
|---|---|---|
| 400 | The id or phone_number_id isn’t a whole number. | |
| 403 | number_not_owned | The number isn’t on your account. |
| 404 | No rep with this id on your locations. |
#Add a rep by id
Adds a GoHighLevel user who is not on the list yet, with their number. Saving the same user again updates them. Needs the manage_campaigns permission.
Parameters
ghl_user_idstringRequired- The user’s GoHighLevel id: 6 to 64 letters, digits,
_or-. location_idstring- The location they work in. You can leave it out when you have one location.
labelstring- A name for the rep.
phone_number_idinteger | null- One of your numbers.
Returns
repobject- The saved rep, shaped like a list item.
Errors
| HTTP | Code | When |
|---|---|---|
| 400 | ghl_user_id doesn’t look like a GoHighLevel id, or phone_number_id isn’t a whole number. | |
| 403 | number_not_owned | The number isn’t on your account. |
| 404 | No location_id and you have more than one location, or it isn’t one of yours. |
#Sync contacts from GoHighLevel
Pulls one page of contacts from your GoHighLevel connection into Ready. A contact with the same phone number is updated, not added twice, and nothing is texted. Call it again with next_cursor until complete is true. Needs the manage_campaigns permission.
Parameters
cursorstring- The
next_cursorof the last answer. Left out, the sync picks up where this location’s last unfinished sync stopped, or starts at the first contact when the last one finished.
Returns
synced,created,updated,skippedinteger- What this page did.
completebooleantrueon the last page.next_cursorstring | null- Send it as
cursorfor the next page. account_namestring- Only when the connection belongs to a sub-account: the account the contacts went to.
Errors
| HTTP | Code | When |
|---|---|---|
| 400 | ghl_not_connected | No GoHighLevel connection. Connect it in the app first. |
| 400 | The cursor expired or the connection changed. Start again without one. | |
| 401 | The GoHighLevel connection needs to be reconnected in the app. | |
| 409 | ghl_sync_refused | GoHighLevel refused the sync (lost permission or the location was removed). Reconnect GoHighLevel in the app; retrying does not help. |
| 502 | GoHighLevel didn’t answer. Try again in a few minutes. |
See also: the guide to doing this in the app.