> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stigg.io/llms.txt
> Use this file to discover all available pages before exploring further.

# unarchiveCustomer

> Unarchive a customer



**mutation** `unarchiveCustomer(input: UnarchiveCustomerInput!): Customer!`

## Arguments

**`input`**: `UnarchiveCustomerInput!` (required)

Unarchive a customer

## Returns

`Customer!`

**`additionalMetaData`**: `JSON`

Custom key-value metadata to attach to the customer. When creating a customer, this sets the initial metadata. When updating a customer, this replaces the customer's existing metadata object entirely — it is not merged key by key. Omit this field on update to leave the customer's existing metadata untouched; pass an empty object to clear it.

---

**`awsMarketplaceCustomerId`**: `String`

The AWS Marketplace integration id

---

**`billingCurrency`**: `Currency`

The billing currency of the customer

---

**`billingId`**: `String`

The unique identifier for the entity in the billing provider

---

**`billingLinkUrl`**: `String`

The URL to the entity in the billing provider

---

**`coupon`**: `Coupon`

---

**`createdAt`**: `DateTime`

Timestamp of when the record was created

---

**`crmHubspotCompanyId`**: `String`

Company ID in Hubspot integration

---

**`crmHubspotCompanyUrl`**: `String`

Company URL in Hubspot integration

---

**`crmId`**: `String`

The unique identifier for the customer in Hubspot integration

---

**`customerId`**: `String!`

Customer slug

---

**`defaultPaymentExpirationMonth`**: `Int`

The expiration month of the default payment method

---

**`defaultPaymentExpirationYear`**: `Int`

The expiration year of the default payment method

---

**`defaultPaymentMethodCardBrand`**: `String`

The card brand of the default payment method, as reported by the billing provider (e.g. visa, mastercard, amex)

---

**`defaultPaymentMethodId`**: `String`

The default payment method id

---

**`defaultPaymentMethodLast4Digits`**: `String`

The last 4 digits of the default payment method

---

**`defaultPaymentMethodType`**: `PaymentMethodType`

The default payment method type

---

**`defaultPaymentMethodWalletType`**: `String`

The digital wallet used to add the default card payment method, as reported by the billing provider (e.g. apple_pay, google_pay)

---

**`deletedAt`**: `DateTime`

Timestamp of when the record was deleted

---

**`eligibleForTrial`**: `[EligibleForTrial!]`

Whether the customer is eligible for a trial

---

**`email`**: `String`

The email of the customer

---

**`environment`**: `Environment`

---

**`environmentId`**: `UUID!`

The unique identifier for the environment

---

**`excludeFromExperiment`**: `Boolean`

Whether the customer is excluded from the experiment

---

**`experiment`**: `Experiment`

---

**`experimentInfo`**: `experimentInfo`

Experiment info

---

**`hasActiveResource`**: `Boolean!`

Wether the customer has an active resource

---

**`hasActiveSubscription`**: `Boolean!`

Wether the customer has an active subscription

---

**`hasPaymentMethod`**: `Boolean!`

Whether the customer has an attached payment method

---

**`id`**: `UUID!`

Unique identifier for the entity

---

**`name`**: `String`

The name of the customer

---

**`promotionalEntitlements`**: `[PromotionalEntitlement!]!`

**Arguments:**

- `filter`: `PromotionalEntitlementFilter` = {} — Specify to filter the records returned.
- `sorting`: `[PromotionalEntitlementSort!]` = [{direction: DESC, field: createdAt}] — Specify to sort results.

---

**`refId`**: `String!`

Customer slug

> Deprecated: Renamed to customerId

---

**`salesforceId`**: `String`

The unique identifier for the customer in Salesforce integration

---

**`statistics`**: `CustomerStatistics`

Customer related aggregations

---

**`subscriptions`**: `[CustomerSubscription!]`

**Arguments:**

- `filter`: `CustomerSubscriptionFilter` = {status: {in: [ACTIVE, IN_TRIAL]}} — Specify to filter the records returned.
- `sorting`: `[CustomerSubscriptionSort!]` = [{direction: DESC, field: createdAt}] — Specify to sort results.

---

**`syncStates`**: `[SyncState!]`

List of integration sync states

---

**`totalActivePromotionalEntitlements`**: `Float!`

Total active promotional entitlement count

---

**`totalActiveSubscription`**: `Float!`

Total active subscription count

---

**`trialedPlans`**: `[TrialedPlan!]`

List of already trialed plans

---

**`updatedAt`**: `DateTime!`

Timestamp of when the record was last updated

## Examples

```graphql Mutation
mutation UnarchiveCustomer($input: UnarchiveCustomerInput!) {
  unarchiveCustomer(input: $input) {
    additionalMetaData
    awsMarketplaceCustomerId
    billingCurrency
    billingId
    billingLinkUrl
    coupon {
      additionalMetaData
      amountsOff {
        amount
        currency
      }
      billingId
      billingLinkUrl
      createdAt
      customers {
        __typename
      }
    }
  }
}
```

```json Variables
{
  "input": {
    "customerId": "string"
  }
}
```

```json Response
{
  "data": {
    "unarchiveCustomer": {
      "additionalMetaData": "value",
      "awsMarketplaceCustomerId": "string",
      "billingCurrency": "AED",
      "billingId": "string",
      "billingLinkUrl": "string",
      "coupon": {
        "additionalMetaData": "value",
        "amountsOff": [
          {
            "amount": 1.5,
            "currency": "AED"
          }
        ],
        "billingId": "string",
        "billingLinkUrl": "string",
        "createdAt": "value",
        "customers": [
          {
            "__typename": "Customer"
          }
        ]
      }
    }
  }
}
```


## Related topics

- [Rate Limits](https://docs.stigg.io/api-and-sdks/integration/graphql/rate-limits.md)
- [Unarchive customer](https://docs.stigg.io/api-reference/customers/unarchive-customer.md)
- [UnarchiveCustomerInput](https://docs.stigg.io/graphql-reference/types/UnarchiveCustomerInput.md)
- [Unarchive entities](https://docs.stigg.io/api-reference/governance-entities-v1-beta/unarchive-entities.md)
- [Unarchive product](https://docs.stigg.io/api-reference/products/unarchive-product.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.