> 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

# GetIdentitiesSchema

# Package: triggers

# Namespace: TriggerCatalogService

# Method link: https://dev.wix.com/docs/api-reference/business-management/automations/triggers/trigger-catalog/get-identities-schema.md

## Permission Scopes:
Set Up Automations: SCOPE.CRM.SETUP-AUTOMATIONS

## Introduction

Retrieves the schema of the identity types that triggers can reference.

When a trigger's payload schema annotates a field with an identity type, such as `contact` or `member`, Wix can enrich the payload with that identity's fields. This method returns an object whose top-level keys are the supported identity types, each containing that identity's field schema. Use it to map identity fields when you display or configure an automation.

---

## REST API

### Schema

```
 Method: getIdentitiesSchema
 Description: Retrieves the schema of the identity types that triggers can reference.  When a trigger's payload schema annotates a field with an identity type, such as `contact` or `member`, Wix can enrich the payload with that identity's fields. This method returns an object whose top-level keys are the supported identity types, each containing that identity's field schema. Use it to map identity fields when you display or configure an automation.
 URL: https://www.wixapis.com/v1/triggers/identities_schema
 Method: POST
 Return type: GetIdentitiesSchemaResponse
  - name: identitiesSchema | type: object | description: Schema of the supported identity types.  The top-level keys are identity-type names, such as `contact` and `member`, and each value is the field schema for that identity type. All payload fields enriched with the same identity type share that type's schema. For example:  { "type": "object", "properties": { "contact": { "type": "object", "properties": { ... } }, "member": { "type": "object", "properties": { ... } } } }  


```

### Examples

### Get the identities schema
```curl
curl -X POST 'https://www.wixapis.com/v1/triggers/identities_schema' \
    -H 'Authorization: <AUTH>' \
    -H 'Content-Type: application/json'
```

---

## JavaScript SDK

### Schema

```
 Method: wixClientAdmin.automations.triggerCatalog.getIdentitiesSchema()
 Description: Retrieves the schema of the identity types that triggers can reference.  When a trigger's payload schema annotates a field with an identity type, such as `contact` or `member`, Wix can enrich the payload with that identity's fields. This method returns an object whose top-level keys are the supported identity types, each containing that identity's field schema. Use it to map identity fields when you display or configure an automation.
 Return type: PROMISE<GetIdentitiesSchemaResponse>
  - name: identitiesSchema | type: object | description: Schema of the supported identity types.  The top-level keys are identity-type names, such as `contact` and `member`, and each value is the field schema for that identity type. All payload fields enriched with the same identity type share that type's schema. For example:  { "type": "object", "properties": { "contact": { "type": "object", "properties": { ... } }, "member": { "type": "object", "properties": { ... } } } }  


```

### Examples

### Get the identities schema
Retrieves the schema of the identity types (such as contact and member) that triggers can reference.

```javascript
import { triggerCatalog } from "@wix/automations";

async function getIdentitiesSchema() {
  const response = await triggerCatalog.getIdentitiesSchema();
  return response;
}

/* Promise resolves to:
 * {
 *   "identitiesSchema": {
 *     "type": "object",
 *     "properties": {
 *       "contact": {
 *         "type": "object",
 *         "title": "Contact",
 *         "properties": {
 *           "contactId": { "type": "string", "format": "uuid", "title": "Contact ID" },
 *           "email": { "type": "string", "title": "Email" },
 *           "firstName": { "type": "string", "title": "First name" },
 *           "lastName": { "type": "string", "title": "Last name" }
 *         }
 *       },
 *       "member": {
 *         "type": "object",
 *         "title": "Member",
 *         "properties": {
 *           "memberId": { "type": "string", "format": "uuid", "title": "Member ID" },
 *           "loginEmail": { "type": "string", "title": "Login email" },
 *           "nickname": { "type": "string", "title": "Nickname" }
 *         }
 *       }
 *     }
 *   }
 * }
 */

```

### getIdentitiesSchema (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 { triggerCatalog } from '@wix/automations';
// Import the auth strategy for the relevant access type
// Import the relevant host module if needed

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


async function getIdentitiesSchema() {
  const response = await myWixClient.triggerCatalog.getIdentitiesSchema();
};
```

---