API reference
Example requests and responses for the PeerX REST API. Every request needs an API key from your developer account, sent as a bearer token.
This reference is a preview.
The API has no public release yet, so paths and fields can still change. Releases are listed in the changelog. Your developer account has an API explorer with the endpoints your key can call today.
POST
/api/v1/projectsCreate a project and choose the agent that works on it.
Example request curl -X POST https://api.peerx.ai/api/v1/projects \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "name": "Wedding planning", "agentId": "wedding-event-planner", "metadata": { "date": "2024-06-15" } }'Example response { "id": "proj_123", "name": "Wedding planning", "status": "active", "createdAt": "2024-01-15T10:00:00Z" }GET
/api/v1/projects/{id}Read a project by its id.
Example request curl https://api.peerx.ai/api/v1/projects/proj_123 \ -H "Authorization: Bearer YOUR_API_KEY"Example response { "id": "proj_123", "name": "Wedding planning", "agentId": "wedding-event-planner", "status": "active", "metadata": {...}, "createdAt": "2024-01-15T10:00:00Z" }POST
/api/v1/projects/{id}/chatSend a message to the project’s agent.
Example request curl -X POST https://api.peerx.ai/api/v1/projects/proj_123/chat \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "message": "I need help finding a venue" }'Example response { "message": "I can help you find the perfect venue...", "suggestions": [...] }