/functions/{name}Retire Function
Transitions a developer-deployed function's status to retired, making it no longer invocable.
The function registry entry is retained for audit purposes, and the function name enters a 24-hour cooldown before it can be reused by a new deployment.
Returns 403 FORBIDDEN with context.reason: "extension_managed" if the function's source is "extension:*".
Extension-owned function lifecycles are managed by the extension system and cannot be terminated through this endpoint.
Requires PROJECT_ADMIN minimum.
| name * | path | The function's name, or a module's name to retire every operation in the module. A single operation of a module is named |
| projectSlug * | path | The project's slug: the path segment after It is unique within the org. |
| HTTP | K9O Code | Description |
|---|---|---|
| 200 | Success | |
| 401 | K9O_INVALID_CREDENTIALS | The request credentials are missing or invalid. |
| 401 | K9O_SESSION_EXPIRED | Your session has expired; sign in again to continue. |
| 403 | K9O_ACCESS_DENIED | PROJECT_ADMIN is required to retire functions, or the function is extension-managed and cannot be deleted via this endpoint. |
| 404 | K9O_FUNCTION_NOT_FOUND | No function with that name exists in this project, or it has already been retired. |
| data * | any | The retired function, now with status |
| One of: object | ||
| id * | string <uuid> | The function's id, a UUID. It stays the same across redeploys. |
| name * | string | The function's name. A module's operations are named |
| runtime * | "bun" | "rust" | "go" | "tinygo" | "zig" | "assemblyscript" | "c" | "cpp" | The language runtime: |
| tier * | "gateway" | "sandbox" | Where the function runs: |
| entryPoint * | string | The artifact key of the deployed code. |
| version * | string | The version label of the deploy. |
| status * | "deploying" | "active" | "error" | "retired" |
|
| source * | string | Who manages the function: |
| description * | any | What the function does. Null when none was given. |
| One of: string | ||
| or: null | ||
| createdAt * | string <date-time> | When the function was first deployed. |
| deployedAt * | any | When the current deploy became active. Null while it is deploying. |
| One of: string <date-time> | ||
| or: null | ||
| retiredAt * | any | When the function was retired. Null unless |
| One of: string <date-time> | ||
| or: null | ||
| errorDetail * | any | Why the deploy failed. Null unless |
| One of: string | ||
| or: null | ||
| or: object | ||
| retired * | object[] | Every live operation of the module, now retired. |
| id * | string <uuid> | The function's id, a UUID. It stays the same across redeploys. |
| name * | string | The function's name. A module's operations are named |
| runtime * | "bun" | "rust" | "go" | "tinygo" | "zig" | "assemblyscript" | "c" | "cpp" | The language runtime: |
| tier * | "gateway" | "sandbox" | Where the function runs: |
| entryPoint * | string | The artifact key of the deployed code. |
| version * | string | The version label of the deploy. |
| status * | "deploying" | "active" | "error" | "retired" |
|
| source * | string | Who manages the function: |
| description * | any | What the function does. Null when none was given. |
| One of: string | ||
| or: null | ||
| createdAt * | string <date-time> | When the function was first deployed. |
| deployedAt * | any | When the current deploy became active. Null while it is deploying. |
| One of: string <date-time> | ||
| or: null | ||
| retiredAt * | any | When the function was retired. Null unless |
| One of: string <date-time> | ||
| or: null | ||
| errorDetail * | any | Why the deploy failed. Null unless |
| One of: string | ||
| or: null | ||
| meta * | any | |
// const k9o = new K9o({ orgSlug: 'playground', projectSlug: 'storefront', apiKey: 'k9o_…' })
const { data } = await k9o.functions.delete('greet')Showing example in TypeScript
{
"data": {
"id": "string",
"name": "string",
"runtime": "bun",
"tier": "gateway",
"entryPoint": "string",
"version": "string",
"status": "deploying",
"source": "string",
"description": "string",
"createdAt": "string",
"deployedAt": "string",
"retiredAt": "string",
"errorDetail": "string"
}
}