Partner Pairing API v1.2

Generate Pairing Code

POST https://api.wecompleteapp.com/api/users/user/{userId}/pairing
Headers:
    Content-Type: application/json
Body:
{
    "action": "generate-code"
}

Success Response

{
  "code": "12345",
  "expiresAt": 1717027200
}

Submit Partner Code

POST https://api.wecompleteapp.com/api/users/user/{userId}/pairing
Headers:
    Content-Type: application/json
Body:
{
    "action": "submit-code",
    "targetCode": "12345"
}

Success Response

{
  "status": "pending",
  "message": "Waiting for mutual confirmation",
  "partnerId": "user_89012345",
  "actionRequired": false
}

Connected Response

{
  "state": "connected",
  "message": "Pairing complete",
  "partnerId": "user_89012345",
  "myCode": "12345"
}

Check Pairing Status

GET https://api.wecompleteapp.com/api/users/user/{userId}/pairing

Error Responses

{
  "error": "Invalid or expired pairing code",
  "code": "invalid_pairing_code"
}

Unpair Users

POST https://api.wecompleteapp.com/api/users/user/{userId}/pairing/unpair

Success Response

{
  "success": true
}

Notes

  • Unpairs both users from each other
  • Clears all pairing-related data
  • Requires active connection
  • Cannot be undone - users will need to pair again