FTRE

API reference

FTRE HTTP contract

The shapes below describe how workspaces, deals, and matches are addressed. This reference is not connected to a live service.

Authentication

Authorization: Bearer ftre_live_7c1a
X-FTRE-Role: agent
X-Brokerage-Id: br_harbor

The brokerage header never widens access. An agent token still sees only that agent’s files.

POST/v1/sessions

Open a workspace for a provisioned role.

None. The workspace issues a bearer token for the chosen role.

Request

{
  "role": "agent"
}

Response

{
  "token": "ftre_live_7c1a",
  "role": "agent",
  "brokerageId": "br_harbor",
  "user": { "id": "u_maya", "name": "Maya Chen" }
}
GET/v1/brokerages

List firms the caller is allowed to see.

Authorization: Bearer ftre_live_…

Request

No body. Admins receive every firm. Brokers receive their own firm. Agents receive none.

Response

{
  "data": [
    { "id": "br_harbor", "name": "Harbor & Pine Realty", "seats": 12, "city": "Austin" }
  ]
}
POST/v1/brokerages

Add a brokerage to the network.

Bearer token with brokerages.manage.

Request

{
  "name": "Oaks Group",
  "city": "Dallas",
  "state": "TX",
  "seats": 10
}

Response

{ "id": "br_oaks", "plan": "Desk" }
POST/v1/agents

Invite an agent into a seat.

Bearer token with agents.manage. Brokers may only pass their own brokerage id.

Request

{
  "brokerageId": "br_harbor",
  "name": "Riley Stone",
  "email": "riley.stone@harborpine.com"
}

Response

{ "id": "u_riley", "status": "invited" }
DELETE/v1/agents/:id

Remove a seat that has no open files.

Bearer token with agents.manage.

Request

No body.

Response

{
  "error": {
    "code": "open_files",
    "message": "Reassign or close 2 open files before removing this seat."
  }
}
GET/v1/deals

List deals inside the caller’s tenant scope.

Bearer token. Optional X-Brokerage-Id is ignored unless the caller is an admin.

Request

Query: status, city, q, page.

Response

{
  "data": [
    {
      "id": "d_barton",
      "address": "1204 Barton Hills Dr",
      "status": "structuring",
      "strategy": "subject_to",
      "score": 86
    }
  ],
  "page": 1
}
POST/v1/deals

Submit a file. The rule engine returns strategy and score.

Agent bearer token. brokerageId is taken from the session, not the body.

Request

{
  "address": "616 South Congress",
  "city": "Austin",
  "listPrice": 799000,
  "arv": 910000,
  "mortgageBalance": 540000,
  "rate": 3.1,
  "motivation": "relocation"
}

Response

{
  "id": "d_congress",
  "status": "submitted",
  "strategy": "subject_to",
  "score": 91
}
POST/v1/deals/:id/status

Move a file along the desk path.

Broker or admin token with deals.status.

Request

{ "status": "buyer_match" }

Response

{ "id": "d_barton", "status": "buyer_match" }
POST/v1/opportunities/analyze

Score a property without creating a deal.

Agent bearer token.

Request

{
  "listPrice": 780000,
  "arv": 860000,
  "mortgageBalance": 520000,
  "rate": 3.4,
  "motivation": "relocation",
  "condition": "light",
  "dom": 16
}

Response

{
  "strategy": "subject_to",
  "score": 88,
  "reasons": ["Existing rate is well below a new loan."]
}
GET/v1/buyers

Read the buyer book. Contact fields require buyers.contacts.

Admin bearer token.

Request

Query: market, strategy, status.

Response

{
  "data": [
    { "id": "b_keene", "company": "Keene Capital", "markets": ["Austin", "Dallas"] }
  ]
}
POST/v1/deals/:id/matches

Score active buyers against a file.

Agent token for their own file, or an admin token.

Request

No body.

Response

{
  "data": [
    { "buyerId": "b_keene", "score": 92, "status": "suggested" }
  ]
}
POST/v1/threads/:id/messages

Send a message on a thread the caller can see.

Bearer token. Cross-brokerage thread ids return 403.

Request

{ "body": "Statement is uploaded." }

Response

{ "id": "msg_91", "authorId": "u_maya" }
POST/v1/deals/:id/documents

Attach a photo or statement under 1.5 MB.

Agent token for their file, or admin.

Request

multipart: file, kind=photo|statement|contract|other

Response

{ "id": "doc_22", "name": "statement.pdf" }
GET/v1/deals/:id

A file outside the caller’s brokerage.

Bearer token for a different firm.

Request

No body.

Response

{
  "error": {
    "code": "forbidden",
    "message": "That file is not in your workspace."
  }
}