Create Link Tracking Profile
POST
/api/v1/workspaces/{workspace_id}/link_tracking_profiles
const url = 'https://example.com/%7B%7Bapp_url%7D/api/v1/workspaces/1/link_tracking_profiles';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"name":"My Link Tracking Profile","parameters":[{"type":"fixed_value","parameter":"utm_source","value":"newsletter","label":"example","hint":"example"}],"custom_template":"{{ url }}"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/%7B%7Bapp_url%7D/api/v1/workspaces/1/link_tracking_profiles \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "name": "My Link Tracking Profile", "parameters": [ { "type": "fixed_value", "parameter": "utm_source", "value": "newsletter", "label": "example", "hint": "example" } ], "custom_template": "{{ url }}" }'Creates a new Link Tracking Profile.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”workspace_id
required
integer
Workspace ID
Request Body
Section titled “Request Body”Media typeapplication/json
object
name
required
string
Example
My Link Tracking Profileparameters
required
Array
One of:
object
type
required
string
parameter
required
The URL query parameter name.
string
Example
utm_sourcevalue
required
The fixed value for this parameter.
string
Example
newsletterlabel
string | null
hint
string | null
object
type
required
string
parameter
required
The URL query parameter name.
string
Example
utm_sourcelabel
string | null
hint
string | null
object
type
required
string
parameter
required
The URL query parameter name.
string
Example
utm_sourcelabel
string | null
hint
string | null
object
type
required
string
parameter
required
The URL query parameter name.
string
Example
utm_sourcelabel
string | null
hint
string | null
custom_template
required
string | null
Example
{{ url }}Responses
Section titled “Responses”Successful
Media typeapplication/json
object
id
required
integer
name
required
string
parameters
Array
One of:
object
type
required
string
parameter
required
The URL query parameter name.
string
value
required
The fixed value for this parameter.
string
label
string | null
hint
string | null
object
type
required
string
parameter
required
The URL query parameter name.
string
label
string | null
hint
string | null
object
type
required
string
parameter
required
The URL query parameter name.
string
label
string | null
hint
string | null
object
type
required
string
parameter
required
The URL query parameter name.
string
label
string | null
hint
string | null
custom_template
string | null
created_at
required
string format: date-time
updated_at
required
string format: date-time
Example
{ "id": 12345, "name": "My Link Tracking Profile", "parameters": [ { "type": "fixed_value", "parameter": "utm_source", "value": "newsletter" } ], "custom_template": "{{ url }}", "created_at": "2023-08-23T10:30:00.000Z", "updated_at": "2023-08-23T10:30:00.000Z"}Unauthorized
Media typeapplication/json
object
message
required
string
Example
{ "message": "Record not found"}Forbidden
Media typeapplication/json
object
message
required
string
Example
{ "message": "Record not found"}Unprocessable Entity
Media typeapplication/json
object
message
required
string
errors
required
object
key
additional properties
Array<string>
Example
{ "errors": { "username": [ "Username is required.", "Username must be unique." ], "email": [ "Invalid email format." ] }}