---
name: appfolio-hello-world
description: 'Query AppFolio properties, units, and tenants via REST API.

  Trigger: "appfolio hello world".

  '
allowed-tools: Read, Write, Edit, Bash(npm:*), Bash(curl:*), Grep
version: 1.0.0
license: MIT
author: Jeremy Longshore <jeremy@intentsolutions.io>
tags:
- saas
- property-management
- appfolio
- real-estate
compatibility: Designed for Claude Code
---
# AppFolio Hello World

## Overview

Get started with the AppFolio Property Manager API by authenticating with your client credentials and making your first API calls. This skill walks through connecting to the REST API, fetching a property listing, retrieving tenant details, and creating a basic work order — the essential operations for any AppFolio integration.

## Prerequisites

- AppFolio Stack Partner account with API access
- `APPFOLIO_CLIENT_ID` and `APPFOLIO_CLIENT_SECRET` environment variables set
- Node.js 18+ and TypeScript

## Instructions

### Step 1: Configure the Client

```typescript
const APPFOLIO_BASE = process.env.APPFOLIO_BASE_URL || "https://yourcompany.appfolio.com/api/v1";

async function appfolioFetch(path: string) {
  const credentials = Buffer.from(
    `${process.env.APPFOLIO_CLIENT_ID}:${process.env.APPFOLIO_CLIENT_SECRET}`
  ).toString("base64");
  const res = await fetch(`${APPFOLIO_BASE}${path}`, {
    headers: { Authorization: `Basic ${credentials}`, Accept: "application/json" },
  });
  if (!res.ok) throw new Error(`AppFolio ${res.status}: ${await res.text()}`);
  return res.json();
}
```

### Step 2: List Properties

```typescript
const properties = await appfolioFetch("/properties?page_size=10");
console.log(`Found ${properties.length} properties`);
properties.forEach((p: any) => console.log(`  ${p.id}: ${p.address_line1}, ${p.city}`));
```

### Step 3: Get Tenant Details

```typescript
const tenants = await appfolioFetch(`/tenants?property_id=${properties[0].id}`);
tenants.forEach((t: any) => console.log(`  ${t.name} — Unit ${t.unit_number}`));
```

### Step 4: Create a Work Order

```typescript
const workOrder = await fetch(`${APPFOLIO_BASE}/work_orders`, {
  method: "POST",
  headers: {
    Authorization: `Basic ${Buffer.from(`${process.env.APPFOLIO_CLIENT_ID}:${process.env.APPFOLIO_CLIENT_SECRET}`).toString("base64")}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    property_id: properties[0].id,
    description: "Leaky faucet in kitchen",
    priority: "normal",
  }),
});
console.log("Work order created:", (await workOrder.json()).id);
```

## Output

A successful run produces authenticated API responses: a list of properties with addresses, tenant details for the first property, and a new work order ID confirming write access.

## Error Handling

| Error | Cause | Solution |
|-------|-------|----------|
| `401 Unauthorized` | Invalid client_id or secret | Verify credentials in environment variables |
| `403 Forbidden` | API scope not granted | Check Stack Partner permissions for the endpoint |
| `404 Not Found` | Wrong base URL or endpoint | Confirm your company subdomain and API version |
| `422 Unprocessable` | Missing required fields | Validate property_id and required body params |
| `429 Too Many Requests` | Rate limit exceeded | Add backoff delay, batch requests |

## Resources

- [AppFolio Stack APIs](https://www.appfolio.com/stack/partners/api)
- [AppFolio Engineering Blog](https://engineering.appfolio.com)

## Next Steps

See `appfolio-core-workflow-a` for full property and tenant management workflows.


---
Source attribution: jeremylongshore
Original project: https://github.com/jeremylongshore/claude-code-plugins-plus-skills/blob/main/plugins/saas-packs/appfolio-pack/skills/appfolio-hello-world/SKILL.md
License: MIT
License information: https://opensource.org/license/mit
Original upstream instructions; downloaded from Mega AI Hub.

## Upstream license notice

MIT License

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.



# Mega AI Hub resource metadata

Creator / publisher: jeremylongshore
Original project: https://github.com/jeremylongshore/claude-code-plugins-plus-skills/blob/main/plugins/saas-packs/appfolio-pack/skills/appfolio-hello-world/SKILL.md
Attribution basis: Source repository record

Fields of work: Real Estate
Roles: Property Manager, Real Estate Agent, Real Estate Analyst
Specialties: API
Tools: Appfolio
Country applicability: Country not specified
Classification basis: Source catalog labels
Instruction SHA-256: 775bb2fda0ceac92c222b9684740fcad977e1daf56dac26b6b6d538aa26179a3
