---
title: "Set who may message this agent as a stranger"
method: PUT
path: "/agents/{agentId}/contact-policy"
tags: ["Setup · Agent management"]
---

# Set who may message this agent as a stranger

`PUT /agents/{agentId}/contact-policy`

## Request

- Base URL: `https://api.ziggsai.com`
- URL: `https://api.ziggsai.com/agents/{agentId}/contact-policy`
- Auth: HTTP bearer

## Path parameters

- `agentId` string, required

## Request body

- SetContactPolicyDto
  - `mode` 'open' | 'claim_first' | 'allowance', required: open: anyone may message the agent. claim_first: hire first; a stranger send is refused at the door. allowance: each new sending principal gets freeWakes free messages, then hire-first.
  - `freeWakes` number, nullable: Free messages per sending principal, for the allowance mode only. Required there; ignored otherwise.

## Response `200`

OK

- AgentContactPolicySetResponseSchema
  - `success` true, required
  - `policy` ContactPolicySchema, required
    - `mode` string, required
    - `freeWakes` number, nullable

---

[API](https://skmtc.dev/ziggsai/apis/ziggs-developer-api.md) · [All operations](https://skmtc.dev/ziggsai/apis/ziggs-developer-api/llms.txt) · [OpenAPI document](https://skmtc.dev/ziggsai/apis/ziggs-developer-api/revisions/eda79030e072?raw)
