---
title: "Download team audit log as CSV"
method: GET
path: "/api/v3/teams/{team_id}/audit-log"
tags: ["Teams"]
---

# Download team audit log as CSV

`GET /api/v3/teams/{team_id}/audit-log`

## Request

- Base URL: `https://codemagic.io`
- URL: `https://codemagic.io/api/v3/teams/{team_id}/audit-log`
- Auth: API key in header `x-auth-token`
- TypeScript: <https://skmtc.dev/codemagic/apis/codemagic-api/docs/api/v3/teams/:team_id/audit-log/get.ts> (a function with typed inputs; its response is checked against the schema)

Returns a CSV file that contains the audit log events.
### Event List

- `app_created`
- `app_deleted`
- `app_repository_changed`
- `app_role_granted`
- `app_role_revoked`
- `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`
- `team_ownership_transferred`
- `user_authenticated`

## Path parameters

- `team_id` string, required

## Response `200`

Stream Response

## Other responses

- `400`: The request could not be validated
- `401`: Authentication is missing or invalid
- `403`: The caller lacks the required permission
- `404`: The requested resource does not exist
- `429`: The rate limit has been exceeded

---

[API](https://skmtc.dev/codemagic/apis/codemagic-api.md) - [All operations](https://skmtc.dev/codemagic/apis/codemagic-api/llms.txt) - [OpenAPI document](https://skmtc.dev/codemagic/apis/codemagic-api/revisions/be09630f65e2?raw)
