/extensions-admin/{slug}/enableEnable Extension
Enables a registered extension on the specified project.
It does these steps:
- binds the manifest's declared permission grants
- provisions a per-project SQL schema (
k9o_<proj_id>_ext_<slug>) - applies schema migrations
- issues a per-project plugin token
- deploys any declared background functions
- fires the
install(first enable) oractivate(re-enable) lifecycle hook
Returns 201 Created on first enable and 200 OK on re-enable from a disabled state.
The response includes the hookSecret (HMAC shared secret for X-K9o-Hook-Signature verification) which is delivered exactly once per enable cycle.
Returns K9O_EXTENSION_REAUTHORISATION_REQUIRED (409) if the manifest version adds permissions since the prior enable; call POST .../reauthorise first.
Requires PROJECT_ADMIN.
| slug * | path | |
| projectSlug * | path | The project's slug: the path segment after It is unique within the org. |
| reviewedVersion | string | Needed only for an extension that asks to invoke any function ( If the registry has moved on, the enable is refused with 409 Ignored otherwise. |
| aadBindings | object[] | For an extension with an Azure Event Grid webhook path: the audience and issuer each path's tokens are checked against. Each entry needs all three strings, otherwise 400 |
| path * | string | The declared webhook ingress path this binding applies to. |
| expectedAudience * | string | The audience the Azure Event Grid token must carry. |
| expectedIssuer * | string | The issuer the Azure Event Grid token must come from. |
| HTTP | K9O Code | Description |
|---|---|---|
| 200 | Success | |
| 201 | Created | |
| 400 | K9O_EXTENSION_MANIFEST_INVALID | The extension manifest fails schema validation at enable time; the field that failed is identified in the error context. |
| 400 | K9O_EXTENSION_SLUG_INVALID | The extension slug does not match the required format and cannot be resolved. |
| 400 | K9O_EXTENSION_CUSTOM_TOKEN_SLUG_MISMATCH | A `custom_tokens` key in the manifest does not start with `--ext-<the manifest's own slug>-`; `context.field` names the key. |
| 401 | K9O_SESSION_EXPIRED | Your session has expired; authenticate again to continue. |
| 403 | K9O_ACCESS_DENIED | Your role does not permit enabling extensions on this project; a PROJECT_ADMIN role is required. |
| 403 | K9O_EXTENSION_PERMISSION_DENIED | The extension's manifest-declared permissions do not authorise this operation on the project. Or the manifest grants (audit, read, project) and the registering org is not first-party (reason audit_project_scope_first_party_only). |
| 403 | K9O_RBAC_DENY | The manifest grants the project-wide audit read and the caller is below PROJECT_ADMIN (reason audit_project_scope_requires_project_admin). |
| 404 | K9O_EXTENSION_NOT_FOUND | No extension with this slug exists in the registry. |
| 409 | K9O_EXTENSION_REAUTHORISATION_REQUIRED | The extension's manifest has been updated with additional permissions since the last enable; re-authorise to proceed. |
| 409 | K9O_EXTENSION_UNREGISTERED | The extension has been unregistered from the org and is in its grace period; new enables are no longer permitted. |
| data * | object | |
| installId * | string | The project's install record for the extension ( |
| extensionSlug * | string | The extension's slug. |
| projectId * | string | The project's id ( |
| manifestVersion * | string | The version now enabled, |
| status * | "enabled" | Always |
| extensionSchema * | string | The name of the database schema that holds the extension's own tables on this project. |
| functions * | object | The functions the manifest declares. |
| inserted * | integer | Functions registered for the first time. |
| reactivated * | integer | Functions registered earlier and switched back on. |
| mcpTools * | object | The MCP tools the manifest declares. |
| inserted * | integer | Tools registered for the first time. |
| reactivated * | integer | Tools registered earlier and switched back on. |
| iframe * | any | |
| One of: object | ||
| published * | boolean | True when every console file was written. False when any file failed; the install itself still succeeded. |
| route * | any | |
| One of: "managed" | "byos" | ||
| or: null | ||
| keyPrefix * | any | |
| One of: string | ||
| or: null | ||
| iframeEntryPath * | any | |
| One of: string | ||
| or: null | ||
| errorCode * | any | |
| One of: string | ||
| or: null | ||
| successCount * | integer | How many files were written. |
| failureCount * | integer | How many files failed to write. |
| or: null | ||
| warnings | string[] | Present only when something succeeded with a caveat. |
| hookSecret * | string | The secret that signs the platform's calls to the extension's lifecycle hooks (base64url). It is shown only on this response and is new each time the extension is enabled; store it now. |
| webhookSecrets * | object[] | The signing secret created for each inbound webhook path that needs one. Empty when none were created now. |
| path * | string | The declared webhook ingress path. |
| secret * | string | The signing secret the sender must use for this path. Shown only here; no later read returns it. |
| webhookVerifyTokens * | object[] | For each Meta webhook path, the verify token, shown once. Empty when none were created now. |
| path * | string | The declared webhook ingress path. |
| verifyToken * | string | The token to enter in Meta's dashboard when it verifies the endpoint. Shown only here. |
| meta * | any | |
| data * | object | |
| installId * | string | The project's install record for the extension ( |
| extensionSlug * | string | The extension's slug. |
| projectId * | string | The project's id ( |
| manifestVersion * | string | The version now enabled, |
| status * | "enabled" | Always |
| extensionSchema * | string | The name of the database schema that holds the extension's own tables on this project. |
| functions * | object | The functions the manifest declares. |
| inserted * | integer | Functions registered for the first time. |
| reactivated * | integer | Functions registered earlier and switched back on. |
| mcpTools * | object | The MCP tools the manifest declares. |
| inserted * | integer | Tools registered for the first time. |
| reactivated * | integer | Tools registered earlier and switched back on. |
| iframe * | any | |
| One of: object | ||
| published * | boolean | True when every console file was written. False when any file failed; the install itself still succeeded. |
| route * | any | |
| One of: "managed" | "byos" | ||
| or: null | ||
| keyPrefix * | any | |
| One of: string | ||
| or: null | ||
| iframeEntryPath * | any | |
| One of: string | ||
| or: null | ||
| errorCode * | any | |
| One of: string | ||
| or: null | ||
| successCount * | integer | How many files were written. |
| failureCount * | integer | How many files failed to write. |
| or: null | ||
| warnings | string[] | Present only when something succeeded with a caveat. |
| hookSecret * | string | The secret that signs the platform's calls to the extension's lifecycle hooks (base64url). It is shown only on this response and is new each time the extension is enabled; store it now. |
| webhookSecrets * | object[] | The signing secret created for each inbound webhook path that needs one. Empty when none were created now. |
| path * | string | The declared webhook ingress path. |
| secret * | string | The signing secret the sender must use for this path. Shown only here; no later read returns it. |
| webhookVerifyTokens * | object[] | For each Meta webhook path, the verify token, shown once. Empty when none were created now. |
| path * | string | The declared webhook ingress path. |
| verifyToken * | string | The token to enter in Meta's dashboard when it verifies the endpoint. Shown only here. |
| meta * | any | |
curl -X POST 'https://<org>.api-<region>.k9o.io/@storefront/extensions-admin/demoext/enable' \
-H 'Authorization: Bearer $K9O_TOKEN' \
-H 'Content-Type: application/json' \
-d '{}'Showing example in cURL
{
"reviewedVersion": "string",
"aadBindings": [
{
"path": "string",
"expectedAudience": "string",
"expectedIssuer": "string"
}
]
}{
"data": {
"installId": "string",
"extensionSlug": "string",
"projectId": "string",
"manifestVersion": "string",
"status": "enabled",
"extensionSchema": "string",
"functions": {
"inserted": 0,
"reactivated": 0
},
"mcpTools": {
"inserted": 0,
"reactivated": 0
},
"iframe": {
"published": false,
"route": "managed",
"keyPrefix": "string",
"iframeEntryPath": "string",
"errorCode": "string",
"successCount": 0,
"failureCount": 0
},
"warnings": [
"string"
],
"hookSecret": "string",
"webhookSecrets": [
{
"path": "string",
"secret": "string"
}
],
"webhookVerifyTokens": [
{
"path": "string",
"verifyToken": "string"
}
]
}
}{
"data": {
"installId": "string",
"extensionSlug": "string",
"projectId": "string",
"manifestVersion": "string",
"status": "enabled",
"extensionSchema": "string",
"functions": {
"inserted": 0,
"reactivated": 0
},
"mcpTools": {
"inserted": 0,
"reactivated": 0
},
"iframe": {
"published": false,
"route": "managed",
"keyPrefix": "string",
"iframeEntryPath": "string",
"errorCode": "string",
"successCount": 0,
"failureCount": 0
},
"warnings": [
"string"
],
"hookSecret": "string",
"webhookSecrets": [
{
"path": "string",
"secret": "string"
}
],
"webhookVerifyTokens": [
{
"path": "string",
"verifyToken": "string"
}
]
}
}