---
title: "Update OpenAPI spec"
method: PUT
path: "/domains/{domain_id}/update/openapi-spec"
---

# Update OpenAPI spec

`PUT /domains/{domain_id}/update/openapi-spec`

## Request

- Base URL: `https://app.aikido.dev/api/public/v1`
- URL: `https://app.aikido.dev/api/public/v1/domains/{domain_id}/update/openapi-spec`
- Auth: OAuth 2
  - Client credentials
  - Token URL: `https://app.aikido.io/api/oauth/token` scopes: `domains:write`

Updates the OpenAPI spec of a domain with a specified id

## Path parameters

- `domain_id` integer, required

## Request body

- object
  - `openapi_spec` string, required: The stringified OpenAPI Spec content. Format must be JSON or YAML.

## Response `200`

The OpenAPI Spec has been successfully updated

- object
  - `success` integer: An integer 1 indicating success

## Other responses

- `400`: OpenAPI Spec could not be updated
- `404`: Domain not found

---

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