> ## Documentation Index
> Fetch the complete documentation index at: https://docs.magnific.com/llms.txt
> Use this file to discover all available pages before exploring further.

# API v2 | Magnific API

> Manage projects, folders, uploads, image, video and audio generation and edits, flows, brand kits, the library and your team programmatically.

> [!NOTE]
>
> API v2 is available to **Enterprise** and **Business** organizations. API v1 keeps working for every other account. Team endpoints follow what the organization's plan includes: budgets and credit limits, groups, tool permissions and audit logs are Enterprise features, and answer `403` for a Business organization.

API v2 lives under `https://api.magnific.com/v2`. It covers projects and folders, uploads, image, video and audio generation and edits, flows, brand kits, your creations and the library, plus your team's members, groups, API keys, credit limits, tool permissions, credit usage and Enterprise audit logs. Every request acts as the user or the organization the credentials belong to.

## Authentication

Send one of:

* **API key** (Enterprise and Business organizations): `x-magnific-api-key: <your-api-key>`. Generations are charged to the key, and the key's own permissions decide which tools and models it may use.
* **Personal access token**: `Authorization: Bearer <token>`, with these scopes:

| Scope | Allows |
| - | - |
| `api:read` | Reads: lists, details, searches and audit logs |
| `api:write` | Creating, editing, moving, sharing, uploading, generating and downloading stock |
| `api:destructive` | Deleting projects, library assets and groups, removing team members, and sending creations to the trash |

A dry run (`?dry_run=true`) needs the scope of the call it prices: `api:write` to price a generation. A call without the scope it needs returns `403` with `code: insufficient_scope` and `details.required_scope`. A credential that belongs to another Magnific deployment returns `421 wrong_deployment`.

### Get a personal access token

A personal access token acts as you, with your projects, your permissions and your credits. There is no token to copy from the web: you get one by signing in with your Magnific account through the OAuth 2.0 device flow ([RFC 8628](https://datatracker.ietf.org/doc/html/rfc8628)), with the public client `magnific-api-cli`. No client secret is needed: any tool that can make HTTP requests can follow these steps.

**1. Start the device flow**

Ask for the scopes you need. Add `offline_access` to get a refresh token that keeps working while you use it.

```bash theme={null}
curl -s -X POST https://auth.magnific.com/realms/api/protocol/openid-connect/auth/device \
  -d client_id=magnific-api-cli \
  --data-urlencode 'scope=openid offline_access api:read api:write'
```

The answer carries `device_code`, `user_code`, `verification_uri_complete`, `expires_in` (600 seconds) and `interval` (5 seconds).

**2. Approve it in the browser**

Open `verification_uri_complete`, sign in with your Magnific account and approve the scopes. The code expires after 10 minutes.

**3. Exchange the device code for tokens**

Poll every `interval` seconds until the answer stops being `authorization_pending`:

```bash theme={null}
curl -s -X POST https://auth.magnific.com/realms/api/protocol/openid-connect/token \
  -d grant_type=urn:ietf:params:oauth:grant-type:device_code \
  -d client_id=magnific-api-cli \
  -d device_code="$DEVICE_CODE"
```

The answer carries `access_token`, `refresh_token`, `expires_in` and the granted `scope`.

**4. Call the API**

```bash theme={null}
curl https://api.magnific.com/v2/account -H "Authorization: Bearer $ACCESS_TOKEN"
```

**Lifetimes**

| Token | Lifetime |
| - | - |
| Access token | 1 hour |
| Refresh token with `offline_access` | Expires after 30 days without use; no maximum while you keep using it |
| Refresh token without `offline_access` | Expires after 30 days without use, and 90 days after sign-in at most |
| Device code | 10 minutes |

**Refresh** the access token before it expires; the refresh token stays the same:

```bash theme={null}
curl -s -X POST https://auth.magnific.com/realms/api/protocol/openid-connect/token \
  -d grant_type=refresh_token \
  -d client_id=magnific-api-cli \
  -d refresh_token="$REFRESH_TOKEN"
```

**Revoke** it when you are done:

```bash theme={null}
curl -s -X POST https://auth.magnific.com/realms/api/protocol/openid-connect/revoke \
  -d client_id=magnific-api-cli \
  -d token="$REFRESH_TOKEN" \
  -d token_type_hint=refresh_token
```

Revoking stops new access tokens; one already issued keeps working until it expires, at most one hour.

The issuer is `https://auth.magnific.com/realms/api` (discovery at `/.well-known/openid-configuration`) and the token's audience is `https://api.magnific.com/v2`. `GET https://api.magnific.com/.well-known/oauth-protected-resource/v2` lists the authorization server and the scopes. A token for an account that has never signed in to Magnific on the web returns `404`.

## Projects and folders as a destination

Uploads, generations, edits and flow runs land in the project or folder you name with `folder_reference` in the request body. It takes either: a project's `reference` or a folder's `reference`.

To find a reference:

* **In Magnific:** open the project or folder; the reference is the last part of the URL, `…/projects/<reference>`.
* **By API:** `GET /v2/projects` lists your projects with their `reference` (filter with `?name=`), and `GET /v2/projects/{project_reference}/folders` the folders inside a project or folder. `POST /v2/projects` and `POST /v2/folders` return the `reference` of what they create.

```bash theme={null}
curl -X POST https://api.magnific.com/v2/images/generate/magnific-one \
  -H "x-magnific-api-key: $MAGNIFIC_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"prompt": "A lighthouse at dusk", "folder_reference": "<reference>"}'
```

A project or folder you can't add to returns `403 forbidden`, and a malformed reference returns `422 invalid_folder_reference`. Without `folder_reference`, the result lands in your Personal project. The `X-Folder-Reference` header of the web is not accepted: it returns `422 invalid_folder_reference`.

## Rate limits

| Credential | Limit |
| - | - |
| API key | 5,000 requests per 10 seconds across `/v2`, and per service 1,000 per minute and 100,000 per day |
| API key, reading the team (members, groups, API keys, project budgets, credit usage) | 10,000 requests per day |
| API key, audit logs | 50,000 requests per day |
| Personal access token | 120 requests per minute per user |
| Library writes and sharing a library asset | 30 requests per minute |
| Commenting on a creation | 60 requests per minute |

Exceeding a limit returns `429` with `code: rate_limited` and a `Retry-After` header. Limits can be raised per customer on request.

## Errors

Errors from projects, creations, generation, edits, flows, brand kits, the library, stock and audio share one body:

```json theme={null}
{
  "code": "validation_failed",
  "message": "The name field is required.",
  "details": { "errors": { "name": ["The name field is required."] } },
  "request_id": "ak-…"
}
```

| Status | `code` | When |
| - | - | - |
| `400` | `team_required` | A `/v2/team` call with a token that has no team: connect again choosing one, or send `x-magnific-team-id` |
| `401` | `unauthenticated`, `invalid_token` | Missing or invalid credentials |
| `402` | `insufficient_credits` | Not enough credits; `details.required_credits` and `details.available_credits` |
| `403` | `forbidden`, `insufficient_scope`, `magnific_api_disabled`, `project_role_forbidden` | Not allowed: role, scope, folder access, or the API is off for the organization; `insufficient_scope` carries `details.required_scope` |
| `404` | `not_found` | It does not exist or you cannot see it |
| `409` | `conflict`, `not_ready` | The project changed meanwhile, a limit was reached, or the creation is not ready (`details.generation_status`) |
| `421` | `wrong_deployment` | The credentials belong to another Magnific deployment |
| `422` | `validation_failed`, `unsupported_by_model`, `invalid_folder_reference` | Invalid input; `details.errors` lists it by field. Stock images, icons and videos answer `400 validation_failed` |
| `428` | `tool_not_available` | Your organization switched the tool or model off; `details.tool` and `details.mode` |
| `429` | `rate_limited`, `upload_quota_exceeded` | Rate limit or daily upload quota; with `Retry-After` |
| `451` | — | Moderation blocked the prompt; `details` flags the categories |
| `457` | `user_banned` | The account is banned from generating; `details.ban_type` and `details.reason` |
| `458` | `upgrade_required` | Your plan does not include it |
| `500` | `server_error`, `internal_error` | Our fault; share the `request_id` with support |
| `502` | `upstream_error` | The model provider failed |
| `503` | `service_unavailable` | A dependency is down; retry later |

Every error on `/v2` has at least `code`, `message` and `request_id`; errors from the gateway itself (`400 team_required`, `401`, `403`, `404`, `421`, `429`, `503`) have no `details`.

## Webhooks

Instead of polling a generation, send `webhook_url` with an API key on any call that queues creations (generation, audio, edits and tools): Magnific calls it, signed as on API v1, when each creation completes or fails, and retries for about a day while your endpoint is down. See [Webhooks](https://docs.magnific.com/api-reference/v2/webhooks.md).

## Pagination

Lists take `?cursor=` (and `limit` where a list allows it) and answer `{ "data": [...], "meta": { "pagination": { "has_more": true, "next_cursor": "…" } } }`. Follow `meta.pagination.next_cursor` while `has_more` is true; it is absent on the last page. Stock, team and audit log lists work the same way.

Catalogs (`GET /v2/audio/voices`, `GET /v2/videos/vfx`, `GET /v2/videos/upscale/models`) answer all at once: the items under `data`.

`GET /v2/projects` lists the projects your credentials can reach. To list every project of the organization, owners and admins use `GET /v2/team/project-budgets`, which also gives each project's budget.

## Models

API v2 offers the models API v1 sells. Name the model in the URL (`POST /v2/images/generate/{model}`, `POST /v2/videos/generate/{model}`, `POST /v2/videos/speak/{model}` and the audio endpoints), by its slug or its API v1 name; any other model returns `422`. Each model has its own page under **Image generation API**, **Video generation API** and **Audio generation API**, with the values it takes and an example. Add `?dry_run=true` to any call that spends credits to get its cost first ([Price a call](https://docs.magnific.com/api-reference/v2/dry-run.md)).

## Brand kits

A brand kit stores your brand once (colours, imagery style, tone of voice and typography rules) so the images you generate start from it. Create a kit with `POST /v2/brand-kits`, feed it from your own creations, PDF, markdown or text files you upload (`POST /v2/brand-kits/{brand_kit_id}/documents/uploads`), a website or your social profiles, follow the extraction with `GET /v2/brand-kits/runs/{run_id}` and edit it (rules, templates, sections, assets and fonts). List the kits you can use with `GET /v2/brand-kits` and read one, with its templates and logos (`content.templates`, `content.logo_marks`), with `GET /v2/brand-kits/{brand_kit_id}`. Test a `ready` kit with a validation round (`POST /v2/brand-kits/{brand_kit_id}/validation/runs`): generate its planned samples, record them, turn the user's feedback into a patch and apply it. Only a kit's owner edits it, and a kit out of your reach answers `404`. Step by step, with examples: [Brand kits](https://docs.magnific.com/api-reference/v2/brand-kits/overview.md).

Generate with a kit on Magnific One, `POST /v2/images/generate/magnific-one`:

* `brand_kit_id`: the kit's `id`. Only a kit whose `status` is `ready`.
* `brand_kit_template_slug` (optional): one of the kit's `templates`, by its `slug`.
* `brand_kit_logo` (optional): one of the kit's `logo_marks`, by its `sqid`.
* `brand_kit_variant_ids` (optional): up to three of the kit's `content.variants`, such as a market or a campaign, at most one per `kind`.

Another model (`auto`, the default, included), a kit you cannot read or that is still being built, a template or logo the kit does not have, or references Magnific One does not take return `422` on the field, before anything is charged. With an API key, only the kits of the key's organization are reachable. A flow with a brand kit input takes `{"brand_kit_id": "…", "brand_kit_template_slug": "…"}`. A brand kit does not guarantee exact fonts, exact colour values or pixel-identical placement.

## Creations

Everything a generation, an edit or an upload produces is a creation. Read where one stands with `GET /v2/creations/{creation_id}` and its files with `GET /v2/creations/{creation_id}/download`; rename, move, duplicate (`POST /v2/creations/duplicate`, into a project or folder you may edit) or trash it. Search the user's creations with `GET /v2/search/creations`: pick a `source` (history, all assets, favorites, downloads, trash or uploads) and filter by type, tool, model, date, comments or hearts, and by review status and tags as `GET /v2/tags/filters` names them. Heart one with `PUT /v2/creations/{creation_id}/like`. For an editor, `POST /v2/creations/{creation_id}/deliveries` renders a completed creation in an editor-native format (ProRes, DNxHR or hvc1 video, 16-bit PNG or TIFF or layered PSD images, WAV or MP3 audio): free, rendered once, counted as a download, and carrying the source's Content Credentials where the container can hold them. When you save creations outside Magnific yourself, record it first with `POST /v2/creations/downloads`: it records the download for the audit and the usage accounting, and answers the file to save where `url` is only a re-encode.

## Endpoints

### Account

| Method | Endpoint | Description |
| - | - | - |
| `GET` | `/v2/account` | Read the account: plan, credits and granted permissions |

### Image generation

| Method | Endpoint | Description |
| - | - | - |
| `POST` | `/v2/images/generate/{model}` | Generate images |

### Image editing

| Method | Endpoint | Description |
| - | - | - |
| `POST` | `/v2/images/expand` | Expand an image |
| `POST` | `/v2/images/upscale` | Upscale an image |
| `POST` | `/v2/images/relight` | Relight an image |
| `POST` | `/v2/images/restyle` | Restyle an image |
| `POST` | `/v2/images/remove-background` | Remove an image's background |
| `POST` | `/v2/images/skin-enhancer` | Enhance skin in an image |
| `POST` | `/v2/images/change-camera` | Change the camera angle of an image |
| `POST` | `/v2/images/reimagine` | Reimagine an image |
| `POST` | `/v2/images/retouch` | Retouch an image (Ideogram inpainting) |
| `POST` | `/v2/images/character-sheet` | Generate a character sheet |
| `GET` | `/v2/images/upscale/modes` | List image upscale modes |
| `GET` | `/v2/images/upscale/presets` | List image upscale presets |

### Video generation

| Method | Endpoint | Description |
| - | - | - |
| `POST` | `/v2/videos/generate/{model}` | Generate videos |
| `POST` | `/v2/videos/finalize` | Render a draft video in HD |

### Video editing

| Method | Endpoint | Description |
| - | - | - |
| `GET` | `/v2/videos/upscale/models` | List video upscale modes |
| `POST` | `/v2/videos/upscale` | Upscale a video |
| `GET` | `/v2/videos/vfx` | List video effects |
| `POST` | `/v2/videos/vfx` | Apply an effect to a video |
| `POST` | `/v2/videos/depth-map` | Depth map of a video |
| `POST` | `/v2/videos/camera-path` | Extract a video's camera path |
| `POST` | `/v2/videos/metadata` | Read a video's metadata |

### Motion graphics (Magnific Move)

| Method | Endpoint | Description |
| - | - | - |
| `POST` | `/v2/videos/move` | Create a motion graphic |
| `GET` | `/v2/videos/move` | List your motion graphics |
| `GET` | `/v2/videos/move/{motion_id}` | Read a motion graphic and its versions |
| `POST` | `/v2/videos/move/{motion_id}/versions` | Edit a motion graphic |
| `GET` | `/v2/videos/move/versions/{version_id}` | Inspect a version: brief, references, assets, cost and files |
| `POST` | `/v2/videos/move/versions/{version_id}/retry` | Retry a failed or cancelled version |
| `POST` | `/v2/videos/move/versions/{version_id}/render` | Export a version as an MP4 |

### Lip sync

| Method | Endpoint | Description |
| - | - | - |
| `POST` | `/v2/videos/speak/{model}` | Lip sync an image or a video with one model |

### Audio generation

| Method | Endpoint | Description |
| - | - | - |
| `POST` | `/v2/videos/audio-isolation` | Isolate a described sound from a video |
| `GET` | `/v2/audio/voices` | List voices |
| `POST` | `/v2/audio/voiceover/{model}` | Generate a voiceover |
| `POST` | `/v2/audio/music/{model}` | Generate music |
| `POST` | `/v2/audio/sfx/{model}` | Generate a sound effect |
| `POST` | `/v2/audio/timing` | Read an audio's word timings |

### Flows

| Method | Endpoint | Description |
| - | - | - |
| `GET` | `/v2/flows` | List flows |
| `GET` | `/v2/flows/{flow_id}` | Get a flow |
| `POST` | `/v2/flows/{flow_id}/run` | Run a flow |
| `GET` | `/v2/flows/runs/{run_id}` | Get a flow run |

### Creations

| Method | Endpoint | Description |
| - | - | - |
| `GET` | `/v2/creations` | Get or list creations |
| `GET` | `/v2/creations/{creation_id}` | Get a creation |
| `GET` | `/v2/creations/{creation_id}/download` | Download a creation |
| `PATCH` | `/v2/creations/{creation_id}` | Rename a creation |
| `POST` | `/v2/creations/move` | Move creations into a project or folder |
| `POST` | `/v2/creations/trash` | Move creations to the trash |
| `GET` | `/v2/search/creations` | Search creations |
| `GET` | `/v2/tags/filters` | List the review statuses and tags to search by |
| `PUT` | `/v2/creations/{creation_id}/like` | Heart or unheart a creation |
| `GET` | `/v2/creations/{creation_id}/comments` | List comments |
| `POST` | `/v2/creations/{creation_id}/comments` | Comment on a creation |
| `PATCH` | `/v2/creations/{creation_id}/comments/{comment_id}` | Edit a comment |
| `DELETE` | `/v2/creations/{creation_id}/comments/{comment_id}` | Delete a comment |
| `PUT` | `/v2/creations/{creation_id}/comments/{comment_id}/reactions` | React to a comment |
| `GET` | `/v2/projects/{project_reference}/mentionables` | List the people you can mention |
| `POST` | `/v2/creations/duplicate` | Duplicate creations into a project |
| `POST` | `/v2/creations/{creation_id}/deliveries` | Deliver a creation in an editor-native format |
| `POST` | `/v2/creations/downloads` | Record downloads |
| `GET` | `/v2/creations/{creation_id}/lineage` | Get the lineage of a creation |
| `GET` | `/v2/creations/{creation_id}/content-credentials` | Verify the Content Credentials of a creation |

### Tags

| Method | Endpoint | Description |
| - | - | - |
| `GET` | `/v2/tags` | List the tags of a project |
| `POST` | `/v2/tags` | Create a tag |
| `PATCH` | `/v2/tags/{tag_id}` | Update a tag |
| `DELETE` | `/v2/tags/{tag_id}` | Delete a tag |
| `POST` | `/v2/tags/assign` | Assign tags to creations |
| `POST` | `/v2/tags/unassign` | Unassign tags from creations |

### Projects and folders

| Method | Endpoint | Description |
| - | - | - |
| `GET` | `/v2/projects` | List projects |
| `GET` | `/v2/projects/{project_reference}` | Get a project or folder |
| `GET` | `/v2/projects/{project_reference}/folders` | List the folders inside a project or folder |
| `GET` | `/v2/projects/{project_reference}/creations` | List the creations of a project |
| `POST` | `/v2/projects` | Create a project |
| `POST` | `/v2/folders` | Create a folder inside a project or folder |
| `PATCH` | `/v2/projects/{project_reference}` | Rename a project |
| `POST` | `/v2/projects/{project_reference}/archive` | Archive a project |
| `POST` | `/v2/projects/{project_reference}/unarchive` | Unarchive a project |
| `GET` | `/v2/projects/{project_reference}/members` | List a project's members |
| `PUT` | `/v2/projects/{project_reference}/members` | Set a project's members (whoever is left out loses access) |
| `DELETE` | `/v2/projects/{project_reference}` | Delete a project |

### Uploads

| Method | Endpoint | Description |
| - | - | - |
| `POST` | `/v2/uploads` | Request upload targets |
| `POST` | `/v2/uploads/finalize` | Finalize uploads |
| `POST` | `/v2/uploads/import` | Import an image from a URL |
| `POST` | `/v2/uploads/stock` | Save a stock item as a creation |

### Stock

| Method | Endpoint | Description |
| - | - | - |
| `GET` | `/v2/stock/resources` | Search images and templates |
| `GET` | `/v2/stock/resources/{resource_id}` | Get an image or template |
| `GET` | `/v2/stock/resources/{resource_id}/download` | Download an image or template |
| `GET` | `/v2/stock/resources/{resource_id}/download/{resource_format}` | Download an image or template in a format |
| `GET` | `/v2/stock/icons` | Search icons |
| `GET` | `/v2/stock/icons/{icon_id}` | Get an icon |
| `GET` | `/v2/stock/icons/{icon_id}/download` | Download an icon |
| `GET` | `/v2/stock/videos` | Search videos |
| `GET` | `/v2/stock/videos/{video_id}` | Get a video |
| `GET` | `/v2/stock/videos/{video_id}/download` | Download a video |
| `GET` | `/v2/stock/videos/{video_id}/options/{option_id}/download` | Download a video option |
| `GET` | `/v2/stock/music` | Search music |
| `GET` | `/v2/stock/music/{music_id}` | Get a music track |
| `GET` | `/v2/stock/music/{music_id}/download` | Download a music track |
| `GET` | `/v2/stock/sound-effects` | Search sound effects |
| `GET` | `/v2/stock/sound-effects/{sound_effect_id}` | Get a sound effect |
| `GET` | `/v2/stock/sound-effects/{sound_effect_id}/download` | Download a sound effect |

### Library

| Method | Endpoint | Description |
| - | - | - |
| `GET` | `/v2/library` | List the library |
| `GET` | `/v2/library/{id}` | Get a library asset |
| `POST` | `/v2/library` | Create a library asset |
| `PATCH` | `/v2/library/{id}` | Edit a library asset |
| `PUT` | `/v2/library/{id}/shares` | Share a library asset |
| `DELETE` | `/v2/library/{id}` | Delete a library asset |

### Brand kits

| Method | Endpoint | Description |
| - | - | - |
| `GET` | `/v2/brand-kits` | List brand kits |
| `POST` | `/v2/brand-kits` | Create a brand kit |
| `GET` | `/v2/brand-kits/{brand_kit_id}` | Get a brand kit |
| `PATCH` | `/v2/brand-kits/{brand_kit_id}` | Update a brand kit |
| `POST` | `/v2/brand-kits/{brand_kit_id}/duplicate` | Duplicate a brand kit |
| `POST` | `/v2/brand-kits/{brand_kit_id}/documents/uploads` | Request document upload targets |
| `POST` | `/v2/brand-kits/{brand_kit_id}/documents` | Add documents |
| `POST` | `/v2/brand-kits/{brand_kit_id}/documents/{document_id}/process` | Process a document |
| `DELETE` | `/v2/brand-kits/{brand_kit_id}/documents/{document_id}` | Delete a document |
| `POST` | `/v2/brand-kits/{brand_kit_id}/scrape` | Build a kit from a website |
| `POST` | `/v2/brand-kits/{brand_kit_id}/social-analysis` | Analyze the confirmed social profiles |
| `GET` | `/v2/brand-kits/runs/{run_id}` | Read an extraction run |
| `PUT` | `/v2/brand-kits/{brand_kit_id}/sections` | Organize a brand kit |
| `POST` | `/v2/brand-kits/{brand_kit_id}/assets` | Add a vector or component |
| `POST` | `/v2/brand-kits/{brand_kit_id}/fonts/uploads` | Request font upload targets |
| `POST` | `/v2/brand-kits/{brand_kit_id}/fonts` | Register a font |
| `GET` | `/v2/brand-kits/{brand_kit_id}/rules` | List rules |
| `POST` | `/v2/brand-kits/{brand_kit_id}/rules` | Add a rule |
| `GET` | `/v2/brand-kits/{brand_kit_id}/creations` | List the kit's creations |
| `POST` | `/v2/brand-kits/{brand_kit_id}/templates` | Create a template |
| `DELETE` | `/v2/brand-kits/{brand_kit_id}/templates/{slug}` | Delete a template |
| `POST` | `/v2/brand-kits/{brand_kit_id}/templates/{slug}/images` | Add example images to a template |
| `DELETE` | `/v2/brand-kits/{brand_kit_id}/templates/{slug}/images/{creation_id}` | Remove an example image from a template |
| `GET` | `/v2/brand-kits/{brand_kit_id}/design-templates` | List design templates |
| `DELETE` | `/v2/brand-kits/{brand_kit_id}/design-templates/{design_template_id}` | Delete a design template |
| `GET` | `/v2/brand-kits/presets/user` | List your image presets |
| `POST` | `/v2/brand-kits/{brand_kit_id}/validation/runs` | Start a validation round |
| `POST` | `/v2/brand-kits/{brand_kit_id}/validation/runs/{run_id}/samples` | Generate a validation sample |
| `POST` | `/v2/brand-kits/{brand_kit_id}/validation/runs/{run_id}/record` | Record a round's samples |
| `POST` | `/v2/brand-kits/{brand_kit_id}/validation/runs/{run_id}/analysis` | Analyze a round's feedback |
| `GET` | `/v2/brand-kits/{brand_kit_id}/validation/patches/{patch_id}` | Get a proposed patch |
| `POST` | `/v2/brand-kits/{brand_kit_id}/validation/patches/{patch_id}/apply` | Apply a proposed patch |

### Team, budgets, permissions and audit logs

With a personal token, send `x-magnific-team-id` to pick the team; an API key always acts on its own team. Writes answer `200` with the resource as it is after the change.

| Method | Endpoint | Description |
| - | - | - |
| `GET` | `/v2/team/members` | List members |
| `PATCH` | `/v2/team/members/{member_id}` | Change a member's role |
| `DELETE` | `/v2/team/members/{member_id}` | Remove a member |
| `POST` | `/v2/team/invitations` | Invite members |
| `GET` | `/v2/team/groups` | List groups |
| `POST` | `/v2/team/groups` | Create a group |
| `PATCH` | `/v2/team/groups/{group_id}` | Rename a group |
| `DELETE` | `/v2/team/groups/{group_id}` | Delete a group |
| `POST` | `/v2/team/groups/{group_id}/members` | Move members into a group |
| `GET` | `/v2/team/api-keys` | List API keys |
| `GET` | `/v2/team/project-budgets` | List project budgets |
| `GET` | `/v2/team/credit-usage` | Read credit usage |
| `PUT` | `/v2/team/members/{member_id}/credit-limit` | Set a member's credit limit |
| `PUT` | `/v2/team/groups/{group_id}/credit-limit` | Set a group's credit limit |
| `PUT` | `/v2/team/api-keys/{api_key_id}/credit-limit` | Set an API key's credit limit |
| `GET` | `/v2/team/budget` | Read the total budget (beta) |
| `PUT` | `/v2/team/budget` | Set the total budget (beta, pilot) |
| `GET` | `/v2/team/permissions` | Read the organization's tool permissions |
| `PATCH` | `/v2/team/permissions` | Change the organization's tool permissions |
| `GET` | `/v2/team/groups/{group_id}/permissions` | Read a group's tool permissions |
| `PATCH` | `/v2/team/groups/{group_id}/permissions` | Change a group's tool permissions |
| `GET` | `/v2/team/members/{member_id}/permissions` | Read a member's tool permissions |
| `PATCH` | `/v2/team/members/{member_id}/permissions` | Change a member's tool permissions |
| `GET` | `/v2/team/audit-logs/events` | Search audit events |
| `POST` | `/v2/team/audit-logs/export` | Request a report |
| `GET` | `/v2/team/audit-logs/reports` | List reports and their status |
| `GET` | `/v2/team/audit-logs/reports/{report_id}/download-url` | Get a report's download URL |

Credit limits, groups, tool permissions and audit logs are available only to **Enterprise** teams.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.