# Codemagic

Codemagic is a CI/CD platform focused on mobile app development.

- **Category:** developer tools
- **Auth:** API_KEY
- **Composio Managed App Available?** N/A
- **Tools:** 23
- **Triggers:** 0
- **Slug:** `CODEMAGIC`
- **Version:** 20260312_00

## Tools

### Add Application from Private Repository

**Slug:** `CODEMAGIC_ADD_APPLICATION_FROM_PRIVATE_REPO`

Tool to create an application from a private repository using SSH key authentication. Use when you need to add a new private repository to Codemagic with SSH credentials.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `sshKey` | object | Yes | SSH key credentials required to access the private repository. |
| `teamId` | string | No | Team ID for direct app addition to a team. Requires admin privileges for the specified team. |
| `projectType` | string | No | Specify 'flutter-app' when adding Flutter applications. Omit for other project types. |
| `repositoryUrl` | string | Yes | SSH or HTTPS URL for cloning the private repository. For SSH URLs, use format: git@github.com:org/repo.git |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Add New Application

**Slug:** `CODEMAGIC_ADD_NEW_APPLICATION`

Tool to add a Git repository to the applications list in Codemagic. Use when you need to add a new application to Codemagic from a repository URL.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `teamId` | string | No | Team ID, if you wish to add an app directly to one of your teams. You must be an admin in the team specified. |
| `repositoryUrl` | string | Yes | SSH or HTTPS URL for cloning the repository. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Meta Information

**Slug:** `CODEMAGIC_API_V3_META_GET_META`

Tool to get metadata about Codemagic including public IP addresses in use (in CIDR notation). Use when you need to retrieve IP blocks for whitelisting build machines or simulator network requests.

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Variable Group Information

**Slug:** `CODEMAGIC_API_V3_VARIABLE_GROUPS_VARIABLE_GROUP_ID_GET_GROUP`

Tool to retrieve information about a specific variable group including its name and configuration settings. Use when you need to get details for a variable group by its ID.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `variable_group_id` | string | Yes | The unique identifier for the variable group in MongoDB ObjectId format. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Update Variable Group

**Slug:** `CODEMAGIC_API_V3_VARIABLE_GROUPS_VARIABLE_GROUP_ID_UPDATE`

Tool to change a variable group's name and security settings. Use when you need to update an existing variable group by its ID. Returns success confirmation on 204 No Content response.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `name` | string | No | The new name for the variable group. |
| `advanced_security` | object | No | Advanced security configuration for a variable group. |
| `variable_group_id` | string | Yes | The unique identifier for the variable group in MongoDB ObjectId format. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Delete All Application Caches

**Slug:** `CODEMAGIC_DELETE_ALL_APPLICATION_CACHES`

Tool to delete all caches for a specific application. Use when clearing all cached data for an app. The deletion process is asynchronous and will complete after the API response is returned.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The application identifier |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Delete Specific Cache

**Slug:** `CODEMAGIC_DELETE_SPECIFIC_CACHE`

Tool to delete a specific cache from an application. Use when a cached build artifact needs to be removed. The deletion is performed asynchronously and returns immediately with a 202 Accepted status.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `app_id` | string | Yes | The application identifier |
| `cache_id` | string | Yes | The cache identifier to delete |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get All Builds

**Slug:** `CODEMAGIC_GET_ALL_BUILDS`

Tool to list all builds with optional filters for appId, workflowId, and branch. Use when you need to retrieve build history or search for specific builds. Supports pagination via the skip parameter.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `skip` | integer | No | Pagination offset for skipping results |
| `app_id` | string | No | Filter builds by application ID |
| `branch` | string | No | Filter builds by git branch name |
| `workflow_id` | string | No | Filter builds by workflow ID. May return null for YAML-based workflows. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get User API Key

**Slug:** `CODEMAGIC_GET_API_KEY`

Tool to retrieve the API key for the authenticated user from the server. Use when you need to fetch the API key via the Codemagic API.

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Shorebird Meta

**Slug:** `CODEMAGIC_GET_SHOREBIRD_META`

Tool to retrieve information about Shorebird integration. Use when you need to check supported Flutter versions or the current Shorebird version.

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get Authenticated User

**Slug:** `CODEMAGIC_GET_USER`

Tool to retrieve information about the currently authenticated user. Use when you need to get user ID, avatar URL, or check user permissions.

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List Variable Groups for App

**Slug:** `CODEMAGIC_GET_VARIABLE_GROUPS`

Tool to retrieve paginated list of variable groups for an application. Use when you need to list or browse variable groups associated with a specific app.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `page` | integer | No | The page number of the results to fetch. Minimum: 1, Default: 1. |
| `app_id` | string | Yes | The unique identifier for the application. |
| `page_size` | integer | No | The maximum number of results per page. Range: 1-100, Default: 30. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List Variables for Group

**Slug:** `CODEMAGIC_GET_VARIABLES`

Tool to retrieve paginated list of variables for a specific variable group. Use when you need to list or browse environment variables within a variable group.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `page` | integer | No | The page number of the results to fetch. Minimum: 1, Default: 1. |
| `search` | string | No | Search query to filter variables. |
| `page_size` | integer | No | The maximum number of results per page. Range: 1-100, Default: 30. |
| `variable_group_id` | string | Yes | The identifier for the variable group. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Invite Team Member

**Slug:** `CODEMAGIC_INVITE_TEAM_MEMBER`

Tool to invite a new team member to a Codemagic team. Use when you need to grant team access to a user. Requires team admin privileges. The 'developer' role corresponds to Member role and 'owner' role corresponds to Admin role in Codemagic UI.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `role` | string ("developer" | "owner") | Yes | The role to assign to the invited user. 'developer' corresponds to Member role in UI, 'owner' corresponds to Admin role in UI |
| `email` | string | Yes | The email address of the user to invite |
| `team_id` | string | Yes | The unique identifier of the team to invite the member to |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Receive Webhook

**Slug:** `CODEMAGIC_RECEIVE_WEBHOOK`

Tool to receive webhook payloads from Git providers to trigger builds automatically. Use when repository events (commits, pull requests, tags) need to trigger Codemagic builds programmatically.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `ref` | string | Yes | Git reference (branch or tag) that triggered the webhook. Format: refs/heads/{branch} or refs/tags/{tag} |
| `app_id` | string | Yes | The application identifier for which to trigger the webhook. Found in the Codemagic browser URL after 'app/' when viewing your application. |
| `pusher` | object | Yes | Information about the user who triggered the webhook |
| `repository` | object | Yes | Repository information containing the clone URL |
| `additional_payload` | object | No | Additional webhook payload data from the Git provider. This can contain provider-specific fields like commits, pull_request, etc. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Remove Team Member

**Slug:** `CODEMAGIC_REMOVE_TEAM_MEMBER`

Tool to remove a collaborator or revoke a pending invitation from a Codemagic team. Use when you need to revoke team access for a specific user or cancel a pending invitation. Supports both active members (MongoDB-style IDs) and pending invitations (UUID-style invitation codes).

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `team_id` | string | Yes | The unique identifier of the team |
| `user_id` | string | Yes | The unique identifier of the user/collaborator to be removed, or the invitation code for pending invitations. Active members have MongoDB-style IDs (24 hex characters), while pending invitations have UUID-style IDs. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Retrieve All Applications

**Slug:** `CODEMAGIC_RETRIEVE_ALL_APPLICATIONS`

Tool to retrieve all applications added to Codemagic. Use when you need to list or browse all applications in the Codemagic account.

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Retrieve an Application

**Slug:** `CODEMAGIC_RETRIEVE_AN_APPLICATION`

Tool to retrieve a single application by its unique identifier. Use when you need to get application details including name, branches, and workflow configuration.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The unique identifier for the application. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Retrieve Caches for Application

**Slug:** `CODEMAGIC_RETRIEVE_CACHES_FOR_APPLICATION`

Tool to retrieve a list of caches for a specific application. Use when you need to view cached data, check cache sizes, or manage application storage.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The application identifier - unique ID of the application whose caches you want to retrieve |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Start New Build

**Slug:** `CODEMAGIC_START_NEW_BUILD`

Tool to start a new build for an application with specified workflow and branch or tag. Use when you need to trigger a build programmatically. Either branch or tag parameter must be provided.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `tag` | string | No | Git tag name to build. Either branch or tag must be provided. |
| `app_id` | string | Yes | The application identifier |
| `branch` | string | No | Git branch name to build. Either branch or tag must be provided. |
| `labels` | array | No | Additional labels to attach to the build |
| `environment` | object | No | Overrides for environment variables, variable groups, and software versions |
| `workflow_id` | string | Yes | The workflow identifier as specified in the YAML file |
| `instance_type` | string | No | Machine type for build execution |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Stop Preview

**Slug:** `CODEMAGIC_STOP_PREVIEW`

Tool to stop an app preview. Use when you need to stop a running app preview by its identifier.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `preview_id` | string | Yes | The preview identifier to stop |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Update Variable in Group

**Slug:** `CODEMAGIC_UPDATE_VARIABLE`

Tool to update an existing variable within a specified variable group in Codemagic. Use when you need to modify a variable's name, value, or secure status.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `name` | string | No | The variable's name. Provide this if you want to update the variable name. |
| `value` | string | No | The variable's value. Provide this if you want to update the variable value. |
| `secure` | boolean | No | Whether the variable should be treated as secure (encrypted). Provide this if you want to change the secure status. |
| `variable_id` | string | Yes | The identifier for the variable to be updated. |
| `variable_group_id` | string | Yes | The identifier for the variable group containing the variable. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |
