Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Infotan
Regular Visitor

Fabric Data Agent - Thread created but not able to Add message

Hi Community,

Am trying to work with Fabric Data Agent REST APIs. I am able to create a thread on my data agent using the endpoint - {FABRIC_API_ENDPOINT}/threads.

 

However, when I am trying to add message to the thread using the thread_id, am getting 404 error - 

{FABRIC_API_ENDPOINT}/threads/{thread_id}/messages.
 
However the same thread id works with run/delete API - {FABRIC_API_ENDPOINT}/threads/{thread_id}/runs - which indicates that the thread_id is correct.
 
Tried it multiple times with different thread ids. But it keeps giving 404 error in both cases for the messages endpoint but works well for other endpoints
6 REPLIES 6
v-mdharahman
Community Support
Community Support

Hi @Infotan,

Thanks for reaching out to the Microsoft fabric community forum and for sharing the full request URL that was really helpful in narrowing things down. Since you're receiving a "404 Not Found" only for the "/messages" sub-endpoint while "/runs" and "/delete" are working with the same thread ID, kindly try some steps to narrow down to the issue.

 

Check if the thread is in a valid state as not all thread states may accept new messages. If the thread has already been completed or deleted, the /messages endpoint might return a 404. Try calling "GET https://api.fabric.microsoft.com/v1/workspaces/<workspace_id>/aiskills/<skill_id>/aiassistant/openai.... This will confirm the current state of the thread and whether it’s still available to receive messages. And also make sure the message body is well written and structured,

 

Also note that messages are tied tightly to the AI Assistant that owns the thread. If the thread was created using a different skill or assistant configuration, you might need to route the message through that same path.

 

I would also take a moment to thank @burakkaragoz, for actively participating in the community forum and for the solutions you’ve been sharing in the community forum. Your contributions make a real difference.

 

If I misunderstand your needs or you still have problems on it, please feel free to let us know.  

Best Regards,
Hammad.

Hi @Infotan,

As we haven’t heard back from you, so just following up to our previous message. I'd like to confirm if you've successfully resolved this issue or if you need further help.

If yes, you are welcome to share your workaround so that other users can benefit as well.  And if you're still looking for guidance, feel free to give us an update, we’re here for you.

 

Best Regards,

Hammad.

I am still looking for a solution.

Hi @Infotan,
Hope everything’s going smoothly on your end. As we haven’t heard back from you, so I wanted to check if the issue got sorted.
Still stuck? No. worries just drop us a message and we can jump back in on the issue.

 

Best Regards,

Hammad

burakkaragoz
Community Champion
Community Champion

Hi @Infotan ,

 

This sounds like a classic API endpoint inconsistency issue in Fabric's Data Agent REST APIs. The 404 on the messages endpoint while other endpoints work suggests either a documentation error or the endpoint isn't fully implemented yet.

Things to try:

Check the exact endpoint format: Make sure you're using the right HTTP method and endpoint structure:

  • POST for creating messages: POST /threads/{thread_id}/messages
  • GET for listing messages: GET /threads/{thread_id}/messages

Verify your request headers:

Content-Type: application/json
Authorization: Bearer {your_token}

Try the alternative endpoint pattern: Some Fabric APIs use different URL structures:

  • /v1/threads/{thread_id}/messages
  • /dataAgents/{agent_id}/threads/{thread_id}/messages

Check if you need the agent_id in the path: Since Data Agents are workspace-scoped, you might need: /workspaces/{workspace_id}/dataAgents/{agent_id}/threads/{thread_id}/messages

API version issue: The messages endpoint might be in a different API version than threads/runs.

Quick debugging: Try calling GET /threads/{thread_id} to see what the thread object returns - it might show you the correct messages endpoint URL or indicate if messages are supported.

Reality check: Fabric Data Agent APIs are still pretty new and some endpoints might not be fully stable. You might be hitting an actual API bug rather than a usage issue.

Have you tried checking the Fabric API documentation for the exact messages endpoint format? Sometimes the docs lag behind the actual implementation.


If my response resolved your query, kindly mark it as the Accepted Solution to assist others. Additionally, I would be grateful for a 'Kudos' if you found my response helpful.
This response was assisted by AI for translation and formatting purposes.

Using the endpoint as listed below - 

https://api.fabric.microsoft.com/v1/workspaces/<workspace_id>/aiskills/<skill_id>/aiassistant/openai/threads/<thread_id>/messages?api-version=2025-05-15-preview
 

Helpful resources

Announcements
Fabric July 2025 Monthly Update Carousel

Fabric Monthly Update - July 2025

Check out the July 2025 Fabric update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.