Create Record API Documentation

Endpoint

POST /access/records/new

Description

Creates a new property record in the system. This endpoint requires authentication via an API key and must include a valid team ID.

Authentication

Requires an API key passed in the header:

x-api-key: your-api-key

Request Body

FieldTypeRequiredDescription
team_idstringYesValid team identifier
addressstringNoProperty street address
citystringNoProperty city
askingPricenumberNoProperty asking price

Example Request

curl -X POST https://brickbear.ai/access/records/new/ \
  -H "Content-Type: application/json" \
  -H "x-api-key: your-api-key" \
  -d '{
    "team_id": "12",
    "address": "123 Main St",
    "city": "Example City",
    "state": "CA",
    "zipcode": "12345",
    "askingPrice": 250000,
    "beds": 3,
    "baths": 2,
    "sqft": 1500,
    "yearBuilt": 1990
}'

Responses

Success Response (200)

{
    "success": true,
    "record": {
        "id": "550e8400-e29b-41d4-a716-446655440000",
        "record_id": "123",
        "team_id": "12",
        "address": "123 Main St",
        "city": "Example City",
        "state": "CA",
        "zipcode": "12345",
        "askingPrice": 250000
    }
}

Unauthorized (401)

{"error": "Invalid or missing API key"}

Bad Request (400)

{"error": "team_id is required"}

Server Error (500)

{"error": "Internal Server Error"}

Notes

  • The API key must be included in all requests
  • team_id must be a valid team identifier in the system
  • All monetary values should be provided as numbers without currency symbols
  • The response includes a generated UUID for the record
  • Default values will be assigned to optional fields if not provided