
Message: After creating a function using the Functions API, the domain is not created automatically, even though the documentation says a domain should be created after each deployment.
What I did:
Connected GitHub, got the installationId and repositoryId.
Successfully uploaded the function and deployed it.
However, the domain was not created, I had to create it manually.
I also tried uploading via file (Manual), and again the domain was not created.
I checked that when I create a function via the UI, the domain is created automatically. But when using the API, I need to create the domain manually and then redeploy.
My question: Is this the expected behavior, or am I doing something wrong in my code? If this is how it’s supposed to work, that’s fine — I’ll just create the domain manually.

Code:
const myFunc = await functions.create({
functionId: ID.unique(),
name: "My Function 3",
runtime: "node-18.0",
execute: [],
scopes: ["users.read"],
installationId: "",
providerRepositoryId: "",
providerBranch: "main",
providerRootDirectory: "./",
providerSilentMode: false,
entrypoint: "src/index.js",
commands: "npm install",
})
const myDeployment = await functions.createVcsDeployment({
functionId: myFunc.$id,
type: "branch",
reference: "main",
activate: true, // optional
});
Recommended threads
- React Client SDK - CORS issue for Storag...
Hi I've been working on a project for a few weeks with the React Client SDK and OAuth2.0 Google login. All has been working alright, but today I've started gett...
- Can not migrate to self hosted instance ...
Hey! I want to migrate from Appwrite Cloud to a self hosted instance and it's a really frustrating journey for now. Exporting itself does not work, so I did w...
- Realtime didn't work in react native exp...
``` useEffect(() => { const { client } = createClient(); const unsubscribe = client.subscribe(`databases.${process.env.EXPO_PUBLIC_APPWRITE_DATABASE}.t...
