> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stagingspaces.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Agent Workflow

> How staging companies integrate with estate agents

# Agent Workflow

This guide explains the typical integration between a staging company (API user) and estate agents (end users).

## The Flow

```mermaid theme={null}
sequenceDiagram
    participant Listing as Listing Platform
    participant API as StagingSpaces API
    participant Agent as Estate Agent

    Note over Listing: Agent uploads property photos
    Listing->>API: POST /api/v1/stage (for each room)
    API-->>Listing: staged URLs + claim codes

    Listing->>Agent: Email: "Your staging is ready! Claim code: SS-7X9K2M"

    Agent->>API: POST /api/v1/claim/preview
    API-->>Agent: 5 images, expires in 30 days

    Agent->>API: POST /api/v1/claim
    API-->>Agent: Images transferred to dashboard

    Note over Agent: Agent uses images in listings
    Note over Agent: Product placement earns ad revenue (50/50 split)
```

## Integration steps

### 1. Stage photos as they come in

```python theme={null}
# When an agent uploads property photos to your platform
for photo in agent_uploaded_photos:
    result = stage_image(photo, style="modern")
    store_claim_code(
        agent_id=agent.id,
        claim_code=result["claim_code"],
        image_url=result["image_url"]
    )
```

### 2. Notify the agent

```python theme={null}
# Send the agent their claim codes
send_email(
    to=agent.email,
    subject="Your virtual staging is ready",
    body=f"""
    Your property has been virtually staged!

    Claim your images at studio.stagingspaces.app
    Claim code: {claim_code}

    This code expires in 30 days.
    """
)
```

### 3. Track redemptions via webhooks

```python theme={null}
# Webhook handler
if event_type == "claim.redeemed":
    agent_email = event["data"]["claimed_by_email"]
    mark_staging_delivered(agent_email)
```

## Revenue model

* **You pay:** 1 credit (\$1) per staged image
* **Agent earns:** 50% of product placement ad revenue
* **You earn:** The difference between what you charge the agent and \$1/image

Most staging companies charge $10-30 per image and use StagingSpaces at $1/image for 90%+ margins.
