Spaces:
Sleeping
Sleeping
File size: 2,013 Bytes
c536472 910f36a c536472 910f36a c536472 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 | # API
All `/api/*` routes except Stripe webhooks require:
```text
Authorization: Bearer <supabase-access-token>
```
## Health
`GET /health`
Returns service status.
## OpenClaw
`POST /api/openclaw/chat`
```json
{
"currentQuestionId": "q1",
"messages": [
{ "role": "user", "content": "My values are honesty, craft, kindness,..." }
]
}
```
Returns the OpenClaw response contract from `artifacts/schemas/openclaw-response.schema.json`.
## Profiles
`GET /api/profiles/questions`
Returns the full compatibility questionnaire.
`GET /api/profiles/me`
Returns the authenticated user's profile or `null`.
`POST /api/profiles/me`
```json
{
"displayName": "Alex",
"age": 31,
"location": "Denver, CO",
"gender": "woman",
"interestedIn": ["men"]
}
```
`PATCH /api/profiles/answers/:questionId`
```json
{
"answer": ["Poor dental hygiene", "Dirty home"],
"followup": "These are hard attraction breaks for me.",
"dealbreakerSeverity": "high"
}
```
`POST /api/profiles/complete`
Requires all questionnaire answers. Generates summary, embedding, extracted disgust triggers, extracted captivating traits, and marks the profile complete.
## Payments
`POST /api/payments/checkout-session`
Returns:
```json
{
"id": "cs_test_...",
"url": "https://checkout.stripe.com/..."
}
```
`POST /api/payments/webhook`
Stripe raw-body endpoint. Marks entry paid after `checkout.session.completed`.
## Matches
`GET /api/matches`
Lists existing curated matches.
`POST /api/matches/curate`
Requires complete profile and paid entry. Creates up to 10 suggested matches.
`POST /api/matches/:matchId/accept`
Accepts a match. When both sides accept, status becomes `active` and a conversation is created.
## Messages
`GET /api/messages/conversations`
Lists conversations.
`GET /api/messages/conversations/:conversationId/messages`
Lists messages.
`POST /api/messages/conversations/:conversationId/messages`
```json
{
"body": "I liked what you wrote about repair after conflict."
}
```
|