---
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-Instance-ID` string, nullable

## Request body

- object
  - `data` object, required
    - `attributes` object, required
      - `agentIds` string[], required — Agents (agt_*) to offer. The test customer receives a pending invitation for each.
      - `permissions` string[] — Permissions to request for each agent. Defaults to send and view payments, and view wallets.
      - `type` 'PERSON' | 'ORG' — Test customer party type. Defaults to PERSON.
      - `message` string — Message stored with each pending invitation. Sandbox does not send an invitation email.
      - `redirectUrl` string — Where to send the test customer after they accept and finish setup: an https URL, an app deep link, or an sms: link.

## Response `200`

Successful Response

- object
  - `data` object[], required — Pending invitations created, one for each agent listed.
    - `type` 'agentDelegationInvitation', required — Resource type. Always `agentDelegationInvitation`.
    - `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 — Status after applying expiry: reads EXPIRED once `expiresAt` has passed even while `status` is still PENDING.
      - `expiresAt` string, required — RFC 3339 timestamp when the invitation expires.
      - `acceptedAt` string, nullable, required — RFC 3339 timestamp when the invitation was accepted, or null.
      - `declinedAt` string, nullable, required — RFC 3339 timestamp when the invitation was declined, or null.
      - `cancelReason` 'AGENT_RETIRED' | 'DEVELOPER_RETIRED' | 'DEVELOPER_REVOKED' | 'CONNECTION_ESTABLISHED', nullable, required — Reason for cancellation.
      - `redirectUrl` string, nullable, required — Where the customer is sent after accepting and finishing setup, or null.
      - `tags` object, required — Metadata visible to anyone who can read the resource.
      - `createdAt` string, required — RFC 3339 timestamp when the invitation was created.
      - `updatedAt` string, required — RFC 3339 timestamp 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 — Resource type. Always `agent`.
          - `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 — Resource type. Always `party`.
          - `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. The response contains one error object for each invalid request value.
- `428` — Precondition Required
- `429` — Too Many Requests
- `500` — Internal Server Error
- `501` — Not Implemented
- `502` — Bad Gateway
- `503` — Service Unavailable

## Changes

- **2026-09-19** `6e52d1bd0054` — 2 info
  - added the new `voice_sessions.create` enum value to the request property `data/attributes/permissions/items/`
  - added the new `voice_sessions.read` enum value to the request property `data/attributes/permissions/items/`
- **2026-09-19** `7dd2420be291` — 3 info
  - added the new `chargebacks.respond` enum value to the request property `data/attributes/permissions/items/`
  - added the new `disputes.create` enum value to the request property `data/attributes/permissions/items/`
  - added the new `disputes.read` enum value to the request property `data/attributes/permissions/items/`
- **2026-09-18** `fd694514e004` — 1 info
  - added the new `refunds.create` enum value to the request property `data/attributes/permissions/items/`
- **2026-09-16** `56087b56c8c8` — 2 info
  - added the new optional request property `data/attributes/redirectUrl`
  - added the required property `data/items/attributes/redirectUrl` to the response with the `200` status
- **2026-09-15** `1132c9ddb7bd` — 6 info
  - added the new `card_payments.read` enum value to the request property `data/attributes/permissions/items/`
  - added the new `chargebacks.read` enum value to the request property `data/attributes/permissions/items/`
  - added the new `enrollment.read` enum value to the request property `data/attributes/permissions/items/`
  - added the new `mandates.read` enum value to the request property `data/attributes/permissions/items/`
  - …2 more

[Full history](https://skmtc.dev/natural/apis/natural-api/changes/simulations/invite-customer/post.md)

---

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