Skip to main content

Quickstart - Conversations & Messages

Bring existing user conversations and messages into Mielto.
Need help? Check our complete API reference for detailed endpoint documentation.
Need help? Check our complete API reference for detailed endpoint documentation.

Quickstart - Conversations & Messages

1) Create a conversation for a user

The response includes id (e.g., conv_01234567890abcdef). Use this as conversation_id for messages.

2) Upload existing messages

You can post messages to https://api.mielto.com/api/v1/messages. Include either Authorization: Bearer {apikey} or x-api-key: {apikey} and a body with messages in the content field:
How conversation_id works:
  1. Required in practice: although optional in some schemas, provide conversation_id when creating messages.
  2. Flow:
    • API receives conversation_id in the create payload
    • The handler assigns this conversation_id to each created message
Example API requests:
Or with multiple messages:
conversation_id groups messages, supports deduplication, enforces sender consistency within a conversation, and is used when embedding conversation content into collections.

3) Call the completions endpoint with a user_id

You can use the OpenAI SDKs by setting the base URL to https://api.mielto.com/api/v1, passing your API key from the Mielto dashboard, and including the x-user-id header with your internal user ID.