Skip to main content

Clients

Messages

Send a chat message to a client, in the same chat as Messages in the app.

Chat messages to a client, in the same chats as Messages in the app. Each coach on your team has their own chat with each client they message.

The chat your clients see in the HubFit app.
In the HubFit appThe chat your clients see in the HubFit app.

Attributes

  • idstring

    The message's id in HubFit's chat.

  • textstring
  • sentAttimestamp
  • clientobject
    Show 2 child attributes
    • idstring

      Its unique ID.

    • namestring
Message object
{
  "id": "6ad6af693b64cf683b633c6b",
  "text": "Nice work this week! Your new program is in the app.",
  "sentAt": "2026-10-26T14:32:05.000Z",
  "client": {
    "id": "6ad6af41d3199442d31b2743",
    "name": "Jordan Miller"
  }
}
POST/v1/clients/{clientId}/messages

Sends a chat message to the client as you, the coach the key belongs to, from your own chat with them, as sending one in the app does. The client sees it in their app straight away and is notified as for any chat message. If you haven't messaged the client before, this starts your chat with them. Each call sends another message, so send an Idempotency-Key to retry safely. A client whose messaging is turned off in HubFit answers 409 messaging_disabled. Each coach can send 30 messages a minute and 500 a day, across the API and the MCP server; past either it's a 429 naming that limit, which sends nothing and leaves the Idempotency-Key free for the retry. Requires messages:write.

Headers

  • Any unique string, such as a UUID, up to 255 characters. Retrying with the same key within 24 hours returns the first response instead of repeating the write. See Idempotency.

Path parameters

Body parameters

  • textstringRequired

    The message. Can't be blank.

Returns

The message, as sent.

POST /v1/clients/{clientId}/messages
curl -X POST https://api.hubfit.com/v1/clients/6ad6af41d3199442d31b2743/messages \
  -H "Authorization: Bearer $HUBFIT_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
    "text": "Nice work this week! Your new program is in the app."
  }'
Response201 Created
{
  "data": {
    "id": "6ad6af693b64cf683b633c6b",
    "text": "Nice work this week! Your new program is in the app.",
    "sentAt": "2026-10-26T14:32:05.000Z",
    "client": {
      "id": "6ad6af41d3199442d31b2743",
      "name": "Jordan Miller"
    }
  }
}