Users
Send a request to a user
Send a typed user-to-user request.
Supported types: follow:accept, follow:reject, location:request, location:invite, ping.
Authorization
bearerAuthorizationBearer token
User session token. Obtained from POST /api/auth/login.
In: header
Path Parameters
id*string
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://loading/api/users/string/request" \ -H "Content-Type: application/json" \ -d '{ "type": "follow:accept", "key": "follow:42:7" }'{
"data": {
"success": true
},
"error": null,
"time": 1680000000000,
"request": "/api/endpoint"
}{
"data": {
"id": "rel_1",
"type": "follow",
"initiator": "1@my-server.com",
"target": "2@my-server.com",
"created_at": 1680000000000
},
"error": null,
"time": 1680000000000,
"request": "/api/endpoint"
}{
"data": null,
"error": {
"code": "NOT_FOUND",
"message": "Resource not found.",
"status": 404
},
"time": 1680000000000,
"request": "/api/endpoint"
}{
"data": null,
"error": {
"code": "NOT_FOUND",
"message": "Resource not found.",
"status": 404
},
"time": 1680000000000,
"request": "/api/endpoint"
}{
"data": null,
"error": {
"code": "NOT_FOUND",
"message": "Resource not found.",
"status": 404
},
"time": 1680000000000,
"request": "/api/endpoint"
}