EK Hub API

Postman Collection

Test the API using the provided Postman collection.

A pre-configured Postman collection is included for quick testing of all endpoints.

Import

  1. Open Postman
  2. Click Import
  3. Drag in both files from the docs/postman/ directory:
    • ek-hub-headless-chat-api.postman_collection.json
    • ek-hub-headless-chat-api.postman_environment.json

Configure

After importing, set the environment variables:

VariableValue
baseUrlhttp://localhost:3002
apiKeyYour API key (e.g. api_a1b2c3d4...)

Run

The collection includes requests in the recommended order:

  1. List AgentsGET /agents
  2. Get Agent DetailsGET /agents/{agentId}
  3. Create SessionPOST /agents/{agentId}/sessions
  4. List SessionsGET /agents/{agentId}/sessions
  5. Send MessagePOST /agents/{agentId}/sessions/{sessionId}/messages
  6. Get MessagesGET /agents/{agentId}/sessions/{sessionId}/messages
  7. Get Session DetailsGET /agents/{agentId}/sessions/{sessionId}
  8. Update SessionPATCH /agents/{agentId}/sessions/{sessionId}
  9. Delete SessionDELETE /agents/{agentId}/sessions/{sessionId}

The collection includes auto-set scripts that automatically save agentId and sessionId from responses into environment variables, so subsequent requests use them automatically.

Tips

  • Run requests in order — later requests depend on IDs from earlier ones
  • Check the environment variables tab to see saved IDs
  • Use the Tests tab to see auto-set variable scripts

On this page