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

# Create an external URL group

## Overview

External URL groups are objects that tell ETRNL the URLs that should be embedded into the tags.
These typically represent products and point your tags to the page on your own website where the product information can be displayed.
The URL groups allow you to program many tags that point to your product's details page and collect useful analytics on these products.

### Use cases

External URL Groups can only be created through our [API](/api-reference/endpoints/url-groups/create) because this process is intended to be automated.
For example; every time you create a product within your website's CMS, you could automate the creation of the corresponding URL group within ETRNL using the API.

### Steps

<Steps>
  <Step title="Define the external URL" />

  <Step title="POST to the API" />
</Steps>

## Define the URL

A custom URL can be defined by writing out your URL and wrapping 4 of the required parameters in curly braces "**\{}**".

### Custom URL Params

* **tagId** - The ETRNL unique ID of the tag
* **enc** - The encrypted message generated by the tag
* **cmac** - he CMAC integrity data generated by the tag *(Only required if tamper detection is **not** enabled)*
* **tt** - The encrypted tag tamper status generated by the tag. *(Only required if tamper detection is enabled)*
* **eCode** - A KDF input parameter used for key decyrption

### Examples

<Tabs>
  <Tab title="Custom URL">
    htt<span>ps\://</span>exmaple.com/?tagId=**\{tagId}**\&enc=**\{enc}**\&cmac=**\{cmac}**\&eCode=**\{eCode}**
  </Tab>

  <Tab title="Tag generated URL">
    htt<span>ps\://</span>exmaple.com/?tagId=**1234**\&enc=**C038A76FAB26F1FBBBDA23FC0904C10A**\&cmac=**E064A56067FB63F8**\&eCode=**B08CF3C4910833F226A260D397CAB992**
  </Tab>
</Tabs>

<br />

<Warning>
  The custom URL params can only be used as a query parameter, or a URL slug.
</Warning>

#### Tag Tamper

For tag tamper URLs, you cannot include the cmac value as the tt message includes both the cmac and the encrypted tamper status.

So the custom URL would look something like:

htt<span>ps\://</span>exmaple.com/**\{tagId}**/?enc=**\{enc}**\&tt=**\{tt}**\&eCode=**\{eCode}**

## POST to the API

Once you have your custom URL defined, you can **POST** to the **/v1/url-groups** endpoint to create the group in ETRNL.

### Params

* **appName** - This is the name of the application used to create the URL Group (example: Salesforce Site)
* **name** - The name of the product you want to authenticate
* **customUrl** - The custom URL format

<Tabs>
  <Tab title="Request body">
    ```json theme={null}
    {
    	appName: "Salesforce Site",
    	name: "Invisible T-Shirt",
    	customUrl: "https://example.com/?tagId={tagId}&enc={enc}&cmac={cmac}&eCode={eCode}"
    }
    ```
  </Tab>

  <Tab title="Response">
    ```json theme={null}
    {
    	success: true,
    	err: '',
    	group: {
    		name: "Invisible T-Shirt",
    		appName: "Salesforce Site",
    		organizationId: 123,
    		creationDate: "2023-09-26T18:44:59.000Z",
    		customUrl: "https://example.com/?tagId={tagId}&enc={enc}&cmac={cmac}&eCode={eCode}"
    	}
    }
    ```
  </Tab>
</Tabs>

<Note>
  Code examples to send the POST request can be found on the [API](/api-reference/endpoints/url-groups/create) page in multiple programming languages.
</Note>

You will now see the URL group in the programmer with the app name as the prefix.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/invisibleartllc/example/images/screenshots/url-group-programmer-name.png" />
</Frame>
