Add multiple messages to an existing thread

Hi - I’m trying to add multiple messages to a thread, but getting error and don’t see reference to it in the API docs. I thought it would be something like this:

  const messagesResult = await openai.beta.threads.messages.create(
      thread_id,
      [
        { "role": "user", "content": "hello there"},
        { "role": "user", "content": "Hello there two"}
      ]
    );
}

That’s similar to creating a thread. But i get a validation error doing the same on an existing thread. Is the only way to add multiple messages to a thread to iterate through and add one at a time? Or concatenate messages?

The use case is: adding a combination of previous messages to an existing thread.

I also struggled with this. I believe the correct way to add multiple messages (at time of writing) is like so:

    const messages = someArrayOfStrings;
    await openai.beta.threads.messages.create(thread.id, {
      role: "user",
      content: messages.map((m) => ({ type: "text", text: m })),
    });

This is as-per: https://platform.openai.com/docs/api-reference/messages/createMessage