---
title: "Invite test customer"
method: POST
path: "/simulations/invite-customer"
tags: ["Simulations"]
---

# Invite test customer

`POST /simulations/invite-customer`

Create a test customer and a pending invitation for each agent you name

## Headers

- `Idempotency-Key` string, required
- `X-Agent-ID` string, nullable
- `X-Instance-ID` string, nullable

## Request body

- object
  - `data` object, required
    - `attributes` object, required
      - `agentIds` string[], required — Agents to grant access to. The test customer receives a pending invitation for each agent listed.
      - `type` 'PERSON' | 'ORG' — Test customer party type. Defaults to PERSON.

## Response `200`

Successful Response

- object
  - `data` object[], required — Pending invitations created, one for each agent listed.
    - `type` 'agentDelegationInvitation', required
    - `id` string, required — Invitation ID (adi_*).
    - `attributes` object, required — Invitation details.
      - `developerName` string, required — Developer name.
      - `email` string, required — Recipient email.
      - `phone` string, nullable, required — Recipient phone.
      - `url` string, uri, required — Invitation URL. Natural sends it automatically for email invitations; deliver it yourself for phone invitations.
      - `agentName` string, required — Agent name.
      - `permissions` string[], required — Permissions granted on accept.
      - `limits` object, nullable, required — Transaction limits.
        - `perTransaction` integer, nullable — Per-transaction spending limit in cents, or null for no limit.
      - `status` 'PENDING' | 'ACCEPTED' | 'DECLINED' | 'EXPIRED' | 'CANCELED', required — Invitation status.
      - `effectiveStatus` 'PENDING' | 'ACCEPTED' | 'DECLINED' | 'EXPIRED' | 'CANCELED', required — Resolved status.
      - `expiresAt` string, required — When the invitation expires.
      - `acceptedAt` string, nullable, required — When the invitation was accepted.
      - `declinedAt` string, nullable, required — When the invitation was declined.
      - `cancelReason` 'AGENT_RETIRED' | 'DEVELOPER_RETIRED' | 'DEVELOPER_REVOKED', nullable, required — Reason for cancellation.
      - `tags` object, required — Metadata visible to anyone who can read the resource.
      - `createdAt` string, required — When the invitation was created.
      - `updatedAt` string, required — When the invitation was last updated.
    - `relationships` object, required — Related resources.
      - `agent` object, required — The invited agent.
        - `data` object, required — Related resource identifier.
          - `type` 'agent', required
          - `id` string, required
      - `customerParty` object, required — Customer party that accepted the invitation, or null until acceptance.
        - `data` object, nullable, required — Related resource identifier.
          - `type` 'party', required
          - `id` string, required
  - `meta` object, required
    - `customer` object, required
      - `partyId` string, required — Customer party ID (pty_*).
      - `handle` string, required — The test customer's handle (@name), assigned automatically.
      - `partyType` 'PERSON' | 'ORG', required — Test customer party type.

## Other responses

- `400` — Validation Error
- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not Found. Returned when the resource does not exist, or when it exists but is not accessible to your account. The two cases are intentionally indistinguishable, so that resource IDs cannot be enumerated by probing.
- `409` — Conflict
- `422` — Validation Error
- `428` — Precondition Required
- `429` — Too Many Requests
- `500` — Internal Server Error
- `501` — Not Implemented
- `502` — Bad Gateway
- `503` — Service Unavailable

---

[API](https://skmtc.net/natural/apis/natural-api.md) · [All operations](https://skmtc.net/natural/apis/natural-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/natural/natural-api/versions/0bb9c54b1f61/schema)
