web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Copilot Studio / Convert custom website...
Copilot Studio
Suggested Answer

Convert custom website endpoint to Direct API endpoint

(0) ShareShare
ReportReport
Posted on by 2
Hi All,

We trying to consume custom copilot through API, unfortunately we are not able to see the direct option. So we are trying to take the custom website endpoint but getting the 404 error

we are using the below code 
 
import requests
 
# Endpoint URL
url = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
 
# Headers (if required)
headers = {
    "Authorization": "Bearer xxxxxxxxx",  # Replace with your actual token
    "Content-Type": "application/json"
}
 
# Payload: Question or Input
payload = {
    "question": "What are the store hours today?"  # Replace with your actual question or input
}
 
# Send the POST request
response = requests.post(url, headers=headers, json=payload)
 
# Handle the response
if response.status_code == 200:
    print("Response:", response.json())  # Assuming JSON response
else:
    print("Failed with status code:", response.status_code)
    print("Response:", response.text)
response.png
Categories:
I have the same question (0)
  • Suggested answer
    Artur Stepniak Profile Picture
    1,539 Moderator on at
    Hello,
     
    what do you mean by custom copilot? Is it something that was built by using Bot Framework SDK or what? Or was it built in Copilot Studio? If the second option, then it's not possible to consume - you don't have access to the deployment. If you'd like to have that kind of functionality, then you can use Azure AI Foundry (former Azure AI Studio) and customize it as you wish.
     
    In case of any other questions, let me know. If the answer helped you, mark it, so that others can benefit from it.
     
    Best regards,
     
    Artur Stepniak
  • fchopo Profile Picture
    8,003 Moderator on at
    Hello,
    I did that several months ago and you should use Bot Framework SDK and use Direct Line API v3.0: https://learn.microsoft.com/en-us/azure/bot-service/rest-api/bot-framework-rest-direct-line-3-0-concepts?view=azure-bot-service-4.0
     
     
     
    Hope that helps!
    Ferran
  • KS-12120731-0 Profile Picture
    2 on at
    Hi,

    The plan is like we don't want to use any azure services, so is there any alternative method to fetch the Custom copilot studio end point directly into python code. 

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Copilot Studio

#1
Valantis Profile Picture

Valantis 607

#2
chiaraalina Profile Picture

chiaraalina 143 Super User 2026 Season 1

#3
Haque Profile Picture

Haque 129

Last 30 days Overall leaderboard