---
title: "Archive exposure SQL model"
method: POST
path: "/api/v2/experiments/exposure-sql-models/{exposure_sql_model_id}/archive"
tags: ["Experiments"]
---

# Archive exposure SQL model

`POST /api/v2/experiments/exposure-sql-models/{exposure_sql_model_id}/archive`

## Request

- Base URL: `https://api.datadoghq.com`
- URL: `https://api.datadoghq.com/api/v2/experiments/exposure-sql-models/{exposure_sql_model_id}/archive`
- Auth: one of:
  - API key in header `DD-API-KEY` and API key in header `DD-APPLICATION-KEY`
  - OAuth 2
    - Authorization code: `/oauth2/v1/authorize`
    - Token URL: `/oauth2/v1/token` scopes: `product_analytics_warehouse_model_write`
- TypeScript: <https://skmtc.dev/datadog/apis/datadog-api-v2-collection/docs/api/v2/experiments/exposure-sql-models/:exposure_sql_model_id/archive/post.ts> (a function with typed inputs; its response is checked against the schema)

Archive an exposure SQL model. Archived models are hidden from the default list and are no longer refreshed for new feature flags. Experiments already reading from the model keep working. Archiving is how a model that is in use by an experiment, and therefore cannot be deleted, is retired.

## Path parameters

- `exposure_sql_model_id` string, uuid, required: The UUID of the exposure SQL model.

## Response `204`

The exposure SQL model was archived. Archiving an already-archived model succeeds and leaves the original archive time in place.

## Other responses

- `400`: Malformed exposure SQL model ID (not a valid UUID).
- `401`: Missing or invalid authentication.
- `403`: Authenticated caller lacks the product_analytics_warehouse_model_write permission.
- `404`: No exposure SQL model with this ID exists for the organization.
- `429`: Too many requests

---

[API](https://skmtc.dev/datadog/apis/datadog-api-v2-collection.md) - [All operations](https://skmtc.dev/datadog/apis/datadog-api-v2-collection/llms.txt) - [OpenAPI document](https://skmtc.dev/datadog/apis/datadog-api-v2-collection/revisions/3f70db624329?raw)
