For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Logo
AI Hub
OverviewApp editorFlow editorAdminAPI & SDK
OverviewApp editorFlow editorAdminAPI & SDK
  • Overview
    • Using the API and SDK
    • Authorization
    • Response statuses
  • API & SDK guides
    • Run automation apps by SDK
  • API reference
      • POSTCreate secret
      • GETList secrets
      • PATCHUpdate secret
      • DELDelete secret
  • Legacy APIs
    • Job status
    • Run apps
    • Run results
    • Mount
AI Hub
API referenceSecrets

Create secret

POST
https://aihub.instabase.com/api/v2/aihub/secrets
POST
/api/v2/aihub/secrets
$curl -X POST "${API_ROOT}/v2/aihub/secrets" \
> -H "Authorization: Bearer ${API_TOKEN}" \
> -H "IB-Context: ${IB_CONTEXT}" \
> -H "Content-Type: application/json" \
> -d '{
> "alias": "my_secret",
> "description": "Sample secret",
> "value": "my password",
> "allowed_workspaces_type": "SOME",
> "allowed_workspaces": ["workspace1", "workspace2"]
> }'
200Successful
1{}
Create a new secret in this organization. <Note>Only organization admins can create secrets.</Note>
Was this page helpful?
Previous

List secrets

Next
Built with

Create a new secret in this organization.

Only organization admins can create secrets.

Authentication

AuthorizationBearer
Bearer HTTP authentication.

Headers

IB-ContextstringOptional

Typically your organization ID. See Authorization and context identification for details.

Request

This endpoint expects an object.
aliasstringRequired
Name of the secret.
valuestringRequired
Content of the secret.
allowed_workspaces_typeenumRequired
Which workspaces in this organization are allowed to use this secret in custom functions.
Allowed values:
descriptionstringOptional
Description of the secret.
allowed_workspaceslist of stringsOptional

Which workspaces are allowed to use this secret, if only some are allowed. Required when allowed_workspaces_type is SOME, otherwise ignored.

Response

Secret created successfully.