Skip to content
ReppREST reference · v2

Sessions

Make a session for one Repp frame on your page: the messenger, or one of the single components. Call it from your server with your secret key, and hand only the client_secret to the page.

One session per frame: one for the messenger's whole panel, one for each single component. The SDK asks for each through your fetchClientSecret, with { component, classId }, and again when a session runs out.

The client_secret works once, for 5 minutes. The frame trades it for a token that lives only in its own memory, for 2 hours, and is sent as a bearer token to Repp; no cookie is ever set. A secret used twice revokes its session.

Everything about the business comes from your server, never from the browser: the business, the person and their role, the coming classes (about the next 14 days, up to 100) and the rooms (up to 50). Classes that already began are dropped.

Server to server only: no CORS, never from a page. Try it is not offered here, since the call needs your secret key; try the whole flow on the demo instead.

POSThttps://api.dev.repp.co.il/partner/v1/embed-sessionsSecret key

Request

curl -X POST "https://api.dev.repp.co.il/partner/v1/embed-sessions" \
  -H "Authorization: Bearer $REPP_SECRET_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "partner_business_id": "4012",
  "partner_business_name": "סטודיו מרכז",
  "partner_user": {
    "id": "51751",
    "role": "manager",
    "display_name": "מיכל"
  },
  "component": "messenger",
  "class": null,
  "classes": [
    {
      "partner_class_id": "30146899",
      "date": "2026-12-07",
      "time": "18:00",
      "duration_minutes": 60,
      "style": "pilates",
      "service_name": "פילאטיס מכשירים",
      "branch_name": "סניף ראשי"
    }
  ],
  "rooms": [
    {
      "partner_room_id": "room-2",
      "name": "סטודיו גדול",
      "branch_name": "סניף ראשי",
      "capacity": 20
    }
  ]
}'

Response

201 · application/json
{
  "id": "7c1e2a90-4b3d-4f5e-8a6b-1c2d3e4f5a6b",
  "client_secret": "res_5b1c2d3e4f5a6b7c8d9e0f1a_secret_3f9a0b1c2d3e4f5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d1e",
  "expires_at": "2026-12-07T08:10:00+02:00",
  "component": "messenger",
  "connected": true
}
Request body
NameTypeDefaultDescription
partner_business_idRequiredstring—Your id of the business: letters, digits and . _ : -, up to 100.
partner_business_nameRequiredstring—Its name in your system, 1 to 120 characters.
partner_userRequiredobject—The person signed in to your system, who will use the frame.
partner_user.idRequiredstring—Your id of the person, up to 100 characters.
partner_user.roleRequiredone of: owner, manager, staff—Only an owner connects and disconnects; an owner or a manager posts requests, opens rooms for rent and turns the business's text messages off or on; staff sees where things stand.
partner_user.display_nameRequiredstring—Their first name, 1 to 60 characters: the panel greets them by it.
componentRequiredone of: connect, substitute, class-status, messenger—Which frame the session is for: what fetchClientSecret was asked.
classRequiredobject or null—One class, with the fields of classes[]: required for substitute and class-status, null for messenger and connect.
classesarray, up to 100—messenger only, and required there (may be []): the business's coming classes in your calendar, each partner_class_id once. Leave it out for the other components.
classes[].partner_class_idRequiredstring—Your id of the class: letters, digits and . _ : -, up to 100.
classes[].dateRequiredYYYY-MM-DD—Its day, in Israel.
classes[].timeRequiredHH:MM—Its start in Israel, on a quarter hour (18:00, 18:15).
classes[].duration_minutesRequiredone of: 30, 45, 60, 75, 90, 120—How long it is.
classes[].styleRequiredstring or null—The training style it matches, a key of the Catalog (pilates, barre…), or null: the panel then asks once.
classes[].service_nameRequiredstring—Your name of the class, 1 to 80 characters ("פילאטיס מכשירים").
classes[].branch_nameRequiredstring or null—Its branch, 1 to 80 characters, or null.
roomsarray, up to 50—messenger only, may be [] or left out: the business's rooms in your system, each partner_room_id once. The panel offers each for rent as a space on Repp.
rooms[].partner_room_idRequiredstring—Your id of the room: letters, digits and . _ : -, up to 100.
rooms[].nameRequiredstring—Its name in your system, 1 to 80 characters ("סטודיו גדול").
rooms[].branch_nameRequiredstring or null—Its branch, 1 to 80 characters, or null.
rooms[].capacityRequiredinteger 1–500 or null—How many people it holds, when you know.
Response fields (5)
Response fields
FieldTypeDescription
iduuidThe session's id.
client_secretstringHand it to your page, which returns it from fetchClientSecret. Once, for 5 minutes.
expires_atstringWhen the client_secret stops working (ISO 8601).
componentone of: connect, substitute, class-status, messengerThe component it is for.
connectedbooleanWhether this business already connected its Repp account. When not, the panel offers to connect.
Errors
StatusCodeMeaning
400bad_requestThe body is not JSON, or a field is missing, too long or of the wrong shape.
400bad_sessionThe component and its fields do not fit: class is needed for substitute and class-status, classes for messenger (and only there), neither for connect; or two classes share an id.
403role_not_allowedpartner_user.role is none of owner, manager, staff.
404unknown_partnerNo secret key in Authorization, or one Repp does not know (revoked, mistyped, or a publishable key).
405not_foundAny method but POST.
409not_connectedsubstitute and class-status need a connected business. messenger and connect do not.
429too_manyOver a limit (see Security). Wait a minute: the answer says Retry-After: 60.
500failedSomething failed on Repp's side. Try again in a moment.