Operation

POST /deeplinks/generate

Generates a tracked affiliate link for the supplied URL. Available to admins or to paid publishers that have enabled the link generator. Optionally, pass `program_id` to scope generation to a specific advertiser/program.

Operation ID: generateDeeplink · Tags: Deeplinks

Parameters

This operation does not define any parameters.

Request Body

Required: Yes
{
  "required": true,
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string",
            "format": "uri",
            "description": "Destination URL (must use http or https)"
          },
          "custom_code": {
            "type": "string",
            "maxLength": 50,
            "description": "Optional short code for the generated link"
          },
          "program_id": {
            "type": "integer",
            "description": "Optional advertiser/program id to scope generation"
          }
        },
        "required": [
          "url"
        ]
      },
      "examples": {
        "basic": {
          "summary": "Generate a deeplink for a product URL",
          "value": {
            "url": "https://www.aloyoga.com/products/warrior-leggings"
          }
        },
        "with_program": {
          "summary": "Scoped to a specific advertiser program",
          "value": {
            "url": "https://www.aloyoga.com/products/warrior-leggings",
            "program_id": 1234
          }
        }
      }
    }
  }
}

Responses

Content Types

  • application/json
{
  "description": "Deeplink generated",
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/DeeplinkGenerated"
      }
    }
  }
}

{
  "$ref": "#/components/responses/BadRequest"
}

{
  "$ref": "#/components/responses/Unauthorized"
}

{
  "$ref": "#/components/responses/Forbidden"
}

{
  "$ref": "#/components/responses/NotFound"
}

Content Types

  • application/json
{
  "description": "Validation or generation error",
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/Error"
      }
    }
  }
}

API Playground

The in-page tester only supports GET. For POST, use the sample curl below or the dedicated resource docs (e.g. Contacts, Link Builder). Sign in to enable live testing with your API key.

Action Method Endpoint Description
Generate an affiliate deeplink POST /api/v1/deeplinks/generate OpenAPI operationId: generateDeeplink.

Example request (replace YOUR_API_KEY or sign in above):

curl -X POST "https://app.hienergy.ai/api/v1/deeplinks/generate" \
  -H "X-Api-Key: YOUR_API_KEY" \
  -H "Accept: application/json"
  -H "Content-Type: application/json" \
  -d '{}'
Ask Dex AIIntegration help

If this page feels TLDR, ask Dex AI.

Dex AI speaks your language, and all the other languages you may not. It will write the integration for you with the right endpoint and headers in one plain-English answer.