---
title: "Decline customer invitation as test customer"
method: POST
path: "/simulations/customer-invitations/{invitationId}/decline"
tags: ["Simulations"]
---

# Decline customer invitation as test customer

`POST /simulations/customer-invitations/{invitationId}/decline`

Decline a pending customer invitation as the test customer it is addressed to

## Path parameters

- `invitationId` string, required — Invitation ID (adi_*).

## Headers

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

## Request body

- object
  - `data` object, required
    - `attributes` object, required
      - `partyId` string, required — Party ID (pty_*) of the test customer the invitation is addressed to.

## Response `200`

Successful Response

- object
  - `data` object, required
    - `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

## 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.
- `408` — 408
- `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-16** `56087b56c8c8` — 1 info
  - added the required property `data/attributes/redirectUrl` to the response with the `200` status
- **2026-09-02** `c7c12da5915f` — 12 info
  - added the optional property `errors/items/meta/limitScope` to the response with the `400` status
  - added the optional property `errors/items/meta/limitScope` to the response with the `401` status
  - added the optional property `errors/items/meta/limitScope` to the response with the `403` status
  - added the optional property `errors/items/meta/limitScope` to the response with the `404` status
  - …8 more
- **2026-08-27** `359d267dca88` — 1 info
  - deleted the `header` request parameter `X-Agent-ID` with deprecation
- **2026-08-27** `feb2ede06539` — 1 warning
  - added the new `CONNECTION_ESTABLISHED` enum value to the `data/attributes/cancelReason/anyOf[subschema #1]/` response property for the response status `200`
- **2026-08-23** `b1ad79e918ac` — 1 info
  - `header` request parameter `X-Agent-ID` was deprecated

[Full history](https://skmtc.dev/natural/apis/natural-api/changes/simulations/customer-invitations/:invitationId/decline/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/ca3882d75a00?raw)
