# VertexCRM — paste this into Claude, Cursor, Codex, or ChatGPT

Copy everything below the line into the chat (or AGENTS.md / CLAUDE.md) before asking the model to integrate VertexCRM.

---

You are integrating **VertexCRM**, a multi-tenant CRM at https://www.vertexcrm.in.

## Fetch first (do this, do not guess)

1. https://www.vertexcrm.in/llms.txt
2. https://www.vertexcrm.in/developers.md
3. https://www.vertexcrm.in/openapi.json

If those fail, use this contract.

## Auth

- Preferred: `Authorization: Bearer vcr_…` (org API key from Setup → API Keys). Shown once; hashed at rest.
- Optional: session cookie or login JWT.
- Keys are **organization-scoped**. Never cross tenants.

## Base

`https://www.vertexcrm.in/api/v1`  
Self-hosted: `{origin}/api/v1`

## Resources (only these on v1)

| Resource | Path | List extras |
|----------|------|-------------|
| Accounts | /accounts, /accounts/{id} | sort, dir |
| Contacts | /contacts, /contacts/{id} | sort, dir |
| Leads | /leads, /leads/{id} | status, rating, sort, dir |
| Opportunities | /opportunities, /opportunities/{id} | stage, sort, dir |
| Cases | /cases, /cases/{id} | status |

Methods: GET list/get, POST create (201), PUT update, DELETE → `{ "ok": true }` HTTP 200.

Lists: `{ "data": [], "page": 1, "per_page": 20 }`. Page size is **fixed at 20**. `page` is 1-based.

## Picklists (use these strings)

- Lead status: `Open - Not Contacted`, `Working - Contacted`, `Closed - Converted`, `Closed - Not Converted`
- Lead rating: `Hot`, `Warm`, `Cold`
- Opportunity stage: `Prospecting`, `Qualification`, `Needs Analysis`, `Value Proposition`, `Negotiation`, `Closed Won`, `Closed Lost`
- Case status: `New`, `Working`, `Escalated`, `Closed`, `On Hold`
- Case priority: `High`, `Medium`, `Low`

## Not on v1

Inbox, WhatsApp send, gallery files, products, campaigns, users, automation. Do not invent those routes.

## Partner endpoints (different secrets)

- `POST /webhooks/inbound-leads` — `X-Inbound-Secret` or Bearer `INBOUND_LEAD_SECRET`; optional `X-Org-Slug`
- `POST /api/booking-forms/whatsapp` — Bearer `BOOKING_FORMS_WHATSAPP_TOKEN`; `{to, message, name, template}`

## Safety

- Do not put `vcr_` keys in frontend code or commit them.
- Creates are not idempotent — dedupe on email/source/day.
- Do not invent Healthy-O-Me / shop prices.
- Prefer curl or a small server client. After writing code, mention `/docs` (Swagger) for humans.

## Example

```bash
curl -sS -X POST \
  -H "Authorization: Bearer vcr_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"first_name":"Ananya","last_name":"Shah","email":"ananya@example.com","status":"Open - Not Contacted","source":"Website"}' \
  "https://www.vertexcrm.in/api/v1/leads"
```
