---
title: "Create an import code, apply or discard a config version, turn imported hooks on or off, or set a needed value"
method: POST
path: "/api/v1/agents/{agentId}/profile"
tags: ["Agents"]
---

# Create an import code, apply or discard a config version, turn imported hooks on or off, or set a needed value

`POST /api/v1/agents/{agentId}/profile`

## Path parameters

- `agentId` string, required

## Request body

- object
  - `action` 'import_code' | 'apply' | 'discard' | 'hooks' | 'set_secret' | 'delete_secret', required
  - `harness` string
  - `profileId` string
  - `hooksEnabled` boolean
  - `enabled` boolean
  - `name` string
  - `value` string

## Response `200`

Successful response. Stable response schemas are documented in workflow guides when available.

- unknown

## Other responses

- `400` — Invalid request.
- `401` — Missing or invalid authentication.
- `500` — Unexpected server error.

## Changes

- **2026-10-02** `0d6c78570160` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/layernorm/apis/overlay-web-api/changes/api/v1/agents/:agentId/profile/post.md)

---

[API](https://skmtc.dev/layernorm/apis/overlay-web-api.md) · [All operations](https://skmtc.dev/layernorm/apis/overlay-web-api/llms.txt) · [OpenAPI document](https://skmtc.dev/layernorm/apis/overlay-web-api/revisions/723150bfdd74?raw)
