> Portal Navigation:
> 
> - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version.
> - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages).
> - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`).
> - Top-level index of all portals: https://dev.wix.com/docs/llms.txt
> - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt

# BulkRestoreContactsFromTrashBin

# Package: contacts

# Namespace: Contacts

# Method link: https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/bulk-restore-contacts-from-trash-bin.md

## Permission Scopes:
Manage Contacts: SCOPE.DC-CONTACTS.MANAGE-CONTACTS

## Introduction

Restores multiple soft-deleted contacts from the trash bin.

To restore a single contact, call [Restore Contact From Trash Bin](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/restore-contact-from-trash-bin.md).

---

## REST API

### Schema

```
 Method: bulkRestoreContactsFromTrashBin
 Description: Restores multiple soft-deleted contacts from the trash bin.  To restore a single contact, call [Restore Contact From Trash Bin](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/restore-contact-from-trash-bin.md).
 URL: https://www.wixapis.com/contacts/v5/bulk/contacts/trash-bin/restore
 Method: POST
 Method parameters:
   param name: contactIds | type: array<contactIds> | description: IDs of the contacts to restore from the trash bin.  | validation: minItems 1, maxItems 100, format GUID
   param name: returnEntity | type: returnEntity | description: Whether to include the restored contacts in the response.  
 Return type: BulkRestoreContactsFromTrashBinResponse
  - name: results | type: array<BulkContactResult> | description: Results of the restore operation for each contact.  | validation: minItems 1, maxItems 100
     - name: itemMetadata | type: ItemMetadata | description: Metadata regarding the restoration of this specific contact.  
        - name: id | type: string | description: Item GUID. Should always be available, unless it's impossible (for example, when failing to create an item).  | validation: format GUID
        - name: originalIndex | type: integer | description: Index of the item within the request array. Allows for correlation between request and response items.  
        - name: success | type: boolean | description: Whether the requested action was successful for this item. When `false`, the `error` field is populated.  
        - name: error | type: ApplicationError | description: Details about the error in case of failure.  
           - name: code | type: string | description: Error code.  
           - name: description | type: string | description: Description of the error.  
           - name: data | type: object | description: Data related to the error.  
     - name: item | type: Contact | description: Returned only when `returnEntity` is `true` in the request.  
        - name: id | type: string | description: Contact GUID.  | validation: format GUID, immutable
        - name: revision | type: string | description: Revision number, which increments by 1 each time the Contact is updated. To prevent conflicting changes, the current revision must be passed when updating the Contact.  Ignored when creating a Contact.  | validation: format int64
        - name: createdDate | type: string | description: Date and time the contact was created.  | validation: format date-time, immutable
        - name: updatedDate | type: string | description: Date and time the contact was last updated.  | validation: format date-time
        - name: externalId | type: string | description: Contact external GUID. Used to identify contacts from external systems. This field can only be set once and can't be updated after creation.  | validation: maxLength 100
        - name: name | type: ContactName | description: Contact's name information including first and last name.  
           - name: first | type: string | description: Contact's first name.  | validation: maxLength 1000
           - name: last | type: string | description: Contact's last name.  | validation: maxLength 1000
        - name: email | type: ContactEmail | description: The main email of the contact with subscription status and deliverability information. This email is used for contact matching and deduplication logic.  
           - name: email | type: string | description: Main email address for the contact. Used for communication and contact matching.  Stored in normalized form: leading and trailing whitespace is trimmed and the address is lowercased.  | validation: maxLength 320, format EMAIL
           - name: subscriptionStatus | type: ContactSubscription | description: Indicates the recipient's opt-in or opt-out status for marketing emails. This field is read-only and managed by the subscription system.  Updates are eventually consistent, reflecting marketing consent changes after they're processed.  
              - name: status | type: SubscriptionStatus | description: Indicates the recipient's opt-in or opt-out status for marketing communications.  - `NO_SUBSCRIPTION_STATUS`: No status exists. Used when a phone is not a valid E164 number. - `NOT_SET`: No subscription status specified. Default value. - `PENDING`: Subscription confirmation was requested, but recipient hasn't confirmed yet. - `SUBSCRIBED`: Recipient has explicitly opted in to receive marketing communications. - `UNSUBSCRIBED`: Recipient has opted out of marketing communications.  
                     - enum: NO_SUBSCRIPTION_STATUS, NOT_SET, PENDING, SUBSCRIBED, UNSUBSCRIBED
              - name: updatedDate | type: string | description: Date and time when the subscription status was last updated.  | validation: format date-time
           - name: deliverabilityStatus | type: EmailDeliverabilityStatus | description: Indicates the last reported delivery status of emails sent to this address. This field is read-only and updated automatically by the email delivery system.  - `NOT_SET`: No delivery status reported. Default value. - `VALID`: Emails are being successfully delivered to this address. - `BOUNCED`: The last email to this address bounced or was rejected by the recipient's email server. - `SPAM_COMPLAINT`: Recipient registered a spam complaint with their email provider. - `INACTIVE`: Multiple emails have been delivered without any engagement from the recipient.  
                 - enum: NOT_SET, VALID, BOUNCED, SPAM_COMPLAINT, INACTIVE
        - name: additionalEmails | type: array<AdditionalEmail> | description: Additional emails of the contact. These emails do not affect subscription status or contact matching/deduplication. The main email field must be set before additional emails can be added.  | validation: maxItems 10
           - name: email | type: string | description: Additional email address for the contact. Does not affect subscription status or contact matching logic.  | validation: maxLength 320, format EMAIL
        - name: phone | type: ContactPhone | description: The main phone of the contact with subscription status and deliverability information. This phone is used for contact matching and deduplication logic. At least one of name, email, or phone is required for contact creation.  
           - name: tag | type: PhoneTag | description: Phone type classification. Helps categorize the phone number's purpose.  Default: `OTHER`  
                 - enum: OTHER, MAIN, HOME, MOBILE, WORK, FAX
           - name: phone | type: string | description: Primary phone number for the contact. Used for communication and contact matching.  | validation: minLength 1, maxLength 50
           - name: e164 | type: string | description: Phone number in [ITU E.164 international](https://www.itu.int/rec/T-REC-E.164/) format (e.g., +12345550123). This field is automatically generated from the phone field if it represents a valid E.164 number.  | validation: maxLength 50
           - name: subscriptionStatus | type: ContactSubscription | description: Indicates the recipient's opt-in or opt-out status for SMS/text message marketing. This field is read-only and managed by the subscription system.  Updates are eventually consistent, reflecting marketing consent changes after they're processed.  
           - name: deliverabilityStatus | type: PhoneDeliverabilityStatus | description: Indicates the delivery status for SMS messages sent to this phone number. This field is read-only and updated automatically by the SMS delivery system. - `NO_PHONE_DELIVERABILITY_STATUS`: No status exists. Used when the phone is not a valid E164 number. - `NOT_SET`: No delivery status reported. Default when the phone is a valid E164 number. - `VALID`: Last message was sent and delivered successfully. - `INVALID`: The number is invalid (landline, number disconnected, etc.).  
                 - enum: NO_PHONE_DELIVERABILITY_STATUS, NOT_SET, VALID, INVALID
        - name: additionalPhones | type: array<AdditionalPhone> | description: Additional phones of the contact. These phones do not affect subscription status or contact matching/deduplication. The main phone field must be set before additional phones can be added.  | validation: maxItems 10
           - name: tag | type: PhoneTag | description: Phone type classification for the additional phone number.  Default: `OTHER`  
           - name: phone | type: string | description: Additional phone number for the contact. Does not affect subscription status or contact matching logic.  | validation: minLength 1, maxLength 50
           - name: e164 | type: string | description: Additional phone number in [ITU E.164 international](https://www.itu.int/rec/T-REC-E.164/) format (e.g., +12345550123). This field is automatically generated from the phone field if it represents a valid E.164 number.  | validation: maxLength 50
        - name: addresses | type: array<ContactAddress> | description: Contact's physical addresses. Each address can be tagged (HOME, WORK, BILLING, SHIPPING, OTHER) and one can be set as default. If no address is marked as default, the first address automatically becomes the default.  | validation: maxItems 50
           - name: tag | type: AddressTag | description: Address type classification. Helps categorize the address purpose.  Default: `OTHER`  
                 - enum: OTHER, HOME, WORK, BILLING, SHIPPING
           - name: address | type: Address | description: Physical address information including street, city, country, and postal code. Contains structured address data following common address formatting standards.  
              - ONE-OF: 
                 - name: streetAddress | type: StreetAddress | description: Street address object, with number and name in separate fields.  
                    - name: number | type: string | description: Street number.  | validation: maxLength 100
                    - name: name | type: string | description: Street name.  | validation: maxLength 300
                    - name: apt | type: string | description: Apartment number.  | validation: maxLength 50
                    - name: formattedAddressLine | type: string | description: Optional formatted version of the street address line.  | validation: maxLength 2000
                 - name: addressLine | type: string | description: Main address line, usually street and number, as free text.  | validation: maxLength 1000
              - name: country | type: string | description: 2-letter country code in an [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format.  | validation: format COUNTRY
              - name: subdivision | type: string | description: Subdivision shorthand. Usually, a short code (2 or 3 letters) that represents a state, region, prefecture, or province. For example, `NY`.  | validation: format SUBDIVISION
              - name: city | type: string | description: City name.  | validation: maxLength 300
              - name: postalCode | type: string | description: Postal or zip code.  | validation: maxLength 100
              - name: addressLine2 | type: string | description: Free text providing more detailed address information, such as apartment, suite, or floor.  | validation: maxLength 1000
              - name: formattedAddress | type: string | description: Human-readable address string. If not provided, the value is generated from the available address data.  | validation: maxLength 2000
              - name: hint | type: string | description: Instructions to help someone find the address, such as landmarks or where the entrance is.  | validation: maxLength 200
              - name: geocode | type: AddressLocation | description: Coordinates of the physical address.  
                 - name: latitude | type: number | description: Address latitude.  | validation: minimum -90, maximum 90, format double
                 - name: longitude | type: number | description: Address longitude.  | validation: minimum -180, maximum 180, format double
              - name: countryFullname | type: string | description: Full country name.  | validation: maxLength 100
              - name: subdivisions | type: array<Subdivision> | description: Hierarchical list of subdivisions, where the first array item is the highest level of hierarchy, and so on.  | validation: maxItems 6
                 - name: code | type: string | description: Subdivision short code.  | validation: maxLength 20
                 - name: name | type: string | description: Full subdivision name.  | validation: maxLength 100
                 - name: type | type: SubdivisionType | description: Subdivision level.  
                         - enum:
                         -     UNKNOWN_SUBDIVISION_TYPE: 
                         -     ADMINISTRATIVE_AREA_LEVEL_1: State.
                         -     ADMINISTRATIVE_AREA_LEVEL_2: County.
                         -     ADMINISTRATIVE_AREA_LEVEL_3: City/town.
                         -     ADMINISTRATIVE_AREA_LEVEL_4: Neighborhood/quarter.
                         -     ADMINISTRATIVE_AREA_LEVEL_5: Street/block.
                         -     COUNTRY: Equivalent to `ADMINISTRATIVE_AREA_LEVEL_0`. Indicates the national political entity, and is typically the highest order type returned by the Geocoder.
                 - name: typeInfo | type: string | description: Free text description of subdivision type. Examples: `"state"`, `"province"`, `"prefecture"`.  | validation: maxLength 100
              - name: subdivisionFullname | type: string | description: Subdivision full name.  | validation: maxLength 100
           - name: defaultAddress | type: boolean | description: Whether this address is the contact's default address. Only one address can be designated as default per contact. If no address is explicitly set as default, the first address automatically becomes the default.  
           - name: id | type: string | description: Address GUID.  | validation: format GUID
           - name: recipient | type: Recipient | description: Address recipient information for delivery purposes.  
              - name: firstName | type: string | description: Recipient's first name.  | validation: maxLength 1000
              - name: lastName | type: string | description: Recipient's last name.  | validation: maxLength 1000
              - name: company | type: string | description: Recipient's company name.  | validation: maxLength 1000
              - name: phone | type: string | description: Recipient's phone number.  | validation: minLength 1, maxLength 50
        - name: company | type: ContactCompany | description: Contact's company information including company name and job title.  
           - name: name | type: string | description: Contact's company name.  | validation: maxLength 1000
           - name: jobTitle | type: string | description: Contact's job title.  | validation: maxLength 1000
        - name: locale | type: string | description: Locale in [IETF BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format. Typically, this is a lowercase 2-letter language code, followed by a hyphen, followed by an uppercase 2-letter country code. For example, `en-US` for U.S. English, and `de-DE` for Germany German.  | validation: format LANGUAGE_TAG
        - name: birthdate | type: string | description: Birth date in `YYYY-MM-DD` format. For example, `2020-03-15`.  | validation: format LOCAL_DATE
        - name: timeZone | type: string | description: IANA time zone identifier for the contact's location. Valid values are IANA time zone GUIDs, such as 'Europe/Rome' or 'America/New_York'.  | validation: maxLength 50
        - name: assigneeId | type: string | description: Site contributor user GUID assigned to manage communication with this contact. Must be a valid GUGUID referencing an existing site contributor. Only one assignee can be set per contact.  | validation: format GUID
        - name: locationIds | type: array<string> | description: List of business location GUIDs associated with this contact. Used for multi-location businesses to organize contacts by physical business locations. Each GUID must be a valid GUGUID referencing an existing business location.  | validation: maxItems 50, format GUID
        - name: image | type: Image | description: Contact's profile image.  
           - name: id | type: string | description: Media Manager image GUID.  | validation: maxLength 255
           - name: url | type: string | description: Image URL. The URL is valid until the date in `urlExpirationDate`.  | validation: maxLength 2048
           - name: height | type: integer | description: Original image height.  
           - name: width | type: integer | description: Original image width.  
           - name: altText | type: string | description: Image alt text.  | validation: maxLength 100
           - name: urlExpirationDate | type: string | description: Image URL expiration date (when relevant).  | validation: format date-time
           - name: sizeInBytes | type: string | description: Image size in bytes.  | validation: format DECIMAL_VALUE, decimalValue {"gte":"0","maxScale":2}
        - name: source | type: ContactSource | description: Details about the origin of the contact. This field is immutable and set automatically when the contact is created.  | validation: immutable
           - name: userId | type: string | description: GUID of the user who created this contact.  | validation: format GUID, immutable
           - name: appId | type: string | description: GUID of the application that created this contact.  | validation: format GUID, immutable
           - name: additionalInfo | type: string | description: Additional information about the contact's origin or creation context.  | validation: maxLength 1000, immutable
        - name: lastActivity | type: ContactActivity | description: Details about the contact's most recent activity on the site. Includes activity date and template GUID. This field is read-only and updated automatically.  
           - name: date | type: string | description: Date and time when the contact's most recent activity occurred.  | validation: format date-time
           - name: templateId | type: string | description: GUID of the activity template that defines the type of activity performed. References a template in the contacts activity log system.  | validation: format GUID
        - name: segmentIds | type: array<string> | description: IDs of the segments the contact belongs to. Segments are used for organizing and targeting groups of contacts.  | validation: maxItems 60, format GUID
        - name: memberInfo | type: MemberInfo | description: Contact's site membership information including member GUID, status, and profile details. This field is read-only and populated automatically when the contact is also a site member.  Updates are eventually consistent: changes to the underlying member, identity, or profile are reflected after the corresponding events are processed.  
           - name: memberId | type: string | description: Member GUID.  | validation: format GUID
           - name: signupDate | type: string | description: Date and time the member signed up.  | validation: format date-time
           - name: email | type: string | description: Email the member uses to log in.  | validation: format EMAIL
           - name: emailVerified | type: boolean | description: Whether the email is verified.  
           - name: emailVerificationRequired | type: boolean | description: Whether the member is required to verify their email before they can log in.  
           - name: status | type: MemberStatus | description: Member status. - `PENDING`: Member created and is waiting for approval by site owner. - `ACTIVE`: Member can log in to the site. - `BLOCKED`: Member is blocked and cannot log in to the site. - `OFFLINE`: Member is a [managed writer](https://support.wix.com/en/article/wix-blog-adding-managed-writers-to-your-blog) for the site blog and cannot log in to the site.  
                 - enum: PENDING, ACTIVE, BLOCKED, OFFLINE
           - name: profileInfo | type: ProfileInfo | description: Information about the member's public profile.  
              - name: nickname | type: string | description: Member's nickname.  | validation: maxLength 255
              - name: privacyStatus | type: PrivacyStatus | description: Whether the member's profile is visible to other site members and visitors.  
                     - enum: PRIVATE, PUBLIC
              - name: reported | type: boolean | description: Whether the member has been reported by another member.  
              - name: muted | type: boolean | description: Whether the member has been muted and can't post or comment on the site.  
              - name: photo | type: Image | description: Member's profile photo.  
           - name: userInfo | type: UserInfo | description: Information about the member's user account.  
              - name: userId | type: string | description: User GUID.  | validation: format GUID
              - name: role | type: Role | description: Member's role on the site.  
                     - enum: OWNER, CONTRIBUTOR, MEMBER
           - name: sessionInfo | type: SessionInfo | description: Information about the member's login sessions.  
              - name: lastWebLogin | type: string | description: Date and time the member last logged in to the site from a browser.  | validation: format date-time
              - name: lastMobileLogin | type: string | description: Date and time the member last logged in from one of the mobile apps.  | validation: format date-time
              - name: mobileAppNames | type: array<string> | description: Mobile apps the member has ever logged in to.  | validation: maxItems 50, maxLength 50
           - name: groupInfo | type: GroupInfo | description: Information about the groups the member belongs to.  
              - name: groupIds | type: array<string> | description: IDs of the groups the member belongs to.  | validation: maxItems 1000, format GUID
        - name: tags | type: PrivateTags | description: Tags assigned to the contact for organization and filtering.  
           - name: privateTags | type: TagList | description: Tags that require an additional permission to access, normally not given to site members or visitors.  
              - name: tagIds | type: array<string> | description: A list of tag GUIDs. To create a tag, use the [Tags API](https://dev.wix.com/docs/api-reference/business-management/tags/introduction.md) with the contacts FQDN: `wix.contacts.*.contact`.  | validation: maxItems 1000, maxLength 5
        - name: extendedFields | type: ExtendedFields | description: Extended fields for storing custom contact data beyond the standard fields. Allows adding custom properties specific to business needs. To define a custom extended field, use the [Schema Service API](https://dev.wix.com/docs/api-reference/business-management/data-extension-schema/about-the-data-extension-schema-api.md) with the contacts FQDN: `wix.contacts.*.contact`.  
           - name: namespaces | type: object | description: Extended field data. Each key corresponds to the namespace of the app that created the extended fields. The value of each key is structured according to the schema defined when the extended fields were configured.  You can only access fields for which you have the appropriate permissions.  Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields.md).  | validation: format map
  - name: bulkActionMetadata | type: BulkActionMetadata | description: Metadata regarding the bulk restore operation.  
     - name: totalSuccesses | type: integer | description: Number of items that were successfully processed.  
     - name: totalFailures | type: integer | description: Number of items that couldn't be processed.  
     - name: undetailedFailures | type: integer | description: Number of failures without details because detailed failure threshold was exceeded.  


```

### Examples

### Restore contacts from the trash bin in bulk
Restores previously deleted contacts from the trash bin by contact IDs.

```curl
curl -X POST \
'https://www.wixapis.com/contacts/v5/bulk/contacts/trash-bin/restore' \
-H 'Authorization: <AUTH>' \
-H 'Content-Type: application/json' \
-d '{
  "contactIds": [
    "4b4f4016-7bf1-4334-86eb-b0bebdc3f7df"
  ],
  "returnEntity": true
}'
```

---

## JavaScript SDK

### Schema

```
 Method: wixClientAdmin.crm.contactsV5.bulkRestoreContactsFromTrashBin(options)
 Description: Restores multiple soft-deleted contacts from the trash bin.  To restore a single contact, call [Restore Contact From Trash Bin](https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/contacts-v5/restore-contact-from-trash-bin.md).
 Method parameters:
   param name: options | type: BulkRestoreContactsFromTrashBinOptions  none  
        - name: contactIds | type: array<string> | description: IDs of the contacts to restore from the trash bin.  | validation: minItems 1, maxItems 100, format GUID
        - name: returnEntity | type: boolean | description: Whether to include the restored contacts in the response.  
 Return type: PROMISE<BulkRestoreContactsFromTrashBinResponse>
  - name: results | type: array<BulkContactResult> | description: Results of the restore operation for each contact.  | validation: minItems 1, maxItems 100
     - name: itemMetadata | type: ItemMetadata | description: Metadata regarding the restoration of this specific contact.  
        - name: _id | type: string | description: Item GUID. Should always be available, unless it's impossible (for example, when failing to create an item).  | validation: format GUID
        - name: originalIndex | type: integer | description: Index of the item within the request array. Allows for correlation between request and response items.  
        - name: success | type: boolean | description: Whether the requested action was successful for this item. When `false`, the `error` field is populated.  
        - name: error | type: ApplicationError | description: Details about the error in case of failure.  
           - name: code | type: string | description: Error code.  
           - name: description | type: string | description: Description of the error.  
           - name: data | type: object | description: Data related to the error.  
     - name: item | type: Contact | description: Returned only when `returnEntity` is `true` in the request.  
        - name: _id | type: string | description: Contact GUID.  | validation: format GUID, immutable
        - name: revision | type: string | description: Revision number, which increments by 1 each time the Contact is updated. To prevent conflicting changes, the current revision must be passed when updating the Contact.  Ignored when creating a Contact.  | validation: format int64
        - name: _createdDate | type: Date | description: Date and time the contact was created.  | validation: immutable
        - name: _updatedDate | type: Date | description: Date and time the contact was last updated.  
        - name: externalId | type: string | description: Contact external GUID. Used to identify contacts from external systems. This field can only be set once and can't be updated after creation.  | validation: maxLength 100
        - name: name | type: ContactName | description: Contact's name information including first and last name.  
           - name: first | type: string | description: Contact's first name.  | validation: maxLength 1000
           - name: last | type: string | description: Contact's last name.  | validation: maxLength 1000
        - name: email | type: ContactEmail | description: The main email of the contact with subscription status and deliverability information. This email is used for contact matching and deduplication logic.  
           - name: email | type: string | description: Main email address for the contact. Used for communication and contact matching.  Stored in normalized form: leading and trailing whitespace is trimmed and the address is lowercased.  | validation: maxLength 320, format EMAIL
           - name: subscriptionStatus | type: ContactSubscription | description: Indicates the recipient's opt-in or opt-out status for marketing emails. This field is read-only and managed by the subscription system.  Updates are eventually consistent, reflecting marketing consent changes after they're processed.  
              - name: status | type: SubscriptionStatus | description: Indicates the recipient's opt-in or opt-out status for marketing communications.  - `NO_SUBSCRIPTION_STATUS`: No status exists. Used when a phone is not a valid E164 number. - `NOT_SET`: No subscription status specified. Default value. - `PENDING`: Subscription confirmation was requested, but recipient hasn't confirmed yet. - `SUBSCRIBED`: Recipient has explicitly opted in to receive marketing communications. - `UNSUBSCRIBED`: Recipient has opted out of marketing communications.  
                     - enum: NO_SUBSCRIPTION_STATUS, NOT_SET, PENDING, SUBSCRIBED, UNSUBSCRIBED
              - name: _updatedDate | type: Date | description: Date and time when the subscription status was last updated.  
           - name: deliverabilityStatus | type: EmailDeliverabilityStatus | description: Indicates the last reported delivery status of emails sent to this address. This field is read-only and updated automatically by the email delivery system.  - `NOT_SET`: No delivery status reported. Default value. - `VALID`: Emails are being successfully delivered to this address. - `BOUNCED`: The last email to this address bounced or was rejected by the recipient's email server. - `SPAM_COMPLAINT`: Recipient registered a spam complaint with their email provider. - `INACTIVE`: Multiple emails have been delivered without any engagement from the recipient.  
                 - enum: NOT_SET, VALID, BOUNCED, SPAM_COMPLAINT, INACTIVE
        - name: additionalEmails | type: array<AdditionalEmail> | description: Additional emails of the contact. These emails do not affect subscription status or contact matching/deduplication. The main email field must be set before additional emails can be added.  | validation: maxItems 10
           - name: email | type: string | description: Additional email address for the contact. Does not affect subscription status or contact matching logic.  | validation: maxLength 320, format EMAIL
        - name: phone | type: ContactPhone | description: The main phone of the contact with subscription status and deliverability information. This phone is used for contact matching and deduplication logic. At least one of name, email, or phone is required for contact creation.  
           - name: tag | type: PhoneTag | description: Phone type classification. Helps categorize the phone number's purpose.  Default: `OTHER`  
                 - enum: OTHER, MAIN, HOME, MOBILE, WORK, FAX
           - name: phone | type: string | description: Primary phone number for the contact. Used for communication and contact matching.  | validation: minLength 1, maxLength 50
           - name: e164 | type: string | description: Phone number in [ITU E.164 international](https://www.itu.int/rec/T-REC-E.164/) format (e.g., +12345550123). This field is automatically generated from the phone field if it represents a valid E.164 number.  | validation: maxLength 50
           - name: subscriptionStatus | type: ContactSubscription | description: Indicates the recipient's opt-in or opt-out status for SMS/text message marketing. This field is read-only and managed by the subscription system.  Updates are eventually consistent, reflecting marketing consent changes after they're processed.  
           - name: deliverabilityStatus | type: PhoneDeliverabilityStatus | description: Indicates the delivery status for SMS messages sent to this phone number. This field is read-only and updated automatically by the SMS delivery system. - `NO_PHONE_DELIVERABILITY_STATUS`: No status exists. Used when the phone is not a valid E164 number. - `NOT_SET`: No delivery status reported. Default when the phone is a valid E164 number. - `VALID`: Last message was sent and delivered successfully. - `INVALID`: The number is invalid (landline, number disconnected, etc.).  
                 - enum: NO_PHONE_DELIVERABILITY_STATUS, NOT_SET, VALID, INVALID
        - name: additionalPhones | type: array<AdditionalPhone> | description: Additional phones of the contact. These phones do not affect subscription status or contact matching/deduplication. The main phone field must be set before additional phones can be added.  | validation: maxItems 10
           - name: tag | type: PhoneTag | description: Phone type classification for the additional phone number.  Default: `OTHER`  
           - name: phone | type: string | description: Additional phone number for the contact. Does not affect subscription status or contact matching logic.  | validation: minLength 1, maxLength 50
           - name: e164 | type: string | description: Additional phone number in [ITU E.164 international](https://www.itu.int/rec/T-REC-E.164/) format (e.g., +12345550123). This field is automatically generated from the phone field if it represents a valid E.164 number.  | validation: maxLength 50
        - name: addresses | type: array<ContactAddress> | description: Contact's physical addresses. Each address can be tagged (HOME, WORK, BILLING, SHIPPING, OTHER) and one can be set as default. If no address is marked as default, the first address automatically becomes the default.  | validation: maxItems 50
           - name: tag | type: AddressTag | description: Address type classification. Helps categorize the address purpose.  Default: `OTHER`  
                 - enum: OTHER, HOME, WORK, BILLING, SHIPPING
           - name: address | type: Address | description: Physical address information including street, city, country, and postal code. Contains structured address data following common address formatting standards.  
              - name: city | type: string | description: none  
              - name: subdivision | type: string | description: none  
              - name: country | type: string | description: none  
              - name: postalCode | type: string | description: none  
              - name: addressLine1 | type: string | description: none  
              - name: addressLine2 | type: string | description: none  
           - name: defaultAddress | type: boolean | description: Whether this address is the contact's default address. Only one address can be designated as default per contact. If no address is explicitly set as default, the first address automatically becomes the default.  
           - name: _id | type: string | description: Address GUID.  | validation: format GUID
           - name: recipient | type: Recipient | description: Address recipient information for delivery purposes.  
              - name: firstName | type: string | description: Recipient's first name.  | validation: maxLength 1000
              - name: lastName | type: string | description: Recipient's last name.  | validation: maxLength 1000
              - name: company | type: string | description: Recipient's company name.  | validation: maxLength 1000
              - name: phone | type: string | description: Recipient's phone number.  | validation: minLength 1, maxLength 50
        - name: company | type: ContactCompany | description: Contact's company information including company name and job title.  
           - name: name | type: string | description: Contact's company name.  | validation: maxLength 1000
           - name: jobTitle | type: string | description: Contact's job title.  | validation: maxLength 1000
        - name: locale | type: string | description: Locale in [IETF BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format. Typically, this is a lowercase 2-letter language code, followed by a hyphen, followed by an uppercase 2-letter country code. For example, `en-US` for U.S. English, and `de-DE` for Germany German.  | validation: format LANGUAGE_TAG
        - name: birthdate | type: string | description: Birth date in `YYYY-MM-DD` format. For example, `2020-03-15`.  | validation: format LOCAL_DATE
        - name: timeZone | type: string | description: IANA time zone identifier for the contact's location. Valid values are IANA time zone GUIDs, such as 'Europe/Rome' or 'America/New_York'.  | validation: maxLength 50
        - name: assigneeId | type: string | description: Site contributor user GUID assigned to manage communication with this contact. Must be a valid GUGUID referencing an existing site contributor. Only one assignee can be set per contact.  | validation: format GUID
        - name: locationIds | type: array<string> | description: List of business location GUIDs associated with this contact. Used for multi-location businesses to organize contacts by physical business locations. Each GUID must be a valid GUGUID referencing an existing business location.  | validation: maxItems 50, format GUID
        - name: image | type: string | description: Contact's profile image.  
        - name: source | type: ContactSource | description: Details about the origin of the contact. This field is immutable and set automatically when the contact is created.  | validation: immutable
           - name: userId | type: string | description: GUID of the user who created this contact.  | validation: format GUID, immutable
           - name: appId | type: string | description: GUID of the application that created this contact.  | validation: format GUID, immutable
           - name: additionalInfo | type: string | description: Additional information about the contact's origin or creation context.  | validation: maxLength 1000, immutable
        - name: lastActivity | type: ContactActivity | description: Details about the contact's most recent activity on the site. Includes activity date and template GUID. This field is read-only and updated automatically.  
           - name: date | type: Date | description: Date and time when the contact's most recent activity occurred.  
           - name: templateId | type: string | description: GUID of the activity template that defines the type of activity performed. References a template in the contacts activity log system.  | validation: format GUID
        - name: segmentIds | type: array<string> | description: IDs of the segments the contact belongs to. Segments are used for organizing and targeting groups of contacts.  | validation: maxItems 60, format GUID
        - name: memberInfo | type: MemberInfo | description: Contact's site membership information including member GUID, status, and profile details. This field is read-only and populated automatically when the contact is also a site member.  Updates are eventually consistent: changes to the underlying member, identity, or profile are reflected after the corresponding events are processed.  
           - name: memberId | type: string | description: Member GUID.  | validation: format GUID
           - name: signupDate | type: Date | description: Date and time the member signed up.  
           - name: email | type: string | description: Email the member uses to log in.  | validation: format EMAIL
           - name: emailVerified | type: boolean | description: Whether the email is verified.  
           - name: emailVerificationRequired | type: boolean | description: Whether the member is required to verify their email before they can log in.  
           - name: status | type: MemberStatus | description: Member status. - `PENDING`: Member created and is waiting for approval by site owner. - `ACTIVE`: Member can log in to the site. - `BLOCKED`: Member is blocked and cannot log in to the site. - `OFFLINE`: Member is a [managed writer](https://support.wix.com/en/article/wix-blog-adding-managed-writers-to-your-blog) for the site blog and cannot log in to the site.  
                 - enum: PENDING, ACTIVE, BLOCKED, OFFLINE
           - name: profileInfo | type: ProfileInfo | description: Information about the member's public profile.  
              - name: nickname | type: string | description: Member's nickname.  | validation: maxLength 255
              - name: privacyStatus | type: PrivacyStatus | description: Whether the member's profile is visible to other site members and visitors.  
                     - enum: PRIVATE, PUBLIC
              - name: reported | type: boolean | description: Whether the member has been reported by another member.  
              - name: muted | type: boolean | description: Whether the member has been muted and can't post or comment on the site.  
              - name: photo | type: string | description: Member's profile photo.  
           - name: userInfo | type: UserInfo | description: Information about the member's user account.  
              - name: userId | type: string | description: User GUID.  | validation: format GUID
              - name: role | type: Role | description: Member's role on the site.  
                     - enum: OWNER, CONTRIBUTOR, MEMBER
           - name: sessionInfo | type: SessionInfo | description: Information about the member's login sessions.  
              - name: lastWebLogin | type: Date | description: Date and time the member last logged in to the site from a browser.  
              - name: lastMobileLogin | type: Date | description: Date and time the member last logged in from one of the mobile apps.  
              - name: mobileAppNames | type: array<string> | description: Mobile apps the member has ever logged in to.  | validation: maxItems 50, maxLength 50
           - name: groupInfo | type: GroupInfo | description: Information about the groups the member belongs to.  
              - name: groupIds | type: array<string> | description: IDs of the groups the member belongs to.  | validation: maxItems 1000, format GUID
        - name: tags | type: PrivateTags | description: Tags assigned to the contact for organization and filtering.  
           - name: privateTags | type: TagList | description: Tags that require an additional permission to access, normally not given to site members or visitors.  
              - name: tagIds | type: array<string> | description: A list of tag GUIDs. To create a tag, use the [Tags API](https://dev.wix.com/docs/api-reference/business-management/tags/introduction.md) with the contacts FQDN: `wix.contacts.*.contact`.  | validation: maxItems 1000, maxLength 5
        - name: extendedFields | type: ExtendedFields | description: Extended fields for storing custom contact data beyond the standard fields. Allows adding custom properties specific to business needs. To define a custom extended field, use the [Schema Service API](https://dev.wix.com/docs/api-reference/business-management/data-extension-schema/about-the-data-extension-schema-api.md) with the contacts FQDN: `wix.contacts.*.contact`.  
           - name: namespaces | type: object | description: Extended field data. Each key corresponds to the namespace of the app that created the extended fields. The value of each key is structured according to the schema defined when the extended fields were configured.  You can only access fields for which you have the appropriate permissions.  Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields.md).  | validation: format map
  - name: bulkActionMetadata | type: BulkActionMetadata | description: Metadata regarding the bulk restore operation.  
     - name: totalSuccesses | type: integer | description: Number of items that were successfully processed.  
     - name: totalFailures | type: integer | description: Number of items that couldn't be processed.  
     - name: undetailedFailures | type: integer | description: Number of failures without details because detailed failure threshold was exceeded.  


```

### Examples

### Restore contacts from the trash bin in bulk
```javascript
import { contactsV5 } from "@wix/crm";

const options = {
  contactIds: ["5d7608ee-9198-4ee1-a045-cc72e9cc6cb9"],
  returnEntity: true,
};

async function bulkRestoreContactsFromTrashBin() {
  const response = await contactsV5.bulkRestoreContactsFromTrashBin(options);
}

/* Promise resolves to:
 * {
 *   "results": [
 *     {
 *       "itemMetadata": {
 *         "originalIndex": 0,
 *         "success": true,
 *         "_id": "5d7608ee-9198-4ee1-a045-cc72e9cc6cb9"
 *       },
 *       "item": {
 *         "revision": "3",
 *         "name": { "first": "Owen", "last": "Carter" },
 *         "company": { "name": "ExampleCo", "jobTitle": "Sales Director" },
 *         "_id": "5d7608ee-9198-4ee1-a045-cc72e9cc6cb9"
 *       }
 *     }
 *   ],
 *   "bulkActionMetadata": {
 *     "totalSuccesses": 1,
 *     "totalFailures": 0,
 *     "undetailedFailures": 0
 *   }
 * }
 */

```

### bulkRestoreContactsFromTrashBin (self-hosted)
Self-hosted SDK calls require you to [create a client](https://dev.wix.com/docs/sdk/articles/work-with-the-sdk/about-the-wix-client.md).

```javascript
import { createClient } from '@wix/sdk';
import { contactsV5 } from '@wix/crm';
// Import the auth strategy for the relevant access type
// Import the relevant host module if needed

const myWixClient = createClient ({
  modules: { contactsV5 },
  // Include the auth strategy and host as relevant
});


async function bulkRestoreContactsFromTrashBin(options) {
  const response = await myWixClient.contactsV5.bulkRestoreContactsFromTrashBin(options);
};
```

---