Codemagic

Learn how to use Codemagic with Composio

Overview

SLUG: CODEMAGIC

Description

A mobile-first CI/CD.

Authentication Details

generic_api_key
stringRequired

Connecting to Codemagic

Create an auth config

Use the dashboard to create an auth config for the Codemagic toolkit. This allows you to connect multiple Codemagic accounts to Composio for agents to use.

1

Select App

Navigate to Codemagic.

2

Configure Auth Config Settings

Select among the supported auth schemes of and configure them here.

3

Create and Get auth config ID

Click “Create Codemagic Auth Config”. After creation, copy the displayed ID starting with ac_. This is your auth config ID. This is not a sensitive ID — you can save it in environment variables or a database. This ID will be used to create connections to the toolkit for a given user.

Connect Your Account

Using API Key

1from composio import Composio
2
3# Replace these with your actual values
4codemagic_auth_config_id = "ac_YOUR_CODEMAGIC_CONFIG_ID" # Auth config ID created above
5user_id = "0000-0000-0000" # UUID from database/app
6
7composio = Composio()
8
9def authenticate_toolkit(user_id: str, auth_config_id: str):
10 # Replace this with a method to retrieve an API key from the user.
11 # Or supply your own.
12 user_api_key = input("[!] Enter API key")
13
14 connection_request = composio.connected_accounts.initiate(
15 user_id=user_id,
16 auth_config_id=auth_config_id,
17 config={"auth_scheme": "API_KEY", "val": {"generic_api_key": user_api_key}}
18 )
19
20 # API Key authentication is immediate - no redirect needed
21 print(f"Successfully connected Codemagic for user {user_id}")
22 print(f"Connection status: {connection_request.status}")
23
24 return connection_request.id
25
26
27connection_id = authenticate_toolkit(user_id, codemagic_auth_config_id)
28
29# You can verify the connection using:
30connected_account = composio.connected_accounts.get(connection_id)
31print(f"Connected account: {connected_account}")

Tools

Executing tools

To prototype you can execute some tools to see the responses and working on the Codemagic toolkit’s playground

For code examples, see the Tool calling guide and Provider examples.

Tool List

Tool Name: Add Application from Private Repository

Description

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.

Action Parameters

projectType
string
repositoryUrl
stringRequired
sshKey
objectRequired
teamId
string

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Add New Application

Description

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.

Action Parameters

repositoryUrl
stringRequired
teamId
string

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get Meta Information

Description

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.

Action Parameters

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get Variable Group Information

Description

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.

Action Parameters

variable_group_id
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Update Variable Group

Description

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.

Action Parameters

advanced_security
object
name
string
variable_group_id
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Delete All Application Caches

Description

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.

Action Parameters

id
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Delete Specific Cache

Description

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.

Action Parameters

app_id
stringRequired
cache_id
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get Account Info for Over-the-Air Updates

Description

Tool to retrieve account information for over-the-air updates. Use when you need to check the account status (enabled/disabled/pending) and associated team identifier.

Action Parameters

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get All Builds

Description

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.

Action Parameters

app_id
string
branch
string
skip
integer
workflow_id
string

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get API Key

Description

Tool to retrieve the API key for the authenticated user. Use when you need to fetch the API key associated with the current authentication token.

Action Parameters

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get Authenticated User

Description

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

Action Parameters

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: List Variable Groups for App

Description

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.

Action Parameters

app_id
stringRequired
page
integer
page_size
integer

Action Response

current_page
integerRequired
data
arrayRequired
error
string
page_size
integerRequired
successful
booleanRequired
total_pages
integerRequired

Tool Name: List Variables for Group

Description

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.

Action Parameters

page
integer
page_size
integer
search
string
variable_group_id
stringRequired

Action Response

current_page
integerRequired
data
arrayRequired
error
string
page_size
integerRequired
successful
booleanRequired
total_pages
integerRequired

Tool Name: Invite Team Member

Description

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.

Action Parameters

email
stringRequired
role
stringRequired
team_id
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: List Team Apps

Description

Tool to list all apps for a specific team in Codemagic. Use when you need to browse or retrieve team application information. Supports pagination via page and page_size parameters.

Action Parameters

page
integer
page_size
integer
team_id
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Receive Webhook

Description

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.

Action Parameters

additional_payload
object
app_id
stringRequired
pusher
objectRequired
ref
stringRequired
repository
objectRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Remove Team Member

Description

Tool to remove a collaborator from a Codemagic team. Use when you need to revoke team access for a specific user. The removal is performed asynchronously and returns immediately with a 202 Accepted status.

Action Parameters

team_id
stringRequired
user_id
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Retrieve All Applications

Description

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

Action Parameters

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Retrieve an Application

Description

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

Action Parameters

id
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Retrieve Caches for Application

Description

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.

Action Parameters

id
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Start New Build

Description

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.

Action Parameters

app_id
stringRequired
branch
string
environment
object
instance_type
string
labels
array
tag
string
workflow_id
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Stop Preview

Description

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

Action Parameters

preview_id
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Update Variable in Group

Description

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.

Action Parameters

name
string
secure
boolean
value
string
variable_group_id
stringRequired
variable_id
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired