Skip to main content

Get Your API Key

Contact our team to get your API key and start building with myweave.

Make Your First API Call

Here’s a simple example starting a conversation with a persona:
curl -X POST https://api.myweave.ai/functions/v1/chat \
  -H "Content-Type: application/json" \
  -H "X-API-Key: your_api_key_here" \
  -d '{
    "message": "Hello, I need help with leadership development",
    "context": {
      "coachId": "coach_xyz789"
    }
  }' \
  --no-buffer

Response

The API returns a streaming response with the expert’s message:
data: Hello! I'd be happy to help you with leadership development.
data:  Let's start by understanding your current goals and challenges...
The thread ID is returned in the X-Thread-Id header for continuing the conversation.

Complete Workflow Example

Here’s a typical flow for managing conversations:

1. Start a Chat

Use the /chat endpoint to begin a conversation (shown above). Save the X-Thread-Id from the response header.

2. Get All User Threads

curl -X GET https://api.myweave.ai/functions/v1/users/user_abc123/threads \
  -H "X-API-Key: your_api_key_here"

3. Get Messages from a Thread

curl -X GET https://api.myweave.ai/functions/v1/threads/550e8400-e29b-41d4-a716-446655440000/messages \
  -H "X-API-Key: your_api_key_here"

Next Steps