> ## 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

This endpoint can be used to create a new URL configuration that can then be programmed into multiple tags.

## Defining 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}**/?enc=**\{enc}**\&cmac=**\{cmac}**\&eCode=**\{eCode}**
  </Tab>

  <Tab title="Tag generated URL">
    htt<span>ps\://</span>exmaple.com/**1**/?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}**

## Headers

<ParamField header="API-Key" placeholder="Your Private API Key" type="string" required>
  Your organization's private API key.
</ParamField>

## JSON Request Body

<ParamField body="name" placeholder="Example" type="string" required>
  The name of your custom URL group.
</ParamField>

<ParamField body="customUrl" placeholder="https://example.com/{tagId}/?enc={enc}&cmac={cmac}&eCode={eCode}" type="string" required>
  The custom URL definition that will be programmed into the tags.
</ParamField>

<ParamField body="appName" placeholder="My Website" type="string" required>
  This is the service that's used to add the custom URL.
  The custom URL group will show up in the programmer as \[APP Name] - Name.
</ParamField>

<ResponseExample>
  ```json Created Successfully theme={null}
  {
  	success: true,
  	err: '',
  	group: {
  		name: "New Group",
  		appName: "ETRNL",
          organizationId: 33,
          creationDate: "2023-09-26T18:44:59.000Z",
  		customUrl: "https://example.com/{tagId}/?enc={enc}&cmac={cmac}&eCode={eCode}"
  	}
  }
  ```
</ResponseExample>
