---
title: "Add a source address that the agent will accept messages from."
method: POST
path: "/mimic/agent/{agentNum}/from/add/{IP}/{port}"
tags: ["Agent"]
---

# Add a source address that the agent will accept messages from.

`POST /mimic/agent/{agentNum}/from/add/{IP}/{port}`

An empty ipaddress or 0.0.0.0 both imply any address. Similarly an empty port or 0 both imply any port. For agents with source-address-indexing enabled, messages which do not match any source address will be discarded with an ERROR message, similar to community string mismatches.

## Path parameters

- `agentNum` integer, required
- `IP` string, required
- `port` integer, required

## Response `200`

successful operation

- string

## Other responses

- `400` — Invalid agent number value

---

[API](https://skmtc.dev/gambitcomm/apis/mimic-rest-api.md) · [All operations](https://skmtc.dev/gambitcomm/apis/mimic-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/gambitcomm/mimic-rest-api/revisions/eb67c54e9ec9/schema)
