# Claude Code

`POST /workspaces/:workspace/projects/:project_name/pipelines/:pipeline_id/actions`

Creates a new Claude Code action in the pipeline

**Required Scopes:** `EXECUTION_MANAGE`

## URL Parameters

```typescript
interface URLParameters {
  /** The human-readable ID of the workspace */
  workspace: string; // Example: "my-company"
  /** The human-readable ID of the project */
  project_name: string; // Example: "my-project"
  /** The ID of the pipeline */
  pipeline_id: number; // Example: 123
}
```

## Body Parameters

```typescript
interface BodyParameters {
  /** The type of the action */
  type: "CLAUDE_CODE";
  /** The name of the action */
  name: string;
  /** The name of the Docker image */
  docker_image_name: string;
  /** The tag of the Docker image */
  docker_image_tag: string;
  /** The commands that will be executed */
  execute_commands: string[];
  /** The numerical ID of the action, after which this action should be added */
  after_action_id?: number;
  /** Specifies when the action should be executed */
  trigger_time?: "ON_EVERY_EXECUTION" | "ON_SUCCESS" | "ON_FAILURE" | "ON_BACK_TO_SUCCESS" | "ON_WARNING" | "ON_WAIT_FOR_APPROVE" | "ON_TERMINATE";
  /** The list of trigger conditions to meet so that the action can be triggered */
  trigger_conditions?: TriggerConditionView[];
  /** Defines whether the action should run in parallel with the next one */
  run_next?: "WAIT_ON_SUCCESS" | "IN_SOFT_PARALLEL" | "IN_HARD_PARALLEL";
  /** Defines whether the action should be executed on each failure. Restricted to and required if the `trigger_time` is `ON_FAILURE` */
  run_only_on_first_failure?: boolean;
  /** The list of variables you can use the action */
  variables?: EnvironmentVariableView[];
  /** When set to `true` the action is disabled. By default it is set to `false` */
  disabled?: boolean;
  /** The timeout in seconds */
  timeout?: number;
  /** If set to `true` the execution will proceed, mark action as a warning and jump to the next action. Doesn't apply to deployment actions */
  ignore_errors?: boolean;
  /** Number of retries if the action fails */
  retry_count?: number;
  /** Delay time between auto retries in seconds */
  retry_interval?: number;
  /** The list of commands that will be executed in a loop */
  loop?: string[];
  /** The git revision of the last successful run of the action */
  current_revision?: string;
  /** The directory in which the pipeline filesystem will be mounted */
  working_directory?: string;
  /** The hostname of the container in which the action is run. The container will be available under this name in the docker network for services */
  main_service_name?: string;
  /** All build commands are run as the default user defined in the selected Docker image. Can be set to another username (on the condition that this user exists in the selected image) */
  run_as_user?: string;
  /** The version of the artifact from artifact registry */
  version?: string;
  /** If set to `true`, the filesystem will not be mounted in the container */
  mount_filesystem_disable?: boolean;
  /** The path preceding the colon is the filesystem path (the folder from the filesystem to be mounted in the container). The path after the colon is the container path (the path in the container, where this filesystem will be located) */
  volume_mappings?: string[];
  /** The dependencies & directories to be cached and available to every execution in this pipeline */
  cached_dirs?: string[];
  /** The command that will be executed only on the first run */
  setup_commands?: string[];
  /** The list of services attached to the build environment */
  services?: ServiceView[];
  /** The name of the shell that will be used to execute commands */
  shell?: "SH" | "BASH" | "POWERSHELL";
  /** The URL of the Docker registry */
  registry?: string;
  /** If set to `true`, the registry will be accessed over HTTP instead of HTTPS */
  insecure_registry?: boolean;
  /** The username for the Docker registry */
  login?: string;
  /** The target stage of the Dockerfile */
  target_stage?: string;
  /** The password for the Docker registry */
  password?: string;
  /** The region for the Docker registry (for AWS ECR) */
  region?: string;
  /** The location of the image used by the action */
  image_location?: "PUBLIC_REGISTRY" | "PRIVATE_REGISTRY" | "ACTION" | "ARTIFACT_REGISTRY";
  /** If set to `true`, the image from another action will be used */
  use_image_from_action?: boolean;
  /** The type of registry from which the image is retrieved */
  docker_registry?: "NONE" | "DOCKER_HUB" | "AMAZON_ECR" | "GOOGLE_GCR" | "GOOGLE_ARTIFACT_REGISTRY" | "OTHER" | "GIT_HUB_CONTAINER_REGISTRY" | "ARTIFACT_REGISTRY" | "DIGITAL_OCEAN_CONTAINER_REGISTRY";
  /** The ID of the action from which the Docker image will be used */
  docker_build_action_id?: number;
  /** The name of the action from which the Docker image will be used */
  docker_build_action_name?: string;
  /** The path in the container to export */
  export_container_path?: string;
  /** If set to `true` all commands will be executed regardless of the result of the previous command */
  execute_every_command?: boolean;
  /** If set to `true`, use cached image on timeouts (only for official images) */
  ignore_image_pull_failures?: boolean;
  /** If set to `true`, resets the default entrypoint set by the image. Default value: `false` */
  reset_entrypoint?: boolean;
  /** The username for authentication */
  username?: string;
  /** If set to `true`, the cached version of the image is used, instead of being pulled each time */
  cache_base_image?: boolean;
  /** If set to `true`, images will not be pruned after the build */
  do_not_prune_images?: boolean;
  /** The visual tests suite identifier */
  vt_suite?: string;
  /** The unit tests suite identifier */
  unit_tests_suite?: string;
  /** The path to the unit tests results */
  unit_tests_path?: string;
  /** Docker registry integration (DOCKER_HUB|GOOGLE_SERVICE_ACCOUNT|AMAZON|GIT_HUB|GIT_HUB_ENTERPRISE) */
  integration?: DockerIntegrationRef;
  /** List of prompts to send to Claude Code. Each prompt has a `type` (`INLINE` or `FILE`) and a `value`. */
  prompts?: LlmBuildPromptView[];
  /** The Claude model to use (e.g. `sonnet`, `opus`, `haiku`). */
  model?: string;
  /** JSON string with Claude Code settings. */
  settings?: ClaudeCodeSettingsView;
  /** Additional CLI arguments passed to Claude Code. */
  claude_args?: string;
  /** If `true`, skip permission prompts (runs with `--dangerously-skip-permissions`). */
  dangerously_skip_permissions?: boolean;
  /** The identifier of the artifact from artifact registry */
  artifact?: string;
}
```

## Response Body

```typescript
interface ResponseBody {
  /** The type of the action */
  type?: "CLAUDE_CODE";
  /** API endpoint to GET this object */
  url?: string;
  /** Web URL to view this object in Buddy.works */
  html_url?: string;
  /** The ID of the action */
  id?: number;
  /** The name of the action */
  name?: string;
  /** The git revision of the last successful run of the action */
  current_revision?: string;
  /** Specifies when the action should be executed */
  trigger_time?: "ON_EVERY_EXECUTION" | "ON_SUCCESS" | "ON_FAILURE" | "ON_BACK_TO_SUCCESS" | "ON_WARNING" | "ON_WAIT_FOR_APPROVE" | "ON_TERMINATE";
  /** The list of trigger conditions to meet so that the action can be triggered */
  trigger_conditions?: TriggerConditionView[];
  /** Defines whether the action should run in parallel with the next one */
  run_next?: "WAIT_ON_SUCCESS" | "IN_SOFT_PARALLEL" | "IN_HARD_PARALLEL";
  /** Defines whether the action should be executed on each failure. Restricted to and required if the `trigger_time` is `ON_FAILURE` */
  run_only_on_first_failure?: boolean;
  /** The list of variables you can use the action */
  variables?: EnvironmentVariableView[];
  /** When set to `true` the action is disabled. By default it is set to `false` */
  disabled?: boolean;
  /** The timeout in seconds */
  timeout?: number;
  /** If set to `true` the execution will proceed, mark action as a warning and jump to the next action. Doesn't apply to deployment actions */
  ignore_errors?: boolean;
  /** Number of retries if the action fails */
  retry_count?: number;
  /** Delay time between auto retries in seconds */
  retry_interval?: number;
  /** The status of the last run of the action */
  last_execution_status?: "INPROGRESS" | "ENQUEUED" | "TERMINATED" | "SUCCESSFUL" | "FAILED" | "INITIAL" | "NOT_EXECUTED" | "SKIPPED" | "TERMINATING" | "WAITING_FOR_APPLY" | "WAITING_FOR_VARIABLES" | "WAITING_FOR_SETTABLE_VARIABLES" | "WAITING_FOR_VT_SESSION";
  /** Short representation of a pipeline */
  pipeline?: ShortPipelineView;
  /** Access permissions configuration */
  permissions?: PermissionsView;
  /** The list of commands that will be executed in a loop */
  loop?: string[];
  /** The directory in which the pipeline filesystem will be mounted */
  working_directory?: string;
  /** The hostname of the container in which the action is run. The container will be available under this name in the docker network for services */
  main_service_name?: string;
  /** All build commands are run as the default user defined in the selected Docker image. Can be set to another username (on the condition that this user exists in the selected image) */
  run_as_user?: string;
  /** The version of the artifact from artifact registry */
  version?: string;
  /** The name of the Docker image */
  docker_image_name?: string;
  /** The tag of the Docker image */
  docker_image_tag?: string;
  /** The commands that will be executed */
  execute_commands?: string[];
  /** If set to `true`, the filesystem will not be mounted in the container */
  mount_filesystem_disable?: boolean;
  /** The path preceding the colon is the filesystem path (the folder from the filesystem to be mounted in the container). The path after the colon is the container path (the path in the container, where this filesystem will be located) */
  volume_mappings?: string[];
  /** The dependencies & directories to be cached and available to every execution in this pipeline */
  cached_dirs?: string[];
  /** The command that will be executed only on the first run */
  setup_commands?: string[];
  /** The list of services attached to the build environment */
  services?: ServiceView[];
  /** The name of the shell that will be used to execute commands */
  shell?: "SH" | "BASH" | "POWERSHELL";
  /** The URL of the Docker registry */
  registry?: string;
  /** If set to `true`, the registry will be accessed over HTTP instead of HTTPS */
  insecure_registry?: boolean;
  /** The username for the Docker registry */
  login?: string;
  /** The target stage of the Dockerfile */
  target_stage?: string;
  /** The password for the Docker registry */
  password?: string;
  /** The region for the Docker registry (for AWS ECR) */
  region?: string;
  /** The location of the image used by the action */
  image_location?: "PUBLIC_REGISTRY" | "PRIVATE_REGISTRY" | "ACTION" | "ARTIFACT_REGISTRY";
  /** The type of registry from which the image is retrieved */
  docker_registry?: "NONE" | "DOCKER_HUB" | "AMAZON_ECR" | "GOOGLE_GCR" | "GOOGLE_ARTIFACT_REGISTRY" | "OTHER" | "GIT_HUB_CONTAINER_REGISTRY" | "ARTIFACT_REGISTRY" | "DIGITAL_OCEAN_CONTAINER_REGISTRY";
  /** The ID of the action from which the Docker image will be used */
  docker_build_action_id?: number;
  /** The name of the action from which the Docker image will be used */
  docker_build_action_name?: string;
  /** The path in the container to export */
  export_container_path?: string;
  /** If set to `true` all commands will be executed regardless of the result of the previous command */
  execute_every_command?: boolean;
  /** If set to `true`, use cached image on timeouts (only for official images) */
  ignore_image_pull_failures?: boolean;
  /** If set to `true`, the cached version of the image is used, instead of being pulled each time */
  cache_base_image?: boolean;
  /** If set to `true`, resets the default entrypoint set by the image. Default value: `false` */
  reset_entrypoint?: boolean;
  /** The visual tests suite identifier */
  vt_suite?: string;
  /** The unit tests suite identifier */
  unit_tests_suite?: string;
  /** The path to the unit tests results */
  unit_tests_path?: string;
  /** List of prompts to send to Claude Code. Each prompt has a `type` (`INLINE` or `FILE`) and a `value`. */
  prompts?: LlmBuildPromptView[];
  /** The Claude model to use (e.g. `sonnet`, `opus`, `haiku`). */
  model?: string;
  /** JSON string with Claude Code settings. */
  settings?: ClaudeCodeSettingsView;
  /** Additional CLI arguments passed to Claude Code. */
  claude_args?: string;
  /** If `true`, skip permission prompts (runs with `--dangerously-skip-permissions`). */
  dangerously_skip_permissions?: boolean;
  /** The integration used by the action */
  integration?: IntegrationIdentifierView;
  /** The identifier of the artifact from artifact registry */
  artifact?: string;
}
```

## Type Definitions

```typescript
interface TriggerConditionView {
  /** The type of trigger condition */
  trigger_condition?: "ALWAYS" | "ON_CHANGE" | "ON_CHANGE_AT_PATH" | "VAR_IS" | "VAR_IS_NOT" | "VAR_CONTAINS" | "VAR_NOT_CONTAINS" | "DATETIME" | "SUCCESS_PIPELINE" | "DAY" | "HOUR" | "OR" | "VAR_LESS_THAN" | "VAR_LESS_THAN_OR_EQUAL" | "VAR_GREATER_THAN" | "VAR_GREATER_THAN_OR_EQUAL" | "ACTION_STATUS_IS" | "ACTION_STATUS_IS_NOT" | "TRIGGERING_USER_IS" | "TRIGGERING_USER_IS_NOT" | "TRIGGERING_USER_IS_IN_GROUP" | "TRIGGERING_USER_IS_NOT_IN_GROUP";
  /** The value to compare the trigger variable against */
  trigger_variable_value?: string;
  /** The name of the variable to check in the trigger condition */
  trigger_variable_key?: string;
  /** The timezone for datetime trigger conditions (e.g., 'UTC', 'Europe/Warsaw') */
  timezone?: string;
  /** The hours when the datetime trigger should activate (0-23) */
  trigger_hours?: number[];
  /** The days when the datetime trigger should activate (1-7, where 1 is Monday) */
  trigger_days?: number[];
  /** The project name for cross-project pipeline triggers */
  trigger_project_name?: string;
  /** The pipeline name for cross-pipeline triggers */
  trigger_pipeline_name?: string;
  /** The email of the user who can trigger the pipeline */
  trigger_user?: string;
  /** The name of the group that can trigger the pipeline */
  trigger_group?: string;
  /** The file paths that must change to trigger the pipeline */
  trigger_condition_paths?: string[];
  /** The action status to check for action status triggers */
  trigger_status?: "SUCCESSFUL" | "FAILED" | "SKIPPED" | "SUPPRESSED";
  /** The name of the action to check status for */
  trigger_action_name?: string;
  /** The list of nested trigger conditions for OR/AND operators */
  trigger_operands?: TriggerConditionOperandView[];
}

interface TriggerConditionOperandView {
  /** The type of trigger condition */
  trigger_condition?: "ALWAYS" | "ON_CHANGE" | "ON_CHANGE_AT_PATH" | "VAR_IS" | "VAR_IS_NOT" | "VAR_CONTAINS" | "VAR_NOT_CONTAINS" | "DATETIME" | "SUCCESS_PIPELINE" | "DAY" | "HOUR" | "OR" | "VAR_LESS_THAN" | "VAR_LESS_THAN_OR_EQUAL" | "VAR_GREATER_THAN" | "VAR_GREATER_THAN_OR_EQUAL" | "ACTION_STATUS_IS" | "ACTION_STATUS_IS_NOT" | "TRIGGERING_USER_IS" | "TRIGGERING_USER_IS_NOT" | "TRIGGERING_USER_IS_IN_GROUP" | "TRIGGERING_USER_IS_NOT_IN_GROUP";
  /** The value to compare the trigger variable against */
  trigger_variable_value?: string;
  /** The name of the variable to check in the trigger condition */
  trigger_variable_key?: string;
  /** The timezone for datetime trigger conditions (e.g., 'UTC', 'Europe/Warsaw') */
  timezone?: string;
  /** The hours when the datetime trigger should activate (0-23) */
  trigger_hours?: number[];
  /** The days when the datetime trigger should activate (1-7, where 1 is Monday) */
  trigger_days?: number[];
  /** The project name for cross-project pipeline triggers */
  trigger_project_name?: string;
  /** The pipeline name for cross-pipeline triggers */
  trigger_pipeline_name?: string;
  /** The email of the user who can trigger the pipeline */
  trigger_user?: string;
  /** The name of the group that can trigger the pipeline */
  trigger_group?: string;
  /** The file paths that must change to trigger the pipeline */
  trigger_condition_paths?: string[];
  /** The action status to check for action status triggers */
  trigger_status?: "SUCCESSFUL" | "FAILED" | "SKIPPED" | "SUPPRESSED";
  /** The name of the action to check status for */
  trigger_action_name?: string;
}

interface EnvironmentVariableView {
  /** The ID of the variable */
  id?: number;
  /** The name of the variable */
  key?: string;
  /** The value of the variable */
  value?: string;
  /** The type of the added variable */
  type?: "VAR" | "FILE" | "SSH_KEY" | "IOS_KEYCHAIN" | "IOS_PROVISION_PROFILES" | "SSH_PUBLIC_KEY" | "GPG_KEY";
  /** If set to `true` the variable value will be encrypted and hidden */
  encrypted?: boolean;
  /** If set to `true` the variable value can be set by Buddy actions */
  settable?: boolean;
  /** Available only if `type=VAR`. If set to `true` the variable value can be set by Buddy actions only for execution time */
  run_only_settable?: boolean;
  /** The optional description of the variable */
  description?: string;
  /** Initial path for the variable */
  init_path?: string;
  /** Default value for the variable */
  defaults?: string;
  /** Specifies where to copy the file on each run. Set if `type` is `FILE`, `SSH_KEY`, `SSH_PUBLIC_KEY`, `IOS_KEYCHAIN`, or `IOS_PROVISION_PROFILES` */
  file_path?: string;
  /** File permission set on copy to a container on each run. Set if `type` is `FILE`, `SSH_KEY`, `SSH_PUBLIC_KEY`, `IOS_KEYCHAIN`, or `IOS_PROVISION_PROFILES` */
  file_chmod?: string;
  /** Set if `type` is `FILE`, `SSH_KEY`, `SSH_PUBLIC_KEY`, `IOS_KEYCHAIN`, or `IOS_PROVISION_PROFILES`. If it's `NONE`, the variable can be used as a parameter in an action. For `CONTAINER`, the given key is additionally copied to an action container on each run */
  file_place?: "NONE" | "CONTAINER";
  /** Whether the file is binary */
  binary?: boolean;
  /** Public value for SSH key type variables */
  public_value?: string;
  /** Fingerprint of SSH key */
  key_fingerprint?: string;
  /** Checksum of the variable value */
  checksum?: string;
  /** Password for certificates */
  password?: string;
  /** Passphrase for encrypted SSH keys */
  passphrase?: string;
  /** Key identifier for iOS certificates, provisioning profiles, or GPG keys */
  key_identifier?: string;
}

interface ServiceView {
  /** The type of service (e.g., MYSQL, POSTGRES, MONGODB, REDIS, ELASTICSEARCH, MEMCACHED, CUSTOM) */
  type?: string;
  /** The version of the service */
  version?: string;
  /** The path to the database dump file to import on service startup */
  dump_path?: string;
  /** If set to `true`, service data persists between pipeline executions */
  persistent?: boolean;
  /** The database connection details */
  connection?: ServiceConnectionView;
  /** The gas price for Ethereum blockchain services (in wei) */
  gas_price?: number;
  /** The gas limit for Ethereum blockchain services */
  gas_limit?: number;
  /** The list of Ethereum accounts for blockchain services */
  accounts?: string[];
  /** The name of the custom Docker image */
  docker_image_name?: string;
  /** The tag of the custom Docker image */
  docker_image_tag?: string;
  /** The Docker registry URL for custom images */
  registry?: string;
  /** The username for Docker registry authentication */
  login?: string;
  /** The password for Docker registry authentication */
  password?: string;
  /** The location of the Docker image (DOCKER_HUB, ECR, GCR, ACR, CUSTOM, etc.) */
  image_location?: "PUBLIC_REGISTRY" | "PRIVATE_REGISTRY" | "ACTION" | "ARTIFACT_REGISTRY";
  /** The type of Docker registry */
  docker_registry?: "NONE" | "DOCKER_HUB" | "AMAZON_ECR" | "GOOGLE_GCR" | "GOOGLE_ARTIFACT_REGISTRY" | "OTHER" | "GIT_HUB_CONTAINER_REGISTRY" | "ARTIFACT_REGISTRY" | "DIGITAL_OCEAN_CONTAINER_REGISTRY";
  /** If set to `true`, uses the image built in a previous action */
  use_image_from_action?: boolean;
  /** The numerical ID of the Docker build action to use */
  docker_build_action_id?: number;
  /** The name of the Docker build action to use */
  docker_build_action_name?: string;
  /** The working directory for the service container */
  working_directory?: string;
  /** The list of volume mappings in the format `host_path:container_path` */
  volume_mappings?: string[];
  /** The entrypoint command for the container */
  entrypoint?: string;
  /** The commands to execute in the container on startup */
  inline_commands?: string;
  /** The region for cloud-based Docker registries (e.g., AWS ECR) */
  region?: string;
  /** The port number to wait for before marking the service as ready */
  wait_for_port?: number;
  /** The integration to use for authentication */
  integration?: IntegrationView;
  /** The list of directories to cache between executions */
  cached_dirs?: string[];
  /** If set to `true`, pipeline variables are passed to the service as environment variables */
  pass_variables?: boolean;
  /** The user to run the service container as */
  run_as_user?: string;
  /** If set to `true`, uses cached image when image pull fails or times out */
  ignore_image_pull_failures?: boolean;
  /** If set to `true`, caches the Docker image instead of pulling it on each execution */
  cache_base_image?: boolean;
}

interface ServiceConnectionView {
  /** The hostname or IP address of the service */
  host?: string;
  /** The port number of the service */
  port?: number;
  /** The username for service authentication */
  user?: string;
  /** The password for service authentication */
  password?: string;
  /** The database name to connect to */
  db?: string;
}

interface IntegrationView {
  /** API endpoint to GET this object */
  url?: string;
  /** Web URL to view this object in Buddy.works */
  html_url?: string;
  /** A human-readable ID of the integration */
  identifier?: string;
  /** The unique hash ID of the integration */
  hash_id?: string;
  /** The name of the integration */
  name?: string;
  /** The type of integration */
  type?: "GIT_HUB" | "BITBUCKET" | "GOOGLE" | "DIGITAL_OCEAN" | "SLACK" | "MODULUS" | "HEROKU" | "AMAZON" | "GIT_LAB" | "SHOPIFY" | "GIT_HUB_ENTERPRISE" | "GIT_LAB_ENTERPRISE" | "PUSHOVER" | "PUSHBULLET" | "RACKSPACE" | "CUSTOM" | "CLOUDFLARE" | "NEW_RELIC" | "SENTRY" | "ROLLBAR" | "DATADOG" | "DO_SPACES" | "HONEYBADGER" | "VULTR" | "SENTRY_ENTERPRISE" | "LOGGLY" | "HIP_CHAT" | "FIREBASE" | "TELEGRAM" | "AZURE" | "UPCLOUD" | "GHOST_INSPECTOR" | "NETLIFY" | "AZURE_CLOUD" | "MICROSOFT_TEAMS" | "GOOGLE_SERVICE_ACCOUNT" | "GOOGLE_PLAY_STORE" | "DOCKER_HUB" | "APP_STORE" | "GIT_HUB_APP" | "GIT_HUB_APP_ENTERPRISE" | "GIT_HUB_API" | "ATOP" | "SNYK" | "STACK_HAWK" | "BLACKFIRE" | "BACKBLAZE" | "ONE_LOGIN" | "OKTA" | "CONTENTFUL" | "JIRA" | "NPM_REGISTRY" | "ANTHROPIC";
  /** The authentication method used by the integration */
  auth_type?: "OAUTH" | "TOKEN" | "API_KEY" | "APP" | "APP_SPRYKER" | "TOKEN_APP_EXTENSION" | "DEFAULT" | "OIDC" | "TRUSTED" | "APP_RW";
  /** The scope of the integration */
  scope?: "WORKSPACE" | "PROJECT" | "ENVIRONMENT";
  /** The human-readable ID of the project (required when scope is `PROJECT`) */
  project_name?: string;
  /** The application ID for Azure Cloud integrations */
  app_id?: string;
  /** The Google Cloud project ID */
  google_project?: string;
  /** The host URL for custom integrations */
  host_url?: string;
  /** The webhook URL for receiving notifications */
  webhook_address?: string;
  /** The JWT audience for token validation */
  audience?: string;
  /** The ATOP service URL */
  atop_url?: string;
  /** Permission settings defining who can use this integration */
  permissions?: IntegrationPermissionsView;
  /** Set to `true` to allow all pipelines to use this integration */
  all_pipelines_allowed?: boolean;
  /** List of specific pipelines allowed to use this integration */
  allowed_pipelines?: ShortPipelineView[];
}

interface IntegrationPermissionsView {
  /** Access level for other workspace members */
  others?: "DENIED" | "READ_ONLY" | "USE_ONLY" | "BLIND" | "RUN_ONLY" | "READ_WRITE" | "MANAGE" | "DEFAULT" | "ALLOWED" | "STAGE" | "COMMIT";
  /** List of specific users with their access levels */
  users?: UserPermissionView[];
  /** List of user groups with their access levels */
  groups?: GroupPermissionView[];
  /** Access level for workspace administrators */
  admins?: "DENIED" | "READ_ONLY" | "USE_ONLY" | "BLIND" | "RUN_ONLY" | "READ_WRITE" | "MANAGE" | "DEFAULT" | "ALLOWED" | "STAGE" | "COMMIT";
}

interface UserPermissionView {
  /** The ID of the user */
  id?: number;
  /** The access level for the user */
  access_level?: "DENIED" | "READ_ONLY" | "USE_ONLY" | "BLIND" | "RUN_ONLY" | "READ_WRITE" | "MANAGE" | "DEFAULT" | "ALLOWED" | "STAGE" | "COMMIT";
}

interface GroupPermissionView {
  /** The ID of the group */
  id?: number;
  /** The access level for the group */
  access_level?: "DENIED" | "READ_ONLY" | "USE_ONLY" | "BLIND" | "RUN_ONLY" | "READ_WRITE" | "MANAGE" | "DEFAULT" | "ALLOWED" | "STAGE" | "COMMIT";
}

interface ShortPipelineView {
  /** API endpoint to GET this object */
  url?: string;
  /** Web URL to view this object in Buddy.works */
  html_url?: string;
  /** The unique identifier of the pipeline */
  id?: number;
  /** A human-readable ID of pipeline */
  identifier?: string;
  /** The name of the pipeline */
  name?: string;
  /** The source of the pipeline definition */
  definition_source?: "LOCAL" | "REMOTE";
  /** The git configuration reference type */
  git_config_ref?: "NONE" | "DYNAMIC" | "FIXED";
  /** Pipeline git context refs. If unset and events is empty, the pipeline counts as codeless */
  refs?: string[];
  /** The list of events that trigger the pipeline run */
  events?: PipelineEventView[];
  /** The loop configuration for the pipeline */
  loop?: string[];
  /** The priority of the pipeline */
  priority?: "LOW" | "NORMAL" | "HIGH";
  /** Indicates if the pipeline is disabled */
  disabled?: boolean;
  /** The reason why the pipeline is disabled */
  disabled_reason?: string;
  /** The status of the last run */
  last_execution_status?: "INPROGRESS" | "ENQUEUED" | "TERMINATED" | "SUCCESSFUL" | "FAILED" | "INITIAL" | "NOT_EXECUTED" | "SKIPPED" | "TERMINATING" | "WAITING_FOR_APPLY" | "WAITING_FOR_VARIABLES" | "WAITING_FOR_SETTABLE_VARIABLES" | "WAITING_FOR_VT_SESSION";
  /** The git revision of the last run */
  last_execution_revision?: string;
  /** The URL to the target site after deployment */
  target_site_url?: string;
  /** The template for commit status messages */
  execution_message_template?: string;
  /** The creation date of the pipeline */
  create_date?: string;
  /** Defines whether to upload everything from scratch on every run */
  always_from_scratch?: boolean;
  /** If set to true, the status of a given pipeline will not impact the project status on the dashboard */
  ignore_fail_on_project_status?: boolean;
  /** If set to true, the pipeline will not skip queued runs to execute the most recent one */
  no_skip_to_most_recent?: boolean;
  /** If set to true, stale runs will be automatically terminated */
  terminate_stale_runs?: boolean;
  /** Defines whether to automatically clear cache before running the pipeline */
  auto_clear_cache?: boolean;
  /** Indicates if the pipeline is paused */
  paused?: boolean;
  /** Defines how many repeated failures are required to pause the pipeline */
  pause_on_repeated_failures?: number;
  /** If set to true, all refs will be fetched from the repository */
  fetch_all_refs?: boolean;
  /** If set to true, LFS files will be fetched from the external repository during pipeline runs */
  fetch_lfs?: boolean;
  /** If set to true, the pipeline will fail on environment preparation warnings */
  fail_on_prepare_env_warning?: boolean;
  /** Defines whether the pipeline can be run concurrently */
  concurrent_pipeline_runs?: boolean;
  /** Defines the depth of the git clone operation for shallow clones */
  clone_depth?: number;
  /** If set to true, commit statuses will not be created in the repository */
  do_not_create_commit_status?: boolean;
  /** Indicates that pipeline definition was probably removed on particular Git ref and pipeline won't be run on events */
  stale?: boolean;
  /** Indicates if the pipeline is waiting for the first push to the repository */
  waiting_for_push?: boolean;
  /** The resource configuration for the pipeline run */
  resources?: "DEFAULT" | "NANO" | "SMALL" | "MEDIUM" | "LARGE" | "XLARGE" | "CUSTOM" | "X2LARGE";
  /** The path to the remote pipeline definition file */
  remote_path?: string;
  /** The ref of the remote pipeline definition */
  remote_ref?: string;
  /** The project name of the remote pipeline definition */
  remote_project_name?: string;
  /** The parameters passed to the remote pipeline definition */
  remote_parameters?: PipelinePropertyView[];
  /** YAML pipeline definition configuration */
  git_config?: YamlDefinitionView;
  /** The list of tags associated with the pipeline for organization */
  tags?: string[];
  /** The base for git changeset calculation. Determines which changes trigger the pipeline */
  git_changeset_base?: "LATEST_RUN" | "LATEST_RUN_MATCHING_REF" | "PULL_REQUEST";
  /** The base for filesystem changeset calculation. Determines which file changes trigger the pipeline */
  filesystem_changeset_base?: "DATE_MODIFIED" | "CONTENTS";
  /** The CPU architecture for the pipeline run */
  cpu?: "X64" | "ARM" | "X86";
  /** If set to true, a description is required when executing the pipeline manually */
  description_required?: boolean;
  /** The folder name where the pipeline is organized */
  folder?: string;
}

interface PipelineEventView {
  /** The type of event that triggers the pipeline */
  type?: "PUSH" | "CREATE_REF" | "DELETE_REF" | "PULL_REQUEST" | "SCHEDULE" | "PUBLISH_ARTIFACT_VERSION" | "DELETE_ARTIFACT_VERSION" | "WEBHOOK" | "EMAIL" | "CREATE_ARTIFACT_VERSION" | "ENVIRONMENT_CREATE" | "ENVIRONMENT_DELETE" | "SANDBOX_CREATED" | "SANDBOX_DELETED" | "SANDBOX_TIMED_OUT";
  /** The list of refs (branches/tags) that trigger the pipeline for push/ref events */
  refs?: string[];
  /** The list of pull request events that trigger the pipeline. Examples: `OPENED`, `EDITED`, `CLOSED`, `LABELED`, `UNLABELED`, `REVIEW_REQUESTED`, `REVIEW_REQUESTED_REMOVED`, `SYNCHRONIZED` */
  events?: string[];
  /** The list of branches for pull request events */
  branches?: string[];
  /** The list of artifacts that trigger the pipeline */
  artifacts?: PipelineArtifactContextView[];
  /** The list of environments that trigger the pipeline */
  environments?: PipelineEnvironmentContextView[];
  /** The start date for scheduled events (type `SCHEDULE`) */
  start_date?: string;
  /** The delay in minutes between scheduled runs (type `SCHEDULE`) */
  delay?: number;
  /** The cron expression for scheduled (type `SCHEDULE`) events e.g., '0 9 * * 1-5' for weekdays at 9 AM */
  cron?: string;
  /** The timezone for scheduled events (type `SCHEDULE`) e.g., 'UTC', 'Europe/Warsaw' */
  timezone?: string;
  /** Whether TOTP (Time-based One-Time Password) is enabled for webhook events (type `WEBHOOK`) */
  totp?: boolean;
  /** The email subject prefix for email trigger events (type `EMAIL`) */
  prefix?: string;
  /** The list of allowed email addresses that can trigger the pipeline via email (type `EMAIL`) */
  whitelist?: string[];
  /** The list of sandbox targets that trigger the pipeline for sandbox events (type `SANDBOX_CREATED`, `SANDBOX_DELETED`, `SANDBOX_TIMED_OUT`) */
  targets?: TargetView[];
}

interface PipelineArtifactContextView {
  /** A human-readable ID of artifact */
  identifier?: string;
  /** The scope of the artifact */
  scope?: "WORKSPACE" | "PROJECT" | "ENVIRONMENT" | "ANY";
}

interface PipelineEnvironmentContextView {
  /** A human-readable ID of the environment. Alphanumeric characters, underscores, and hyphens (hyphens cannot appear at the start or end). */
  identifier?: string;
  /** The list of tags associated with the environment */
  tags?: string[];
  /** The scope of the environment */
  scope?: "PROJECT" | "WORKSPACE" | "ANY";
}

interface TargetView {
  /** API endpoint to GET this object */
  url?: string;
  /** Web URL to view this object in Buddy.works */
  html_url?: string;
  /** The ID of the target */
  id?: string;
  /** A human-readable ID.  Alphanumeric characters, underscores, and hyphens (hyphens cannot appear at the start or end). */
  identifier: string;
  /** The name of the target */
  name?: string;
  /** Short representation of a project */
  project?: ShortProjectView;
  /** Short representation of a pipeline */
  pipeline?: ShortPipelineView;
  /** Short representation of an environment object */
  environment?: ShortEnvironmentView;
  /** Access permissions configuration */
  permissions?: PermissionsView;
  /** Pipelines access level for this target */
  pipelines_access_level?: "DENIED" | "READ_ONLY" | "USE_ONLY" | "BLIND" | "RUN_ONLY" | "READ_WRITE" | "MANAGE" | "DEFAULT" | "ALLOWED" | "STAGE" | "COMMIT";
  /** List of specific pipelines allowed to use this target */
  allowed_pipelines?: AllowedPipelineView[];
  /** Sandboxes access level for this target */
  sandboxes_access_level?: "DENIED" | "READ_ONLY" | "USE_ONLY" | "BLIND" | "RUN_ONLY" | "READ_WRITE" | "MANAGE" | "DEFAULT" | "ALLOWED" | "STAGE" | "COMMIT";
  /** List of specific sandboxes allowed to use this target */
  allowed_sandboxes?: AllowedSandboxView[];
  /** Indicates if this target is disabled (default: `false`) */
  disabled?: boolean;
  /** The list of tags associated with the target */
  tags?: string[];
  /** Defines how the target can be used (as deployment target, proxy, or both) */
  use_as?: UseAsView;
  /** The type of the target */
  type?: "MYSQL";
}

interface ShortProjectView {
  /** API endpoint to GET this object */
  url?: string;
  /** Web URL to view this object in Buddy.works */
  html_url?: string;
  /** The human-readable ID of the project */
  name?: string;
  /** The Name of the project */
  display_name: string;
  /** The status of the project */
  status?: string;
  /** Indicates if this is a public project */
  access?: "PRIVATE" | "PUBLIC";
  /** The creation date of the project */
  create_date?: string;
}

interface ShortEnvironmentView {
  /** API endpoint to GET this object */
  url?: string;
  /** Web URL to view this object in Buddy.works */
  html_url?: string;
  /** The name of the environment */
  name?: string;
  /** The human-readable identifier of the environment */
  identifier?: string;
  /** The ID of the environment */
  id?: number;
  /** The scope level of the environment */
  scope?: "PROJECT" | "WORKSPACE" | "ANY";
}

interface PermissionsView {
  /** Access level for other workspace members */
  others?: "DENIED" | "READ_ONLY" | "USE_ONLY" | "BLIND" | "RUN_ONLY" | "READ_WRITE" | "MANAGE" | "DEFAULT" | "ALLOWED" | "STAGE" | "COMMIT";
  /** List of specific users with their access levels */
  users?: UserPermissionView[];
  /** List of user groups with their access levels */
  groups?: GroupPermissionView[];
}

interface AllowedPipelineView {
  /** Project name */
  project: string;
  /** Pipeline identifier */
  pipeline: string;
  /** Access level for the allowed pipeline. Project repository targets: `DENIED`, `READ_ONLY`, `READ_WRITE`. Other targets: `DENIED`, `USE_ONLY` */
  access_level?: "DENIED" | "READ_ONLY" | "USE_ONLY" | "BLIND" | "RUN_ONLY" | "READ_WRITE" | "MANAGE" | "DEFAULT" | "ALLOWED" | "STAGE" | "COMMIT";
}

interface AllowedSandboxView {
  /** Project name */
  project: string;
  /** Sandbox identifier */
  sandbox: string;
  /** Access level for the allowed sandbox: `DENIED`, `READ_ONLY`, `READ_WRITE` */
  access_level?: "DENIED" | "READ_ONLY" | "USE_ONLY" | "BLIND" | "RUN_ONLY" | "READ_WRITE" | "MANAGE" | "DEFAULT" | "ALLOWED" | "STAGE" | "COMMIT";
}

interface UseAsView {
  /** Whether the target can be used as a deployment target (default: `true`) */
  target?: boolean;
  /** Whether the target can be used as a proxy (default: `true`) */
  proxy?: boolean;
}

interface PipelinePropertyView {
  /** The key of the pipeline property */
  key?: string;
  /** The value of the pipeline property */
  value?: string;
}

interface YamlDefinitionView {
  /** The file path to the YAML definition */
  path?: string;
  /** The git ref (branch/tag) where the YAML definition is located */
  branch?: string;
  /** The project name where the YAML definition is located */
  project?: string;
}

interface DockerIntegrationRef {
  /** A human-readable ID of the integration */
  identifier?: string;
}

interface LlmBuildPromptView {
  /** The prompt type: `INLINE` or `FILE`. */
  type?: string;
  /** The prompt content (inline text) or file path. */
  value?: string;
}

interface ClaudeCodeSettingsView {
  /** The settings type: `INLINE` or `FILE`. */
  type?: string;
  /** The settings content (inline JSON) or file path. */
  value?: string;
}

interface IntegrationIdentifierView {
  /** A human-readable ID of the integration */
  identifier?: string;
}

```

## Request Example

```bash
curl -X POST "https://api.buddy.works/workspaces/:workspace/projects/:project_name/pipelines/:pipeline_id/actions" \
  -H "Authorization: Bearer <YOUR-TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "Claude Code",
  "type": "CLAUDE_CODE",
  "trigger_time": "ON_EVERY_EXECUTION",
  "prompts": [
    {
      "type": "INLINE",
      "value": "Review the code changes and suggest improvements"
    }
  ],
  "model": "sonnet",
  "settings": {
    "type": "INLINE",
    "value": "{\"max_turns\": 10}"
  },
  "claude_args": "--max-turns 5",
  "integration": {
    "hash_id": "my_anthropic_integration"
  },
  "dangerously_skip_permissions": true
}'
```

## Response Example

**Status:** `200 OK`


---
Original source: https://buddy.works/docs/api/actions/add/claude-code