> To build or manage a Wix site with an AI agent, follow https://www.wix.com/headless/skill.md
> It builds a new Wix site or puts your own site online, from a prompt, and keeps changing it afterwards. The pages are code in any web technology, and Wix runs the backend.
> It works through the Wix plugin (the Wix MCP and the Wix skills), the Wix CLI or no Wix login, and puts the site live on Wix hosting or on another host.
> Business features include a store, bookings, events and tickets, a restaurant, a blog, forms, members and many more.
> Read the Wix skills online at https://www.wix.com/skills
> 
> 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`).
> - If a reference page seems to be missing its schema (parameters, return types, or type definitions), append `?schema=true` to its `.md` URL (e.g. `https://dev.wix.com/docs/contexts/contexts/stores/category-info/use-category-info-context.md?schema=true`).
> - Top-level index of all portals: https://dev.wix.com/docs/llms.txt
> - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt

# ListTemplates

# Package: activityLog

# Namespace: Templates

# Method link: https://dev.wix.com/docs/api-reference/crm/members-contacts/contacts/activity-log/template-v1/list-templates.md

## Permission Scopes:
Read Contacts: SCOPE.DC-CONTACTS.READ-CONTACTS

## Introduction

Retrieves available activity templates.

Use this method to browse the templates that Wix uses to record activities automatically. Retrieve template details such as `activityDescription` and `icon` to enrich the display of activities in a contact's log. Use `categoryId` to filter templates by category.

To learn about cursor paging, see [Sorting and Paging](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-sorting-and-paging.md).

---

## REST API

### Schema

```
 Method: listTemplates
 Description: Retrieves available activity templates.  Use this method to browse the templates that Wix uses to record activities automatically. Retrieve template details such as `activityDescription` and `icon` to enrich the display of activities in a contact's log. Use `categoryId` to filter templates by category.  To learn about cursor paging, see [Sorting and Paging](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-sorting-and-paging.md).
 URL: https://www.wixapis.com/crm/contacts-activity-log/v1/templates
 Method: GET
 Method parameters:
   query param name: categoryId | type: categoryId | description: GUID of a category to filter templates by. Can't be used together with `cursorPaging`.  | validation: format GUID
   param name: cursorPaging | type: CursorPaging    
        - name: limit | type: integer | description: Number of items to load.  | validation: minimum 0, maximum 100, format int32
        - name: cursor | type: string | description: Pointer to the next or previous page in the list of results.  You can get the relevant cursor token from the `pagingMetadata` object in the previous call's response. Not relevant for the first request.  | validation: maxLength 16000
   query param name: language | type: language | description: 2-letter language code in ISO 639-1 alpha-2 format. Determines the language of translated fields (`activityDescription`).  Default: Language from the request context, or `en`.  | validation: format LANGUAGE
 Return type: ListTemplatesResponse
  - name: templates | type: array<Template> | description: Retrieved templates.  
     - name: id | type: string | description: Template GUID.  | validation: format GUID
     - name: name | type: string | description: Template display name. Not translated.  | validation: minLength 1, maxLength 100
     - name: activityDescription | type: string | description: Translated description of what the template records, without parameter placeholders. Returned in the language specified by the `language` parameter.  Not present for all templates.  | validation: maxLength 1000
     - name: icon | type: Icon | description: Template icon. Use `icon.url` to display the icon image.  
        - name: name | type: string | description: Icon name, used as a reference identifier for the icon.  | validation: maxLength 50
        - name: url | type: string | description: Icon image URL. Display this image to represent the template.  | validation: format WEB_URL
     - name: categoryId | type: string | description: GUID of the category this template belongs to.  | validation: format GUID
     - name: updatedDate | type: string | description: Date and time the template was last updated.  | validation: format date-time
     - name: activityParams | type: array<ActivityParam> | description: Parameters that define what values are used to compose the activity's message. Each parameter key corresponds to a key in `activity.params` for activities created from this template.  | validation: maxItems 50
        - name: key | type: string | description: Parameter key, in camelCase format. Used to identify the parameter and as a placeholder in the template's message.  | validation: minLength 1, maxLength 100
        - name: displayName | type: string | description: Parameter display name.  | validation: minLength 1, maxLength 50
        - name: required | type: boolean | description: Whether the parameter is required. When `true`, activities created from this template always include a value for this parameter in `activity.params`.  Default: `false`  
        - name: pii | type: boolean | description: Whether the parameter value contains personally identifiable information (PII). When `true`, the parameter value is anonymized if the contact's data is erased through a GDPR request.  Default: `false`  
        - name: type | type: ParamType | description: Parameter type.  
             - enum:
             -     STRING: A plain text value.
             -     DATE: A date value.
             -     NUMBER: A numeric value.
             -     CURRENCY: A JSON object in the format `{ "currency": "<code>", "amount": <decimal> }`.
             -     JSON: A JSON object.
        - name: defaultValue | type: Value | description: Default value for this parameter, used when no value is supplied for the parameter.  
           - ONE-OF: 
              - name: nullValue | type:  | description:   
              - name: numberValue | type: number | description:   
              - name: stringValue | type: string | description:   
              - name: boolValue | type: boolean | description:   
              - name: structValue | type: object | description:   
              - name: listValue | type: ListValue | description:   
                 - name: values | type: array<Value> | description:   
     - name: links | type: array<Link> | description: Optional structured links associated with the template. A link's `key` can appear as a Mustache-style placeholder in the template's message, embedding the link in the rendered activity message.  | validation: maxItems 2
        - name: key | type: string | description: Link identifier, in camelCase format. For example, `invoiceLink`. Can appear as a placeholder in the template's message, embedding this link in the rendered activity message.  | validation: minLength 1, maxLength 100
        - name: url | type: string | description: Link URL. Can contain Mustache-style placeholders using parameter keys. For example, `https://manage.wix.com/dashboard/{{siteId}}/store/orders/order/{{orderId}}`.  | validation: minLength 1, maxLength 1000
        - name: description | type: string | description: Link description.  | validation: minLength 1, maxLength 100
  - name: metadata | type: PagingMetadataV2 | description: Paging metadata, including a `next` cursor for retrieving the next page of results.  
     - name: count | type: integer | description: Number of items returned in the response.  | validation: format int32
     - name: offset | type: integer | description: Offset that was requested.  | validation: format int32
     - name: total | type: integer | description: Total number of items that match the request. Returned when offset paging is used and `tooManyToCount` is `false`.  | validation: format int32
     - name: tooManyToCount | type: boolean | description: Whether the server failed to calculate `total`. If `true`, `total` is omitted.  
     - name: cursors | type: Cursors | description: Cursors for navigating between result pages. Returned when cursor paging is used.  
        - name: next | type: string | description: Cursor for the next page of results. Pass this value in `cursorPaging.cursor` to retrieve the next page.  | validation: maxLength 16000
        - name: prev | type: string | description: Cursor for the previous page of results.  | validation: maxLength 16000


```

### Examples

### List templates by category
Retrieve activity templates in the Bookings category, returned with English descriptions.

```curl
curl -X GET \
'https://www.wixapis.com/crm/contacts-activity-log/v1/templates?categoryId=939d4361-6f56-4be7-ac58-415667ca09a7&language=en' \
-H 'Authorization: <AUTH>'
```

---

## JavaScript SDK

### Schema

```
 Method: wixClientAdmin.contactsActivityLogTemplates.contactsActivityLogTemplates.listTemplates(options)
 Description: Retrieves available activity templates.  Use this method to browse the templates that Wix uses to record activities automatically. Retrieve template details such as `activityDescription` and `icon` to enrich the display of activities in a contact's log. Use `categoryId` to filter templates by category.  To learn about cursor paging, see [Sorting and Paging](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-sorting-and-paging.md).
 Method parameters:
   param name: options | type: ListTemplatesOptions  none  
        - name: cursorPaging | type: CursorPaging | description: Cursor token for retrieving subsequent pages. Pass `metadata.cursors.next` from the previous response. When providing a cursor, don't pass `categoryId`.  
           - name: limit | type: integer | description: Number of items to load.  | validation: minimum 0, maximum 100, format int32
           - name: cursor | type: string | description: Pointer to the next or previous page in the list of results.  You can get the relevant cursor token from the `pagingMetadata` object in the previous call's response. Not relevant for the first request.  | validation: maxLength 16000
        - name: categoryId | type: string | description: GUID of a category to filter templates by. Can't be used together with `cursorPaging`.  | validation: format GUID
        - name: language | type: string | description: 2-letter language code in ISO 639-1 alpha-2 format. Determines the language of translated fields (`activityDescription`).  Default: Language from the request context, or `en`.  | validation: format LANGUAGE
 Return type: PROMISE<ListTemplatesResponse>
  - name: templates | type: array<Template> | description: Retrieved templates.  
     - name: _id | type: string | description: Template GUID.  | validation: format GUID
     - name: name | type: string | description: Template display name. Not translated.  | validation: minLength 1, maxLength 100
     - name: activityDescription | type: string | description: Translated description of what the template records, without parameter placeholders. Returned in the language specified by the `language` parameter.  Not present for all templates.  | validation: maxLength 1000
     - name: icon | type: Icon | description: Template icon. Use `icon.url` to display the icon image.  
        - name: name | type: string | description: Icon name, used as a reference identifier for the icon.  | validation: maxLength 50
        - name: url | type: string | description: Icon image URL. Display this image to represent the template.  | validation: format WEB_URL
     - name: categoryId | type: string | description: GUID of the category this template belongs to.  | validation: format GUID
     - name: _updatedDate | type: Date | description: Date and time the template was last updated.  
     - name: activityParams | type: array<ActivityParam> | description: Parameters that define what values are used to compose the activity's message. Each parameter key corresponds to a key in `activity.params` for activities created from this template.  | validation: maxItems 50
        - name: key | type: string | description: Parameter key, in camelCase format. Used to identify the parameter and as a placeholder in the template's message.  | validation: minLength 1, maxLength 100
        - name: displayName | type: string | description: Parameter display name.  | validation: minLength 1, maxLength 50
        - name: required | type: boolean | description: Whether the parameter is required. When `true`, activities created from this template always include a value for this parameter in `activity.params`.  Default: `false`  
        - name: pii | type: boolean | description: Whether the parameter value contains personally identifiable information (PII). When `true`, the parameter value is anonymized if the contact's data is erased through a GDPR request.  Default: `false`  
        - name: type | type: ParamType | description: Parameter type.  
             - enum:
             -     STRING: A plain text value.
             -     DATE: A date value.
             -     NUMBER: A numeric value.
             -     CURRENCY: A JSON object in the format `{ "currency": "<code>", "amount": <decimal> }`.
             -     JSON: A JSON object.
        - name: defaultValue | type: Value | description: Default value for this parameter, used when no value is supplied for the parameter.  
           - ONE-OF: 
              - name: nullValue | type:  | description:   
              - name: numberValue | type: number | description:   
              - name: stringValue | type: string | description:   
              - name: boolValue | type: boolean | description:   
              - name: structValue | type: object | description:   
              - name: listValue | type: ListValue | description:   
                 - name: values | type: array<Value> | description:   
     - name: links | type: array<Link> | description: Optional structured links associated with the template. A link's `key` can appear as a Mustache-style placeholder in the template's message, embedding the link in the rendered activity message.  | validation: maxItems 2
        - name: key | type: string | description: Link identifier, in camelCase format. For example, `invoiceLink`. Can appear as a placeholder in the template's message, embedding this link in the rendered activity message.  | validation: minLength 1, maxLength 100
        - name: url | type: string | description: Link URL. Can contain Mustache-style placeholders using parameter keys. For example, `https://manage.wix.com/dashboard/{{siteId}}/store/orders/order/{{orderId}}`.  | validation: minLength 1, maxLength 1000
        - name: description | type: string | description: Link description.  | validation: minLength 1, maxLength 100
  - name: metadata | type: PagingMetadataV2 | description: Paging metadata, including a `next` cursor for retrieving the next page of results.  
     - name: count | type: integer | description: Number of items returned in the response.  | validation: format int32
     - name: offset | type: integer | description: Offset that was requested.  | validation: format int32
     - name: total | type: integer | description: Total number of items that match the request. Returned when offset paging is used and `tooManyToCount` is `false`.  | validation: format int32
     - name: tooManyToCount | type: boolean | description: Whether the server failed to calculate `total`. If `true`, `total` is omitted.  
     - name: cursors | type: Cursors | description: Cursors for navigating between result pages. Returned when cursor paging is used.  
        - name: next | type: string | description: Cursor for the next page of results. Pass this value in `cursorPaging.cursor` to retrieve the next page.  | validation: maxLength 16000
        - name: prev | type: string | description: Cursor for the previous page of results.  | validation: maxLength 16000


```

### Examples

### List templates
Retrieve activity templates filtered by category in English.

```javascript
import { wixCrmContactsActivityLogV1Template } from "@wix/dev";

async function listTemplates() {
  const response = await wixCrmContactsActivityLogV1Template.listTemplates({
    categoryId: "939d4361-6f56-4be7-ac58-415667ca09a7",
    language: "en",
  });
}

/* Promise resolves to:
 * {
 *   "templates": [
 *     {
 *       "_id": "43dd6712-fbe0-4e99-a3b4-38f9c10ae05f",
 *       "name": "Bookings canceled booking",
 *       "activityDescription": "Canceled a session",
 *       "icon": {
 *         "name": "WixBooking",
 *         "url": "https://wixmp-8be454c954980f083caba37c.wixmp.com/activity-log/WixBooking.png"
 *       },
 *       "categoryId": "939d4361-6f56-4be7-ac58-415667ca09a7",
 *       "_updatedDate": "2026-01-20T09:48:17.198Z",
 *       "activityParams": [
 *         {
 *           "key": "activity_key",
 *           "displayName": "activity_key",
 *           "required": false,
 *           "pii": false,
 *           "type": "STRING",
 *           "defaultValue": "last.activity.text.canceled.booking"
 *         },
 *         {
 *           "key": "ServiceTitle",
 *           "displayName": "ServiceTitle",
 *           "required": false,
 *           "pii": false,
 *           "type": "STRING"
 *         },
 *         {
 *           "key": "StartDate",
 *           "displayName": "StartDate",
 *           "required": false,
 *           "pii": false,
 *           "type": "DATE"
 *         },
 *         {
 *           "key": "ContactId",
 *           "displayName": "ContactId",
 *           "required": false,
 *           "pii": false,
 *           "type": "STRING"
 *         },
 *         {
 *           "key": "metaSiteId",
 *           "displayName": "metaSiteId",
 *           "required": true,
 *           "pii": false,
 *           "type": "STRING"
 *         }
 *       ],
 *       "links": [
 *         {
 *           "key": "BookingsTab_link",
 *           "url": "https://manage.wix.com/dashboard/{{metaSiteId}}/app/74bff718-5977-47f2-9e5f-a9fd0047fd1f/view/{{ContactId}}?tab_name=bookings"
 *         }
 *       ]
 *     }
 *   ],
 *   "metadata": {
 *     "count": 1,
 *     "cursors": {}
 *   }
 * }
 */

```

### listTemplates (self-managed)
Self-managed 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 { contactsActivityLogTemplates } from '@wix/contacts-activity-log-templates';
// Import the auth strategy for the relevant access type
// Import the relevant host module if needed

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


async function listTemplates(options) {
  const response = await myWixClient.contactsActivityLogTemplates.listTemplates(options);
};
```

---