Skip to content

Latest commit

 

History

History
2726 lines (2039 loc) · 77.3 KB

api.md

File metadata and controls

2726 lines (2039 loc) · 77.3 KB

Tembo SDK Python API

Complete reference of every operation, grouped by resource. See the README for usage and configuration.

Contents

Setup

import os

from tembo import Tembo

client = Tembo(
    api_key=os.environ.get("TEMBO_API_KEY"),
)

ApiKeys

List API keys

List active API keys for the current organization.

Direction Type
Request APIKeyListParams
Response APIKeyListResponse
api_key = client.api_keys.list(
    limit=50,
)

Create an API key

Create an API key for the current organization. Optionally set expiresAt to a future timestamp after which the key stops authenticating requests. The complete token is returned only by this operation.

Direction Type
Request APIKeyCreateParams
Response APIKeyCreateResponse
api_key = client.api_keys.create()

Retrieve an API key

Retrieve an active API key without exposing its complete token.

Direction Type
Response APIKeyRetrieveResponse
api_key = client.api_keys.retrieve(
    api_key_id="7c9e6679-7425-40de-944b-e07fc1f90ae7",
)

Update an API key

Rename an active API key.

Direction Type
Request APIKeyUpdateParams
Response APIKeyUpdateResponse
api_key = client.api_keys.update(
    api_key_id="7c9e6679-7425-40de-944b-e07fc1f90ae7",
    name="x",
)

Delete an API key

Revoke an active API key so it can no longer authenticate requests.

Direction Type
Response APIKeyDeleteResponse
api_key = client.api_keys.delete(
    api_key_id="7c9e6679-7425-40de-944b-e07fc1f90ae7",
)

Skills

List skills

List organization skills or skills checked into a repository.

Direction Type
Request SkillListParams
Response SkillListResponse
skill = client.skills.list(
    limit=50,
    source="organization",
)

Create a skill

Create an organization skill with its files.

Direction Type
Request SkillCreateParams
Response SkillCreateResponse
skill = client.skills.create(
    description="",
    name="x",
    files=[{"content": "", "filename": "x"}],
)

Retrieve a skill

Retrieve an organization skill and all of its files.

Direction Type
Response SkillRetrieveResponse
skill = client.skills.retrieve(
    skill_id="7c9e6679-7425-40de-944b-e07fc1f90ae7",
)

Update a skill

Update an organization skill. When files are provided, they replace the complete file set.

Direction Type
Request SkillUpdateParams
Response SkillUpdateResponse
skill = client.skills.update(
    skill_id="7c9e6679-7425-40de-944b-e07fc1f90ae7",
)

Delete a skill

Delete an organization skill.

Direction Type
Response SkillDeleteResponse
skill = client.skills.delete(
    skill_id="7c9e6679-7425-40de-944b-e07fc1f90ae7",
)

Skills Marketplace

List marketplace skills

List popular marketplace skills or search the catalog. Results have no continuation cursor.

Direction Type
Request MarketplaceListParams
Response MarketplaceListResponse
marketplace = client.skills.marketplace.list(
    limit=50,
)

Retrieve a marketplace skill

Retrieve the files and content hash for a marketplace skill. This does not install the skill.

Direction Type
Request MarketplaceRetrieveParams
Response MarketplaceRetrieveResponse
marketplace = client.skills.marketplace.retrieve(
    skill_id="skillId",
    source="source",
)

Insights

Retrieve insights

Retrieve pull request contribution insights and their collection status for the current organization.

Direction Type
Request InsightRetrieveParams
Response InsightRetrieveResponse
insight = client.insights.retrieve(
    range="1y",
)

Update insights

Enable or disable pull request insight collection. Enabling starts the initial refresh when needed.

Direction Type
Request InsightUpdateParams
Response InsightUpdateResponse
insight = client.insights.update(
    enabled=False,
)

List insight members

List organization members included in pull request insights.

Direction Type
Request InsightListMembersParams
Response InsightListMembersResponse
insight = client.insights.list_members(
    limit=50,
    range="1y",
)

List insight repositories

List repositories included in pull request insights for the current organization.

Direction Type
Request InsightListRepositoriesParams
Response InsightListRepositoriesResponse
insight = client.insights.list_repositories(
    limit=50,
    range="1y",
)

Organizations

Create an organization

Create an organization and make the authenticated user its administrator.

Direction Type
Request OrganizationCreateParams
Response OrganizationCreateResponse
organization = client.organizations.create(
    name="x",
)

Retrieve an organization

Retrieve an organization profile.

Direction Type
Response OrganizationRetrieveResponse
organization = client.organizations.retrieve(
    organization_id="organizationId",
)

Update an organization

Update organization profile fields or onboarding state.

Direction Type
Request OrganizationUpdateParams
Response OrganizationUpdateResponse
organization = client.organizations.update(
    organization_id="organizationId",
)

Delete an organization

Delete the organization from the identity provider and Tembo.

Direction Type
Response OrganizationDeleteResponse
organization = client.organizations.delete(
    organization_id="organizationId",
)

Organizations Members

List organization members

List active members or pending invitations with cursor pagination.

Direction Type
Request MemberListParams
Response MemberListResponse
member = client.organizations.members.list(
    organization_id="organizationId",
    limit=50,
    status="active",
)

Create an organization member

Invite or add a user to an organization with a role.

Direction Type
Request MemberCreateParams
Response MemberCreateResponse
member = client.organizations.members.create(
    organization_id="organizationId",
    email_address="user@example.com",
    role="org:member",
)

Retrieve an organization member

Retrieve an active member or pending member invitation.

Direction Type
Response MemberRetrieveResponse
member = client.organizations.members.retrieve(
    organization_id="organizationId",
    member_id="memberId",
)

Update an organization member

Update an organization member role.

Direction Type
Request MemberUpdateParams
Response MemberUpdateResponse
member = client.organizations.members.update(
    organization_id="organizationId",
    member_id="memberId",
    role="org:admin",
)

Remove an organization member

Remove an active member or revoke a pending invitation.

Direction Type
Response MemberDeleteResponse
member = client.organizations.members.delete(
    organization_id="organizationId",
    member_id="memberId",
)

Organizations Secrets

List organization secrets

List redacted organization secret summaries with cursor pagination.

Direction Type
Request SecretListParams
Response SecretListResponse
secret = client.organizations.secrets.list(
    organization_id="organizationId",
    limit=50,
)

Create an organization secret

Create an encrypted organization secret.

Direction Type
Request SecretCreateParams
Response SecretCreateResponse
secret = client.organizations.secrets.create(
    organization_id="organizationId",
    key="x",
    value="x",
)

Retrieve an organization secret

Retrieve a redacted organization secret summary.

Direction Type
Response SecretRetrieveResponse
secret = client.organizations.secrets.retrieve(
    organization_id="organizationId",
    secret_id="7c9e6679-7425-40de-944b-e07fc1f90ae7",
)

Update an organization secret

Update a secret name, encrypted value, or both.

Direction Type
Request SecretUpdateParams
Response SecretUpdateResponse
secret = client.organizations.secrets.update(
    organization_id="organizationId",
    secret_id="7c9e6679-7425-40de-944b-e07fc1f90ae7",
)

Delete an organization secret

Delete an organization secret.

Direction Type
Response SecretDeleteResponse
secret = client.organizations.secrets.delete(
    organization_id="organizationId",
    secret_id="7c9e6679-7425-40de-944b-e07fc1f90ae7",
)

Organizations Settings

Retrieve organization settings

Retrieve effective organization settings, including defaults for settings that have not been configured.

Direction Type
Response SettingRetrieveResponse
setting = client.organizations.settings.retrieve(
    organization_id="organizationId",
)

Update organization settings

Configure organization defaults for agent/model, VM size and keep-alive; inference credentials and subscription fallback; agent prompts and commit/PR instructions; bot feedback, signing, reports, and insights. Only supplied settings are changed.

Direction Type
Request SettingUpdateParams
Response SettingUpdateResponse
setting = client.organizations.settings.update(
    organization_id="organizationId",
)

Validate organization provider credentials

Validate supplied inference provider credentials for an organization without saving them. The provider must be available on the organization’s plan.

Direction Type
Request SettingValidateCredentialsParams
Response SettingValidateCredentialsResponse
setting = client.organizations.settings.validate_credentials(
    organization_id="organizationId",
    provider="anthropic",
    api_key="",
)

Organizations Subscriptions

Retrieve organization subscriptions

Retrieve connection statuses and available ChatGPT and Claude usage. Provider usage errors are reported without failing the response.

Direction Type
Response SubscriptionRetrieveResponse
subscription = client.organizations.subscriptions.retrieve(
    organization_id="organizationId",
)

McpConnections

List MCP connections

List MCP connections for the current organization with cursor pagination and optional search by name or URL. Command arguments, headers, and environment configuration are omitted.

Direction Type
Request McpConnectionListParams
Response McpConnectionListResponse
mcp_connection = client.mcp_connections.list(
    limit=50,
)

Create an MCP connection

Create a new stdio or Streamable HTTP MCP connection. Remote connections support OAuth, Client Credentials (M2M), or static headers and begin authorization when required; stdio commands are stored but never executed by this API.

Direction Type
Request McpConnectionCreateParams
Response McpConnectionCreateResponse
mcp_connection = client.mcp_connections.create(
    name="x",
    args=[],
    command="x",
    type="stdio",
    visibility="shared",
)

Retrieve an MCP connection

Retrieve MCP connection configuration and authentication details. Stored header values, environment values, OAuth tokens, and client secrets are never returned.

Direction Type
Response McpConnectionRetrieveResponse
mcp_connection = client.mcp_connections.retrieve(
    mcp_connection_id="7c9e6679-7425-40de-944b-e07fc1f90ae7",
)

Update an MCP connection

Update MCP configuration, including OAuth, Client Credentials (M2M), or static-header authentication. Supplied headers merge by key only for unchanged-server static_headers authentication; otherwise they are replaced. Environment values merge by key, null values remove individual keys, and a null environment clears all variables. Hidden credentials are preserved unless explicitly changed or authentication is replaced; changing a remote server URL clears credentials for the old server. Call authorize explicitly after changing the server or authentication to reconnect.

Direction Type
Request McpConnectionUpdateParams
Response McpConnectionUpdateResponse
mcp_connection = client.mcp_connections.update(
    mcp_connection_id="7c9e6679-7425-40de-944b-e07fc1f90ae7",
    type="remote",
)

Delete an MCP connection

Delete an MCP connection in the current organization.

Direction Type
Response McpConnectionDeleteResponse
mcp_connection = client.mcp_connections.delete(
    mcp_connection_id="7c9e6679-7425-40de-944b-e07fc1f90ae7",
)

Authorize an MCP connection

Connect or authorize a remote Streamable HTTP MCP connection, returning an OAuth URL when user authorization is required. Stdio connections are rejected because this action cannot authorize them.

Direction Type
Response McpConnectionAuthorizeResponse
mcp_connection = client.mcp_connections.authorize(
    mcp_connection_id="7c9e6679-7425-40de-944b-e07fc1f90ae7",
)

Test an MCP connection

Test a remote MCP connection by connecting to its server. Stdio connections are rejected because the API does not execute arbitrary local commands.

Direction Type
Response McpConnectionTestResponse
mcp_connection = client.mcp_connections.test(
    mcp_connection_id="7c9e6679-7425-40de-944b-e07fc1f90ae7",
)

Artifacts

List artifacts

List organization artifacts with optional session and type filters.

Direction Type
Request ArtifactListParams
Response ArtifactListResponse
artifact = client.artifacts.list(
    limit=50,
)

Create an artifact

Create a file artifact for a session from inline content or an uploaded asset.

Direction Type
Request ArtifactCreateParams
Response ArtifactCreateResponse
artifact = client.artifacts.create(
    title="x",
    output={"type": "html", "content": "x"},
    session_id="7c9e6679-7425-40de-944b-e07fc1f90ae7",
)

Retrieve an artifact

Retrieve an organization artifact by ID.

Direction Type
Response ArtifactRetrieveResponse
artifact = client.artifacts.retrieve(
    artifact_id="7c9e6679-7425-40de-944b-e07fc1f90ae7",
)

Delete an artifact

Delete an organization artifact and its backing asset when present.

Direction Type
Response ArtifactDeleteResponse
artifact = client.artifacts.delete(
    artifact_id="7c9e6679-7425-40de-944b-e07fc1f90ae7",
)

Messages

List messages

List organization messages with optional session and thread filters.

Direction Type
Request MessageListParams
Response MessageListResponse
message = client.messages.list(
    limit=50,
)

Create a message

Send a task or follow-up message to an existing session, resume work, or steer an active agent turn using deliveryMode.

Direction Type
Request MessageCreateParams
Response MessageCreateResponse
message = client.messages.create(
    content="x",
    session_id="7c9e6679-7425-40de-944b-e07fc1f90ae7",
)

Retrieve a message

Retrieve an organization message by ID.

Direction Type
Response MessageRetrieveResponse
message = client.messages.retrieve(
    message_id="7c9e6679-7425-40de-944b-e07fc1f90ae7",
)

Update a message

Update message content before its queued processing has started.

Direction Type
Request MessageUpdateParams
Response MessageUpdateResponse
message = client.messages.update(
    message_id="7c9e6679-7425-40de-944b-e07fc1f90ae7",
)

Delete a message

Delete a message and cancel its queued jobs, runtime turns, and active sandbox sessions.

Direction Type
Response MessageDeleteResponse
message = client.messages.delete(
    message_id="7c9e6679-7425-40de-944b-e07fc1f90ae7",
)

Models

List models

List the models available to the current organization, including enablement and inference-provider access.

Direction Type
Request ModelListParams
Response ModelListResponse
model = client.models.list(
    limit=50,
)

Update a model

Enable or disable an organization model, or select its inference provider.

Direction Type
Request ModelUpdateParams
Response ModelUpdateResponse
model = client.models.update(
    model_name="claude-opus-5-5",
)

Runtimes

List runtimes

List execution runtimes and their compatible model references for the current organization.

Direction Type
Request RuntimeListParams
Response RuntimeListResponse
runtime = client.runtimes.list(
    limit=50,
)

Users

Retrieve the current user

Retrieve the authenticated user.

Direction Type
Response UserMeResponse
user = client.users.me()

Retrieve a user

Retrieve a user profile visible to the caller.

Direction Type
Response UserRetrieveResponse
user = client.users.retrieve(
    user_id="userId",
)

Users Settings

Retrieve user settings

Retrieve user preferences without exposing stored credentials.

Direction Type
Response SettingRetrieveResponse
setting = client.users.settings.retrieve(
    user_id="userId",
)

Update user settings

Configure personal agent/model and project defaults, system instructions, follow-up queue/steer behavior, VM restart, commit signing/attribution, notifications, themes, and review layout. Updates preserve unrelated settings.

Direction Type
Request SettingUpdateParams
Response SettingUpdateResponse
setting = client.users.settings.update(
    user_id="userId",
)

Users ConnectedAccounts

List user connected accounts

List the user identity-provider accounts without returning credentials.

Direction Type
Request ConnectedAccountListParams
Response ConnectedAccountListResponse
connected_account = client.users.connected_accounts.list(
    user_id="userId",
    limit=50,
)

Retrieve a user connected account

Retrieve one identity-provider account without returning credentials.

Direction Type
Response ConnectedAccountRetrieveResponse
connected_account = client.users.connected_accounts.retrieve(
    user_id="userId",
    connected_account_id="connectedAccountId",
)

Users Subscriptions

Retrieve user subscriptions

Retrieve connection statuses and available ChatGPT and Claude usage. Provider usage errors are reported without failing the response.

Direction Type
Response SubscriptionRetrieveResponse
subscription = client.users.subscriptions.retrieve(
    user_id="userId",
)

Users EnvironmentVariables

List personal environment variables

List your personal environment variables in the current organization. Values are never returned.

Direction Type
Response EnvironmentVariableListResponse
environment_variable = client.users.environment_variables.list(
    user_id="userId",
)

Create a personal environment variable

Store an encrypted environment variable that is injected into every session you start in the current organization.

Direction Type
Request EnvironmentVariableCreateParams
Response EnvironmentVariableCreateResponse
environment_variable = client.users.environment_variables.create(
    user_id="userId",
    key="x",
    value="x",
)

Delete a personal environment variable

Permanently delete a personal environment variable. Sessions started afterwards no longer receive it.

Direction Type
Response EnvironmentVariableDeleteResponse
environment_variable = client.users.environment_variables.delete(
    user_id="userId",
    environment_variable_id="7c9e6679-7425-40de-944b-e07fc1f90ae7",
)

Users ProfilePicture

Retrieve a user profile picture

Redirect to a user's profile picture. Signed URLs are valid for one hour.

client.users.profile_picture.retrieve(
    user_id="userId",
)

Update your profile picture

Upload a JPEG, PNG, GIF, or WebP profile picture up to 5 MB.

Direction Type
Request ProfilePictureUpdateParams
Response ProfilePictureUpdateResponse
profile_picture = client.users.profile_picture.update(
    user_id="userId",
    file=b"file",
)

Delete your profile picture

Delete your profile picture. This succeeds if no picture exists.

Direction Type
Response ProfilePictureDeleteResponse
profile_picture = client.users.profile_picture.delete(
    user_id="userId",
)

Sessions

List sessions

List and search sessions, including active or archived sessions, with repository, project, creator, and source filters and cursor pagination.

Direction Type
Request SessionListParams
Response SessionListResponse
session = client.sessions.list(
    limit=50,
    include_archived=True,
    include_total=False,
    sort_by="lastQueuedAt",
    state="all",
)

Create a session

Create a session for a task. Provide the initial prompt in description and optionally configure its repositories, agent, Build (normal) or Plan (planning) mode, and private or workspace visibility.

Direction Type
Request SessionCreateParams
Response SessionCreateResponse
session = client.sessions.create(
    agent="claudeCode:claude-fable-5-1",
    base_branch="main",
    mcp_servers=[],
    project_id="your-project-id",
    target_branch="main",
    visibility="private",
    code_repository_ids=["123e4567-e89b-12d3-a456-426614174000"],
    description="Fix the authentication bug in the login component",
)

Retrieve a session

Retrieve a session you have permission to access.

Direction Type
Response SessionRetrieveResponse
session = client.sessions.retrieve(
    session_id="7c9e6679-7425-40de-944b-e07fc1f90ae7",
)

Update a session

Update a session: archive or restore it, set priority, rename it, change agent/model, switch between Build (normal) and Plan (planning) modes, configure its workspace and branches, or change visibility between private and visible to workspace (public). Archiving uses level=0; restoring archived sessions uses level=1 and does not restart work. Use pins to pin or unpin sessions. Submit memoryMb alone to request asynchronous memory growth for a running adaptive sandbox within project limits; sandbox metrics report progress.

Direction Type
Request SessionUpdateParams
Response SessionUpdateResponse
session = client.sessions.update(
    session_id="7c9e6679-7425-40de-944b-e07fc1f90ae7",
)

Delete a session

Archive a session and stop its VM without permanently deleting it. Equivalent to updateSession with level=0; restore with updateSession and level=1.

Direction Type
Response SessionDeleteResponse
session = client.sessions.delete(
    session_id="7c9e6679-7425-40de-944b-e07fc1f90ae7",
)

Fork a session

Create an independent session from a fresh workspace snapshot, or the latest saved snapshot when stopped, without replaying messages or adding context. The fork returns right away and its messages queue until its workspace finishes booting.

Direction Type
Request SessionForkParams
Response SessionForkResponse
session = client.sessions.fork(
    session_id="7c9e6679-7425-40de-944b-e07fc1f90ae7",
    queue_right_away=True,
)

Stop a session

Interrupt active session work without archiving it. Continue with the next queued message, or set cancelQueued=true to cancel pending messages too.

Direction Type
Request SessionStopParams
Response SessionStopResponse
session = client.sessions.stop(
    session_id="7c9e6679-7425-40de-944b-e07fc1f90ae7",
)

List session events

List recorded session stream events with cursor pagination.

Direction Type
Request SessionListEventsParams
Response SessionListEventsResponse
session = client.sessions.list_events(
    session_id="7c9e6679-7425-40de-944b-e07fc1f90ae7",
    limit=50,
)

Sessions Sources

List session sources

List session sources in the authenticated organization.

Direction Type
Request SourceListParams
Response SourceListResponse
source = client.sessions.sources.list(
    limit=50,
    include_total=False,
)

Retrieve a session source

Retrieve one session source.

Direction Type
Response SourceRetrieveResponse
source = client.sessions.sources.retrieve(
    source_id="7c9e6679-7425-40de-944b-e07fc1f90ae7",
)

Sessions Diffs

List session diffs

List recorded session diff metadata with cursor pagination.

Direction Type
Request DiffListParams
Response DiffListResponse
diff = client.sessions.diffs.list(
    session_id="7c9e6679-7425-40de-944b-e07fc1f90ae7",
    limit=50,
)

Retrieve a session diff

Retrieve one recorded session diff and its content.

Direction Type
Response DiffRetrieveResponse
diff = client.sessions.diffs.retrieve(
    session_id="7c9e6679-7425-40de-944b-e07fc1f90ae7",
    diff_id="7c9e6679-7425-40de-944b-e07fc1f90ae7",
)

Sessions Inputs

List session inputs

List pending questions for the active session agent.

Direction Type
Response InputListResponse
input = client.sessions.inputs.list(
    session_id="7c9e6679-7425-40de-944b-e07fc1f90ae7",
)

Update a session input

Answer a pending session question.

Direction Type
Request InputUpdateParams
Response InputUpdateResponse
input = client.sessions.inputs.update(
    session_id="7c9e6679-7425-40de-944b-e07fc1f90ae7",
    input_id="inputId",
    answers={},
)

Sessions Queue

Update a session queue

Replace the order of messages waiting in a session queue.

Direction Type
Request QueueUpdateParams
Response QueueUpdateResponse
queue = client.sessions.queue.update(
    session_id="7c9e6679-7425-40de-944b-e07fc1f90ae7",
    message_ids=["7c9e6679-7425-40de-944b-e07fc1f90ae7"],
)

Sessions Commands

List session commands

List slash commands available to the session runtime.

Direction Type
Response CommandListResponse
command = client.sessions.commands.list(
    session_id="7c9e6679-7425-40de-944b-e07fc1f90ae7",
)

Projects

Update project defaults

Choose the default project and sandbox size for the organization.

Direction Type
Request ProjectUpdateDefaultsParams
Response ProjectUpdateDefaultsResponse
project = client.projects.update_defaults(
    project_id="x",
    sandbox_size="nano",
)

List projects

List projects in the authenticated organization.

Direction Type
Request ProjectListParams
Response ProjectListResponse
project = client.projects.list(
    limit=50,
)

Create a project

Create a reusable project environment.

Direction Type
Request ProjectCreateParams
Response ProjectCreateResponse
project = client.projects.create(
    name="x",
    sizes=["medium"],
    resource_settings={"automaticSizing": False},
)

Retrieve a project

Retrieve project configuration. Use the project subresources to list snapshots, builds, schedules, and environment variables.

Direction Type
Response ProjectRetrieveResponse
project = client.projects.retrieve(
    project_id="projectId",
)

Update a project

Update project repositories, setup script, agent instructions, environment variables, VM sizes and defaults; enable or pause scheduled builds or the warm pool; rename or customize its appearance.

Direction Type
Request ProjectUpdateParams
Response ProjectUpdateResponse
project = client.projects.update(
    project_id="projectId",
    resource_settings={"automaticSizing": False},
)

Delete a project

Archive a project, remove its default VM-size assignments, and disable its build schedule. This does not permanently delete the project record.

Direction Type
Response ProjectDeleteResponse
project = client.projects.delete(
    project_id="projectId",
)

Duplicate a project

Create a new project with the same configuration, environment variables, and schedule as an existing project. Snapshots are not copied.

Direction Type
Response ProjectDuplicateResponse
project = client.projects.duplicate(
    project_id="projectId",
)

Projects EnvironmentVariables

List project environment variables

List environment-variable names without exposing values.

Direction Type
Response EnvironmentVariableListResponse
environment_variable = client.projects.environment_variables.list(
    project_id="projectId",
)

Create project environment variables

Create one or more encrypted project environment variables.

Direction Type
Request EnvironmentVariableCreateParams
Response EnvironmentVariableCreateResponse
environment_variable = client.projects.environment_variables.create(
    project_id="projectId",
    secrets=[{"key": "", "value": "x"}],
)

Delete a project environment variable

Delete one encrypted project environment variable.

Direction Type
Response EnvironmentVariableDeleteResponse
environment_variable = client.projects.environment_variables.delete(
    project_id="projectId",
    key="key",
)

Projects Snapshots

List project snapshots

List recent VM snapshots built for a project.

Direction Type
Request SnapshotListParams
Response SnapshotListResponse
snapshot = client.projects.snapshots.list(
    project_id="projectId",
    limit=50,
)

Retrieve a project snapshot

Retrieve one project snapshot.

Direction Type
Response SnapshotRetrieveResponse
snapshot = client.projects.snapshots.retrieve(
    project_id="projectId",
    snapshot_id="snapshotId",
)

Update a project snapshot

Rename a snapshot or choose whether it is pinned.

Direction Type
Request SnapshotUpdateParams
Response SnapshotUpdateResponse
snapshot = client.projects.snapshots.update(
    project_id="projectId",
    snapshot_id="snapshotId",
)

Delete a project snapshot

Delete a project snapshot.

Direction Type
Response SnapshotDeleteResponse
snapshot = client.projects.snapshots.delete(
    project_id="projectId",
    snapshot_id="snapshotId",
)

Projects Builds

List project builds

List recent queued, running, and failed project builds.

Direction Type
Request BuildListParams
Response BuildListResponse
build = client.projects.builds.list(
    project_id="projectId",
    limit=50,
)

Create a project build

Build selected project sizes or rebuild one snapshot.

Direction Type
Request BuildCreateParams
Response BuildCreateResponse
build = client.projects.builds.create(
    project_id="projectId",
)

Retrieve a project build

Retrieve project build status.

Direction Type
Response BuildRetrieveResponse
build = client.projects.builds.retrieve(
    project_id="projectId",
    build_id="buildId",
)

Cancel a project build

Cancel an active queued or running project build.

Direction Type
Response BuildCancelResponse
build = client.projects.builds.cancel(
    project_id="projectId",
    build_id="buildId",
)

Projects Schedules

List project schedules

List schedules linked to a project.

Direction Type
Request ScheduleListParams
Response ScheduleListResponse
schedule = client.projects.schedules.list(
    project_id="projectId",
    limit=50,
)

Create a project schedule

Create a recurring project build schedule.

Direction Type
Request ScheduleCreateParams
Response ScheduleCreateResponse
schedule = client.projects.schedules.create(
    project_id="projectId",
    cron="x",
)

Retrieve a project schedule

Retrieve one project build schedule.

Direction Type
Response ScheduleRetrieveResponse
schedule = client.projects.schedules.retrieve(
    project_id="projectId",
    schedule_id="scheduleId",
)

Update a project schedule

Update timing or enabled state for a project schedule.

Direction Type
Request ScheduleUpdateParams
Response ScheduleUpdateResponse
schedule = client.projects.schedules.update(
    project_id="projectId",
    schedule_id="scheduleId",
)

Delete a project schedule

Disable a project build schedule.

Direction Type
Response ScheduleDeleteResponse
schedule = client.projects.schedules.delete(
    project_id="projectId",
    schedule_id="scheduleId",
)

Pins

List pins

List your pinned resources in pin order.

Direction Type
Request PinListParams
Response PinListResponse
pin = client.pins.list(
    limit=50,
)

Create a pin

Pin a session, pull request, or project you have permission to access.

Direction Type
Request PinCreateParams
Response PinCreateResponse
pin = client.pins.create(
    type="session",
    id="7c9e6679-7425-40de-944b-e07fc1f90ae7",
)

Update a pin

Reorder a pinned session, pull request, or project before or after another pin for the authenticated user. Use createPin to pin a resource and deletePin to unpin it.

Direction Type
Request PinUpdateParams
Response PinUpdateResponse
pin = client.pins.update(
    resource_type="session",
    resource_id="7c9e6679-7425-40de-944b-e07fc1f90ae7",
    placement={"target": {"type": "session", "id": "7c9e6679-7425-40de-944b-e07fc1f90ae7"}, "position": "before"},
)

Delete a pin

Unpin a session, pull request, or project for the authenticated user without deleting or archiving the resource.

Direction Type
Response PinDeleteResponse
pin = client.pins.delete(
    resource_type="session",
    resource_id="7c9e6679-7425-40de-944b-e07fc1f90ae7",
)

PullRequests

List pull requests

List pull requests for the authenticated organization with cursor pagination.

Direction Type
Request PullRequestListParams
Response PullRequestListResponse
pull_request = client.pull_requests.list(
    limit=50,
)

Retrieve a pull request

Retrieve a pull request for the authenticated organization.

Direction Type
Response PullRequestRetrieveResponse
pull_request = client.pull_requests.retrieve(
    pull_request_id="7c9e6679-7425-40de-944b-e07fc1f90ae7",
)

Agents

List agents

List agents available in your organization, with optional search, status, integration, and author filters.

Direction Type
Request AgentListParams
Response AgentListResponse
agent = client.agents.list(
    limit=50,
)

Create an agent

Create an agent from instructions, a template, or another agent. sourceAgentId cannot be combined with other fields. Template creation accepts only templateName, name, and triggers; creation from scratch requires name.

Direction Type
Request AgentCreateParams
Response AgentCreateResponse
agent = client.agents.create()

Retrieve an agent

Retrieve an agent and its configuration, repository associations, and run summary.

Direction Type
Response AgentRetrieveResponse
agent = client.agents.retrieve(
    agent_id="7c9e6679-7425-40de-944b-e07fc1f90ae7",
)

Update an agent

Update agent instructions, model, workspace, repositories, or persistent state; enable or pause the agent; archive or restore it. enabled and archived also control its schedules and triggers. Supply expectedUpdatedAt to reject concurrent changes.

Direction Type
Request AgentUpdateParams
Response AgentUpdateResponse
agent = client.agents.update(
    agent_id="7c9e6679-7425-40de-944b-e07fc1f90ae7",
)

Delete an agent

Archive an agent and disable its scheduled and triggered jobs without permanently deleting it. Restore with updateAgent and archived=false.

Direction Type
Response AgentDeleteResponse
agent = client.agents.delete(
    agent_id="7c9e6679-7425-40de-944b-e07fc1f90ae7",
)

Agents Templates

List agent templates

List reusable agent templates and their configuration requirements.

Direction Type
Request TemplateListParams
Response TemplateListResponse
template = client.agents.templates.list(
    limit=50,
)

Retrieve an agent template

Retrieve a reusable agent template by name, including its instructions and required parameters.

Direction Type
Response TemplateRetrieveResponse
template = client.agents.templates.retrieve(
    template_name="templateName",
)

Agents Schedules

List agent schedules

List the schedules configured for an agent.

Direction Type
Request ScheduleListParams
Response ScheduleListResponse
schedule = client.agents.schedules.list(
    agent_id="7c9e6679-7425-40de-944b-e07fc1f90ae7",
    limit=50,
)

Create an agent schedule

Create a recurring schedule that starts agent runs using a cron expression.

Direction Type
Request ScheduleCreateParams
Response ScheduleCreateResponse
schedule = client.agents.schedules.create(
    agent_id="7c9e6679-7425-40de-944b-e07fc1f90ae7",
    cron="x",
)

Retrieve an agent schedule

Retrieve an agent schedule, including its enabled state and next execution time.

Direction Type
Response ScheduleRetrieveResponse
schedule = client.agents.schedules.retrieve(
    agent_id="7c9e6679-7425-40de-944b-e07fc1f90ae7",
    schedule_id="7c9e6679-7425-40de-944b-e07fc1f90ae7",
)

Update an agent schedule

Change an agent schedule cron expression. Use updateAgent with enabled to enable or pause the agent and its schedules.

Direction Type
Request ScheduleUpdateParams
Response ScheduleUpdateResponse
schedule = client.agents.schedules.update(
    agent_id="7c9e6679-7425-40de-944b-e07fc1f90ae7",
    schedule_id="7c9e6679-7425-40de-944b-e07fc1f90ae7",
    cron="x",
)

Delete an agent schedule

Delete a recurring agent schedule.

Direction Type
Response ScheduleDeleteResponse
schedule = client.agents.schedules.delete(
    agent_id="7c9e6679-7425-40de-944b-e07fc1f90ae7",
    schedule_id="7c9e6679-7425-40de-944b-e07fc1f90ae7",
)

Agents Triggers

List agent triggers

List the integration events configured to start runs of an agent.

Direction Type
Request TriggerListParams
Response TriggerListResponse
trigger = client.agents.triggers.list(
    agent_id="7c9e6679-7425-40de-944b-e07fc1f90ae7",
    limit=50,
)

Create an agent trigger

Configure an integration event to start agent runs. Available filters depend on the integration and event name.

Direction Type
Request TriggerCreateParams
Response TriggerCreateResponse
trigger = client.agents.triggers.create(
    agent_id="7c9e6679-7425-40de-944b-e07fc1f90ae7",
    name="x",
)

Retrieve an agent trigger

Retrieve an agent trigger and its integration event filters.

Direction Type
Response TriggerRetrieveResponse
trigger = client.agents.triggers.retrieve(
    agent_id="7c9e6679-7425-40de-944b-e07fc1f90ae7",
    trigger_id="7c9e6679-7425-40de-944b-e07fc1f90ae7",
)

Update an agent trigger

Change an agent trigger event, integration, or filters. Use updateAgent with enabled to enable or pause the agent and its triggers.

Direction Type
Request TriggerUpdateParams
Response TriggerUpdateResponse
trigger = client.agents.triggers.update(
    agent_id="7c9e6679-7425-40de-944b-e07fc1f90ae7",
    trigger_id="7c9e6679-7425-40de-944b-e07fc1f90ae7",
    name="x",
)

Delete an agent trigger

Delete an integration event trigger for an agent.

Direction Type
Response TriggerDeleteResponse
trigger = client.agents.triggers.delete(
    agent_id="7c9e6679-7425-40de-944b-e07fc1f90ae7",
    trigger_id="7c9e6679-7425-40de-944b-e07fc1f90ae7",
)

Agents Runs

List agent runs

List executions of an agent, including status, linked session, measured duration, and failure summary.

Direction Type
Request RunListParams
Response RunListResponse
run = client.agents.runs.list(
    agent_id="7c9e6679-7425-40de-944b-e07fc1f90ae7",
    limit=50,
)

Create an agent run

Queue an agent run. The entire JSON object body is passed to the agent as event input; no eventPayload wrapper is needed. Omit the body to run without event input. The response confirms queuing, not completed execution.

Direction Type
Request RunCreateParams
Response RunCreateResponse
run = client.agents.runs.create(
    agent_id="7c9e6679-7425-40de-944b-e07fc1f90ae7",
)

Retrieve an agent run

Retrieve the status, linked session, measured duration, and failure summary of an agent run.

Direction Type
Response RunRetrieveResponse
run = client.agents.runs.retrieve(
    agent_id="7c9e6679-7425-40de-944b-e07fc1f90ae7",
    run_id="7c9e6679-7425-40de-944b-e07fc1f90ae7",
)

Agents ContentRevisions

List agent instruction revisions

List saved revisions of an agent’s instruction JSON document, newest first. Revisions do not include other agent configuration. Author details are redacted from public API responses.

Direction Type
Request ContentRevisionListParams
Response ContentRevisionListResponse
content_revision = client.agents.content_revisions.list(
    agent_id="7c9e6679-7425-40de-944b-e07fc1f90ae7",
    limit=50,
)

Retrieve an agent instruction revision

Retrieve the instruction JSON document saved in one revision. Other agent configuration is not included. Author details are redacted from public API responses.

Direction Type
Response ContentRevisionRetrieveResponse
content_revision = client.agents.content_revisions.retrieve(
    agent_id="7c9e6679-7425-40de-944b-e07fc1f90ae7",
    version=1,
)

Restore agent instructions

Restore a saved instruction JSON document and its mentioned integrations, without reverting other agent configuration. A changed document creates a new revision attributed to the caller. Supply the agent’s current contentVersion as expectedContentVersion; a concurrent instruction change returns 409.

Direction Type
Request ContentRevisionRestoreParams
Response ContentRevisionRestoreResponse
content_revision = client.agents.content_revisions.restore(
    agent_id="7c9e6679-7425-40de-944b-e07fc1f90ae7",
    version=1,
    expected_content_version=1,
)

Repositories

List repositories

List repositories in the authenticated organization. Defaults to enabled repositories.

Direction Type
Request RepositoryListParams
Response RepositoryListResponse
repository = client.repositories.list(
    limit=50,
    enabled="all",
    order="desc",
    sort="pullRequests",
)

Retrieve a repository

Retrieve a repository in the authenticated organization.

Direction Type
Response RepositoryRetrieveResponse
repository = client.repositories.retrieve(
    repository_id="7c9e6679-7425-40de-944b-e07fc1f90ae7",
)

Update a repository

Update repository configuration or enable or disable it.

Direction Type
Request RepositoryUpdateParams
Response RepositoryUpdateResponse
repository = client.repositories.update(
    repository_id="7c9e6679-7425-40de-944b-e07fc1f90ae7",
    enabled=False,
)

Integrations

List integrations

List integrations visible to the current organization or authenticated admin.

Direction Type
Request IntegrationListParams
Response IntegrationListResponse
integration = client.integrations.list(
    limit=50,
    include_total=False,
)

Create an integration

Connect AWS, BigQuery, GitLab, PostgreSQL, Snyk, OpenConnect VPN, or Tailscale using provider credentials. For browser-authorized providers, use listIntegrationProviders and authorizeIntegration instead.

Direction Type
Request IntegrationCreateParams
Response IntegrationCreateResponse
integration = client.integrations.create(
    environment="x",
    role_arn="x",
    type="aws",
)

Retrieve an integration

Retrieve an integration and its configuration.

Direction Type
Response IntegrationRetrieveResponse
integration = client.integrations.retrieve(
    integration_id="7c9e6679-7425-40de-944b-e07fc1f90ae7",
)

Update an integration

Update integration settings such as the default repository, Slack channel restrictions, automatic solving, or Sentry environments; replace AWS or PostgreSQL configuration; set or remove Atlassian service-account credentials.

Direction Type
Request IntegrationUpdateParams
Response IntegrationUpdateResponse
integration = client.integrations.update(
    integration_id="7c9e6679-7425-40de-944b-e07fc1f90ae7",
    settings={},
)

Delete an integration

Uninstall an integration from its provider when supported, then delete it from Tembo.

Direction Type
Response IntegrationDeleteResponse
integration = client.integrations.delete(
    integration_id="7c9e6679-7425-40de-944b-e07fc1f90ae7",
)

Authorize an integration

Return the provider authorization URL for an integration.

Direction Type
Request IntegrationAuthorizeParams
Response IntegrationAuthorizeResponse
integration = client.integrations.authorize(
    integration_id="7c9e6679-7425-40de-944b-e07fc1f90ae7",
)

Test an integration

Test the saved provider connection.

Direction Type
Response IntegrationTestResponse
integration = client.integrations.test(
    integration_id="7c9e6679-7425-40de-944b-e07fc1f90ae7",
)

Sync an integration

Queue or immediately perform an integration sync.

Direction Type
Request IntegrationSyncParams
Response IntegrationSyncResponse
integration = client.integrations.sync(
    integration_id="7c9e6679-7425-40de-944b-e07fc1f90ae7",
    mode="queued",
)

Sync eligible integrations

Queue integration and pull-request sync jobs for integrations with enabled repositories.

Direction Type
Request IntegrationSyncAllParams
Response IntegrationSyncAllResponse
integration = client.integrations.sync_all()

Retrieve integration sync status

Count active sync jobs for an integration or eligible integrations.

Direction Type
Request IntegrationRetrieveSyncStatusParams
Response IntegrationRetrieveSyncStatusResponse
integration = client.integrations.retrieve_sync_status()

Retrieve an integration rate limit

Retrieve the GitHub installation rate-limit state.

Direction Type
Response IntegrationRetrieveRateLimitResponse
integration = client.integrations.retrieve_rate_limit(
    integration_id="7c9e6679-7425-40de-944b-e07fc1f90ae7",
)

List Sentry environments

List environments visible to a Sentry integration.

Direction Type
Request IntegrationListSentryEnvironmentsParams
Response IntegrationListSentryEnvironmentsResponse
integration = client.integrations.list_sentry_environments(
    integration_id="7c9e6679-7425-40de-944b-e07fc1f90ae7",
    limit=50,
)

List Slack channels

List channels visible to a Slack integration.

Direction Type
Request IntegrationListSlackChannelsParams
Response IntegrationListSlackChannelsResponse
integration = client.integrations.list_slack_channels(
    integration_id="7c9e6679-7425-40de-944b-e07fc1f90ae7",
    limit=50,
)

Integrations Providers

List integration providers

List providers available to the current organization.

Direction Type
Request ProviderListParams
Response ProviderListResponse
provider = client.integrations.providers.list(
    limit=50,
)

Discover Snyk organizations

Validate Snyk service-account credentials and list accessible organizations.

Direction Type
Request ProviderDiscoverSnykOrganizationsParams
Response ProviderDiscoverSnykOrganizationsResponse
provider = client.integrations.providers.discover_snyk_organizations(
    client_id="x",
    client_secret="x",
    limit=50,
)

Integrations Triggers

List integration triggers

List visible automation triggers grouped by provider.

Direction Type
Request TriggerListParams
Response TriggerListResponse
trigger = client.integrations.triggers.list(
    limit=50,
)

Retrieve an integration trigger

Retrieve a trigger definition and its default filter values for an integration in the current organization.

Direction Type
Response TriggerRetrieveResponse
trigger = client.integrations.triggers.retrieve(
    integration_id="7c9e6679-7425-40de-944b-e07fc1f90ae7",
    trigger_name="triggerName",
)

List integration trigger filter options

List one cursor-page of selectable values for an integration trigger filter field, with optional search.

Direction Type
Request TriggerListFilterOptionsParams
Response TriggerListFilterOptionsResponse
trigger = client.integrations.triggers.list_filter_options(
    integration_id="7c9e6679-7425-40de-944b-e07fc1f90ae7",
    trigger_name="triggerName",
    field="field",
    limit=50,
)

Billing

Retrieve billing

Retrieve billing and credit information for the organization.

Direction Type
Response BillingRetrieveResponse
billing = client.billing.retrieve()

List billing usage

List session usage by default, or include warm pool compute with the type filter. Uses cursor pagination.

Direction Type
Request BillingListUsageParams
Response BillingListUsageResponse
billing = client.billing.list_usage(
    limit=50,
)

Live

Authorize a live connection

Issue a 30-second WebSocket ticket for one live connection that multiplexes resource subscriptions.

Direction Type
Response LiveAuthorizeResponse
live = client.live.authorize()

Live resource subscriptions

Native WebSocket. Send { op: "subscribe", id, resource, input }, { op: "unsubscribe", id }, or { op: "ping" }; receive { id, type: "ready" | "event" | "error" } or { type: "pong" }.

Direction Type
Request LiveConnectParams
with client.live.connect() as connection:
    message = connection.recv()
    print(message)