Redeploy a backend function
Changed on<Info>This API is in beta. Endpoints, fields, and behavior may still change, so avoid depending on it in production.</Info>
Deploys the code you send as one of the app's backend functions and saves it as that function's source, the same way Save & Redeploy does in the app editor.
The function is deployed from the code in the request, not from the source already stored in the app. To redeploy a function unchanged, send its current source. The deploy runs even when the code is identical, which is how you recover a function whose deployment is missing or out of date. A name that no function has yet creates a new function.
The request waits for the deploy to finish, and fails with the compiler's diagnostics when the code doesn't build. An app runs one deploy at a time. If another deploy for the app is still running after a short wait, the call is rejected and is safe to retry.
Backend functions need a Builder plan or higher on the app's workspace. If the app has no backend functions yet, the first redeploy sets them up.
The deploy always lands on the app's main line, and is rejected while main is protected.
The published app keeps running the previous version of the function until you publish the app again. Automations and workflows run the redeployed version right away.
This is limited to 50 requests a minute per caller for each app. Some workspaces have a different limit.
The response is the app document as it stands after the change, the same shape Get app returns.
<Note>This endpoint accepts a personal API key belonging to a user with editor access to the app. A read-only key is refused, and workspace API keys are not accepted.</Note>
<Warning>The response includes fields beyond the ones documented here. Don't rely on undocumented response fields, as they can change at any time. Send only the fields documented here. Other request fields are not supported and their behavior can change.</Warning>
Request
- Base URL: https://app.base44.com
- URL: https://app.base44.com/api/apps/{app_id}/coding/redeploy-function/{function_name}
- Auth: HTTP bearer
Path parameters
Name of the backend function, as a path under functions/. Send the bare name, the name with its file extension, or the name followed by /entry.ts. Nested functions have slashes in their name, and you send those as they are.
ID of the app whose code to change.
Request body
Example request
{
"code": "Deno.serve(async (req) => {\n return Response.json({ ok: true });\n});\n"
}Response
The app after the deploy.
Example response
{
"id": "6820f3a4e7b91d003c45a1f2",
"created_date": "2026-08-01T09:15:00",
"updated_date": "2026-08-02T14:30:00",
"created_by": "developer@example.com",
"organization_id": "67e0b12c4d8a3f005b21c9e4",
"app_type": "user_app",
"name": "My CRM",
"user_description": "A CRM to track leads and deals",
"logo_url": "https://storage.base44.com/6820f3a4e7b91d003c45a1f2/3f2504e0_logo.png",
"social_image_url": "https://storage.base44.com/6820f3a4e7b91d003c45a1f2/7c9e6679_social.png",
"public_settings": "public_with_login",
"auth_config": {
"enable_username_password": true,
"enable_google_login": true
},
"hide_entity_created_by": true,
"slug": "my-crm-3c45a1f2",
"last_deployed_at": "2026-08-02T14:30:00",
"screenshot_url": "https://storage.base44.com/screenshots/6820f3a4e7b91d003c45a1f2.png",
"preview_screenshot_url": "https://storage.base44.com/previews/6820f3a4e7b91d003c45a1f2.png",
"owner_id": "6706af53b9c1e2004a37d85f",
"status": {
"state": "ready",
"details": "Publishing app",
"request_id": "a1b2c3d4e5f67890abcdef12",
"last_updated_date": "2026-08-02T14:30:00Z",
"error_source": "build",
"paywall_context": {
"billing_organization_id": "67e0b12c4d8a3f005b21c9e4",
"user_id": "6706af53b9c1e2004a37d85f",
"evaluated_at": "2026-08-02T14:30:00Z"
}
}
}Changes
- info
the endpoint scheme security
PersonalAccessTokenAuthwas added to the API
- info
- breaking
the
response's property type changed from no type toobjectfor status - breaking
the
response's property type changed from no type toobjectfor status - warning
added the new
private_with_loginenum value to theresponse property for the response status - warning
added the new
public_with_loginenum value to theresponse property for the response status - warning
added the new
public_without_loginenum value to theresponse property for the response status - warning
added the new
workspace_with_loginenum value to theresponse property for the response status - info
added the optional property
/to the response with the status - info
added the optional property
/to the response with the status - info
added the optional property
/to the response with the status - info
added the optional property
/to the response with the status - info
added the optional property
/to the response with the status - info
added the optional property
/to the response with the status - info
added the optional property
/to the response with the status - info
added the optional property
/to the response with the status - info
added the optional property
/to the response with the status - info
added the optional property
/to the response with the status - info
removed
subschema #2from theresponse propertyanyOflist for the response status - info
removed
subschema #2from theresponse propertyanyOflist for the response status - info
the
response's property default valueuser_appwas added for the status - info
the
response's property default valuefalsewas added for the status - info
the
response's property default valuefalsewas added for the status - info
the
response's property default valuefalsewas added for the status - info
the
response's property default valuefalsewas added for the status - info
the
response's property default valuefalsewas added for the status - info
the
response's property default valueuntitledwas added for the status - info
the
response's property default valuepublic_with_loginwas added for the status - info
response property
app_typelist-of-types was narrowed by removing typesnullfrom media typeapplication/jsonof response200 - info
response property
created_datelist-of-types was narrowed by removing typesnullfrom media typeapplication/jsonof response200 - info
response property
dev_environment_enabledlist-of-types was narrowed by removing typesnullfrom media typeapplication/jsonof response200 - info
response property
hide_entity_created_bylist-of-types was narrowed by removing typesnullfrom media typeapplication/jsonof response200 - info
response property
idlist-of-types was narrowed by removing typesnullfrom media typeapplication/jsonof response200 - info
response property
is_remixablelist-of-types was narrowed by removing typesnullfrom media typeapplication/jsonof response200 - info
response property
is_unpublishedlist-of-types was narrowed by removing typesnullfrom media typeapplication/jsonof response200 - info
response property
main_branch_protectedlist-of-types was narrowed by removing typesnullfrom media typeapplication/jsonof response200 - info
response property
namelist-of-types was narrowed by removing typesnullfrom media typeapplication/jsonof response200 - info
response property
public_settingslist-of-types was narrowed by removing typesnullfrom media typeapplication/jsonof response200 - info
response property
updated_datelist-of-types was narrowed by removing typesnullfrom media typeapplication/jsonof response200 - info
added the required property
/to the response with the status
- breaking