Note - I put this under Azure AI Bot Service tag because there's not yet an Azure AI Agent Service tag.
Currently, I have a React Native app that needs to interact with a preexisting agent in my Foundry project. I cannot use the Azure Javascript SDK for this, because that SDK is incompatible with React Native (and Microsoft has no plans to make it so). Instead, I'm hitting the REST API that Foundry provides, to moderate success.
Are there still no docs for the AI Agent rest api? I've looked everywhere for this and all the information is limited and scattered.
Any rest api call I make in my app results in a "Project not Found" 404 error. I've tried several different ideas for what my project name might be, but I'm almost positive that the correct name is returning this error.
Here's the code I'm using to call the api.
const ENDPOINT: string = "https://[REDACTED].services.ai.azure.com/api/projects/aiagentserviceproject"; // overview -> azure ai inference -> change end of path from /models to /api/projects/project name (top right of screen)
const API_VERSION: string = "2025-05-15-preview";
const azureApiCall = async <ReturnType = undefined, BodyType = undefined>(opts: {desc: string, urlSegment: string, reqBody?: BodyType, httpMethod?: 'GET' | 'POST'}): Promise<ReturnType | undefined> => {
const {desc, urlSegment, reqBody, httpMethod} = {httpMethod: 'POST', ...opts};
try {
const url: string = `${ENDPOINT}/${urlSegment}?api-version=${API_VERSION}`;
// urlSegment in this case is just "assistants" for list agents call
console.log(`Executing "${desc}" at url: ${url}`);
const request: RequestInit = {
method: httpMethod,
headers: {
'Content-Type': 'application/json',
'Authorization': `Bearer ${API_KEY}`,
},
}
if (reqBody) {
request.body = JSON.stringify(reqBody);
}
const response: Response = await fetch(url, request);
console.log(`Executed "${desc}" with status: ${response.status}, msg: ${response.statusText || 'No included message'}`);
const data = await response.json();
console.log(`Resulting data of "${desc}", ${JSON.stringify(data, null, 2)}`);
if (response.status === 200) {
return data as ReturnType;
}
} catch (e) {
console.log(`Error executing "${desc}": ${JSON.stringify(e, null, 2)}`);
}
}
and this is the output of that call
Resulting data of "List Agents", {
"error": {
"code": "NotFound",
"message": "Project not found"
``` }
}
I've verified that I have all the necessary permissions, so I'm at a loss. The project name you see in the code above, "aiagentserviceproject" can be found at the top right of the foundry dashboard, and I'm almost positive that this is the correct project name

Additionally, changing the project name to a random string of characters causes the same error. So I know that it is the project name that is at fault.