OpenAPI Specification
openapi: 3.1.0
info:
title: Codemagic App Previews Teams API
version: v3.0
description: "\n# ℹ️ Overview\n\nWelcome to the Codemagic REST API. This API allows you to programmatically interact with [Codemagic's CI/CD](https://codemagic.io/) platform\nto manage your apps, trigger builds, access artifacts, and more.\n\n### Authentication\n\nAll API requests require authentication using a personal API token that is unique to each Codemagic user. The actions permitted by the token are determined by the user’s role within the team.\n\nYou can find your API token by navigating to **Teams > Personal Account > Integrations > Codemagic API > Show**.\n\nInclude your token in the request header:\n\n```\nx-auth-token: <your-api-token>\n```\n\n### Getting started\n\n1. Generate your API token from the Codemagic dashboard\n2. Explore the available endpoints in the sidebar\n3. Try out requests directly from this documentation\n\n### Rate limits\n\nCodemagic limits the number of API requests you can make within a specific amount of time to ensure the API remains\navailable for all users. Your personal rate limit is **5,000 requests per hour**.\n\nIf you exceed your rate limit, you will receive a `429` response, and the `ratelimit-remaining` header will be `0`.\nYou should not retry your request until after the time specified by the `ratelimit-reset` header.\n\n#### Checking the status of your rate limit\n\nYou can use the headers that are sent with each response to determine the current status of your rate limit.\n\n| **Header** | **Description** |\n| --- | --- |\n| ratelimit-limit | The maximum number of requests that you can make per hour. |\n| ratelimit-remaining | The number of requests remaining in the current rate limit window. |\n| ratelimit-reset | The number of seconds remaining until the current rate limit window resets. |\n\n### Help and support\n\n- Ask our [GitHub community](https://github.com/codemagic-ci-cd/codemagic-docs/discussions).\n- Our paying customers can get in touch with us via the in-app chat widget.\n You have to be logged in to see the chat icon (note that some ad blockers may block the chat widget).\n\n---\n© Nevercode Ltd. | All Rights Reserved | Codemagic is registered trademark of Nevercode Ltd. | [Terms](https://codemagic.io/terms)\n"
servers:
- url: https://codemagic.io/
x-internal: false
security:
- api_key: []
tags:
- name: Teams
description: REST API endpoints for teams.
external_docs: null
paths:
/api/v3/subscriptions/{team_id}/features:
patch:
tags:
- Teams
summary: Update subscription features for the team
operationId: ApiV3SubscriptionsTeamIdFeaturesUpdateFeatures
parameters:
- name: team_id
in: path
schema:
type: string
required: true
deprecated: false
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/FeaturesSchema'
required: true
responses:
'204':
description: Request fulfilled, nothing follows
headers: {}
'400':
description: Bad request syntax or unsupported method
content:
application/json:
schema:
properties:
status_code:
type: integer
detail:
type: string
extra:
additionalProperties: {}
type:
- 'null'
- object
- array
type: object
required:
- detail
- status_code
description: Validation Exception
examples:
- status_code: 400
detail: Bad Request
extra: {}
deprecated: false
/api/v3/user/teams:
get:
tags:
- Teams
summary: List teams for the authenticated user
operationId: ApiV3UserTeamsGetTeams
parameters:
- name: page_size
in: query
schema:
type: integer
maximum: 100.0
minimum: 1.0
description: The maximum number of results per page.
default: 30
description: The maximum number of results per page.
required: false
deprecated: false
allowEmptyValue: false
allowReserved: false
- name: page
in: query
schema:
type: integer
minimum: 1.0
description: The page number of the results to fetch.
default: 1
description: The page number of the results to fetch.
required: false
deprecated: false
allowEmptyValue: false
allowReserved: false
responses:
'200':
description: Request fulfilled, document follows
headers: {}
content:
application/json:
schema:
$ref: '#/components/schemas/ClassicPagination_api.routes.user.schemas.TeamSchema_'
'400':
description: Bad request syntax or unsupported method
content:
application/json:
schema:
properties:
status_code:
type: integer
detail:
type: string
extra:
additionalProperties: {}
type:
- 'null'
- object
- array
type: object
required:
- detail
- status_code
description: Validation Exception
examples:
- status_code: 400
detail: Bad Request
extra: {}
deprecated: false
/api/v3/teams/{team_id}:
get:
tags:
- Teams
summary: Get team info
operationId: ApiV3TeamsTeamIdGetTeam
parameters:
- name: team_id
in: path
schema:
type: string
required: true
deprecated: false
responses:
'200':
description: Request fulfilled, document follows
headers: {}
content:
application/json:
schema:
$ref: '#/components/schemas/NoPagination_api.routes.team.schemas.TeamSchema_'
'400':
description: Bad request syntax or unsupported method
content:
application/json:
schema:
properties:
status_code:
type: integer
detail:
type: string
extra:
additionalProperties: {}
type:
- 'null'
- object
- array
type: object
required:
- detail
- status_code
description: Validation Exception
examples:
- status_code: 400
detail: Bad Request
extra: {}
deprecated: false
/api/v3/teams/{team_id}/audit-log:
get:
tags:
- Teams
summary: Download team audit log as CSV
description: 'Returns a CSV file that contains the audit log events.
### Event List
- `app_created`
- `app_deleted`
- `audit_log_connector_deleted`
- `audit_log_connector_updated`
- `audit_log_downloaded`
- `file_downloaded`
- `team_deleted`
- `team_invitation_accepted`
- `team_invitation_revoked`
- `team_member_invited`
- `team_member_removed`
- `team_member_role_changed`
- `user_authenticated`
'
operationId: ApiV3TeamsTeamIdAuditLogDownloadAuditLog
parameters:
- name: team_id
in: path
schema:
type: string
required: true
deprecated: false
responses:
'200':
description: Stream Response
headers: {}
content:
text/csv:
schema: {}
'400':
description: Bad request syntax or unsupported method
content:
application/json:
schema:
properties:
status_code:
type: integer
detail:
type: string
extra:
additionalProperties: {}
type:
- 'null'
- object
- array
type: object
required:
- detail
- status_code
description: Validation Exception
examples:
- status_code: 400
detail: Bad Request
extra: {}
deprecated: false
/api/v3/teams/{team_id}/audit-log-connector:
get:
tags:
- Teams
summary: Get Audit Log Connector settings for the team
operationId: ApiV3TeamsTeamIdAuditLogConnectorGetAuditLogConnector
parameters:
- name: team_id
in: path
schema:
type: string
examples:
- 60a0b1c2d3e4f56789abcdef
required: true
deprecated: false
responses:
'200':
description: Request fulfilled, document follows
headers: {}
content:
application/json:
schema:
$ref: '#/components/schemas/NoPagination_api.routes.team_audit_log_connector.schemas.AuditLogConnectorSchema_'
'400':
description: Bad request syntax or unsupported method
content:
application/json:
schema:
properties:
status_code:
type: integer
detail:
type: string
extra:
additionalProperties: {}
type:
- 'null'
- object
- array
type: object
required:
- detail
- status_code
description: Validation Exception
examples:
- status_code: 400
detail: Bad Request
extra: {}
deprecated: false
put:
tags:
- Teams
summary: Update Audit Log Connector settings for the team
operationId: ApiV3TeamsTeamIdAuditLogConnectorUpdateAuditLogConnector
parameters:
- name: team_id
in: path
schema:
type: string
examples:
- 60a0b1c2d3e4f56789abcdef
required: true
deprecated: false
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/UpdateAuditLogConnector'
required: true
responses:
'200':
description: Request fulfilled, document follows
headers: {}
content:
application/json:
schema:
$ref: '#/components/schemas/NoPagination_api.routes.team_audit_log_connector.schemas.AuditLogConnectorSchema_'
'400':
description: Bad request syntax or unsupported method
content:
application/json:
schema:
properties:
status_code:
type: integer
detail:
type: string
extra:
additionalProperties: {}
type:
- 'null'
- object
- array
type: object
required:
- detail
- status_code
description: Validation Exception
examples:
- status_code: 400
detail: Bad Request
extra: {}
deprecated: false
delete:
tags:
- Teams
summary: Delete Audit Log Connector settings for the team
operationId: ApiV3TeamsTeamIdAuditLogConnectorDeleteAuditLogConnector
parameters:
- name: team_id
in: path
schema:
type: string
examples:
- 60a0b1c2d3e4f56789abcdef
required: true
deprecated: false
responses:
'204':
description: Request fulfilled, nothing follows
headers: {}
'400':
description: Bad request syntax or unsupported method
content:
application/json:
schema:
properties:
status_code:
type: integer
detail:
type: string
extra:
additionalProperties: {}
type:
- 'null'
- object
- array
type: object
required:
- detail
- status_code
description: Validation Exception
examples:
- status_code: 400
detail: Bad Request
extra: {}
deprecated: false
components:
schemas:
ClassicPagination_api.routes.user.schemas.TeamSchema_:
properties:
data:
items:
$ref: '#/components/schemas/user_schemas_TeamSchema'
type: array
page_size:
type: integer
current_page:
type: integer
total_pages:
type: integer
type: object
required:
- current_page
- data
- page_size
- total_pages
title: ClassicPagination[TeamSchema]
UpdateAuditLogConnector:
properties:
aws_bucket_name:
type: string
maxLength: 63
minLength: 3
aws_access_key_id:
type: string
maxLength: 128
minLength: 16
aws_secret_key:
type: string
maxLength: 128
minLength: 16
type: object
required:
- aws_access_key_id
- aws_bucket_name
- aws_secret_key
title: UpdateAuditLogConnector
NoPagination_api.routes.team_audit_log_connector.schemas.AuditLogConnectorSchema_:
properties:
data:
$ref: '#/components/schemas/AuditLogConnectorSchema'
type: object
required:
- data
title: NoPagination[AuditLogConnectorSchema]
user_schemas_TeamSchema:
properties:
id:
type: string
examples:
- 60a0b1c2d3e4f56789abcdef
name:
type: string
icon_url:
oneOf:
- type: string
- type: 'null'
type: object
required:
- id
- name
title: TeamSchema
FeaturesSchema:
properties:
app_preview:
oneOf:
- type: boolean
- type: 'null'
type: object
required: []
title: FeaturesSchema
team_schemas_TeamSchema:
properties:
name:
type: string
icon_url:
oneOf:
- type: string
- type: 'null'
created_at:
type: string
format: date-time
type: object
required:
- created_at
- name
title: TeamSchema
AuditLogConnectorSchema:
properties:
enabled:
type: boolean
aws_bucket_name:
oneOf:
- type: string
- type: 'null'
aws_access_key_id:
oneOf:
- type: string
- type: 'null'
last_sync_result:
oneOf:
- type: string
- type: 'null'
type: object
required:
- enabled
title: AuditLogConnectorSchema
NoPagination_api.routes.team.schemas.TeamSchema_:
properties:
data:
$ref: '#/components/schemas/team_schemas_TeamSchema'
type: object
required:
- data
title: NoPagination[TeamSchema]
securitySchemes:
api_key:
type: apiKey
name: x-auth-token
in: header