Facebook
LinkedIn
YouTube
Getting Started
Authentication
Authentication
  • V2 Authentication (Deprecated)
  • V3 Authentication
V2 API Documentation (Deprecated)V3 API Documentation
Dialer SDKMCP
Getting Started
Authentication
Authentication
  • V2 Authentication (Deprecated)
  • V3 Authentication
V2 API Documentation (Deprecated)V3 API Documentation
Dialer SDKMCP
  1. DNI
  • Platform
    • Users
      • List Users
      • Create User
      • Get User Details
      • Update User
      • Partial Update User
      • Delete User
    • Groups
      • Get Group Tree
      • List Child Groups
      • Get Group Details
      • List Groups
      • Get Org Unit Hierarchy
      • Update Group
      • Partial Update Group
      • Delete Group
      • Create Group
    • Webhooks
      • Create Webhook
      • Get Webhook Details
      • List Webhooks
      • Update Webhook
      • Partial Update Webhook
      • Delete Webhook
    • Media Prompts
      • List Prompts
      • Get Prompt by ID
      • Upload Prompt
      • Delete Prompt
  • AI Voice Agents
    • List AI Voice Agents
      GET
    • Get Agent Details
      GET
    • Delete Agent
      DELETE
  • Phone Numbers
    • Assigned Numbers
      GET
    • Provisioned Numbers
      GET
    • Reserved Numbers
      DELETE
    • Phone Numbers
      POST
    • Available Numbers
      GET
  • Provisioned Routes
    • List Provisioned Routes
      GET
    • Create Provisioned Route
      POST
    • Get Provisioned Route Details
      GET
    • Delete Provisioned Route
      DELETE
    • Update Provisioned Route
      PUT
    • Partial Update Provisioned Route
      PATCH
    • Move Tracking Number to Another Campaign
      POST
  • SMS Broadcasts
    • List Broadcasts
      GET
    • Create Broadcast
      POST
    • Get Broadcast Details
      GET
    • Update Broadcast
      PUT
    • Partial Update Broadcast
      PATCH
    • Delete Broadcast
      DELETE
  • Conversation
    • Calls
      • Get Calls List
      • Get Call By ID
      • Email Call Data
      • Move Call to Another Group
      • Add Notes to Calls
      • Upload Call Recording
      • Add Tags to Call
    • SMS
      • Get SMS Conversations
      • Get SMS Conversation By ID
    • Opportunity Recovery
      • Get Conversations By Custom Insights
    • Agent Performance
      • Get Agent Performance Metrics
    • Attribution Engine
      • Get Marketing Attribution Data
  • Blacklist
    • List blacklisted numbers
    • Add numbers to blacklist
    • Delete numbers from blacklist
  • Call Action Templates
    • Create Call Action Template
    • Update Call Action Template
  • Campaigns
    • List Campaigns
    • Create Campaign
    • Get Campaign Details
    • Update Campaign
    • Partial Update Campaign
    • Delete Campaign
    • Move Campaign to Another Group
  • Custom Insights
    • Get Custom Insights
    • Create New Custom Insight
    • Get Custom Insight By Id
    • Update Custom Insight
    • Partial Update Custom Insight
    • Delete Custom Insight
  • Custom Source
    • Get Custom Sources
    • Create Custom Source
    • Delete Custom Sources (Single or Multiple)
  • DNI
    • List DNI Settings
      GET
    • Update DNI Setting
      PUT
    • Delete DNI Setting
      DELETE
    • Create DNI Setting
      POST
    • Get DNI Snippets
      GET
  • Geo Locations
    • List Geo Locations
    • Create Geo Location
    • Get Geo Location
    • Update Geo Location
    • Partially Update Geo Location
    • Delete Geo Location
    • List Geo Location Routes
    • Create Geo Location Route
    • Get Geo Location Route
    • Update Geo Location Route
    • Partially Update Geo Location Route
    • Delete Geo Location Route
    • Import Geo Location Routes from CSV
  • Insights
    • List Insights
    • Create Insight
    • Get Insight Details
    • Delete Insight
  • Scorecards
    • List Scorecards
    • Get Scored Calls Report
    • Create Scorecard
    • Add or Update Call Title
    • Duplicate Scorecard
    • Archive Scorecard
  • Miscellaneous
    • List Ad Sources
    • List Industries
    • List Tags
    • Create Tag
    • Update Tag
    • Delete Tag
  • Subscriptions
    • List Webhook Subscriptions
    • Create Webhook Subscription
    • Delete Webhook Subscription
  1. DNI

Get DNI Snippets

GET
https://platform-api.convirza.com/v3/dni/snippet
DNI
Last modified:2026-10-07 10:32:01
Returns ready-to-paste DNI snippets for one or more org units.
Use Case
This endpoint allows an agency admin running many client websites to retrieve DNI snippets programmatically, so an AI assistant can provide the code and placement instructions without the customer opening the portal or reading documentation.
Access Control
Requires valid JWT authentication
Returns snippets only for org units within the user's authorized scope
Org units without access return an ACCESS_DENIED error in the errors array
DNI Configuration Requirement
Each org unit must have DNI enabled (dni_org_unit entry must exist)
Org units without DNI configured return a DNI_NOT_CONFIGURED error in the errors array
Response Structure
snippets — Object keyed by org_unit_id containing successful retrievals
errors — Array of errors for org units that failed (DNI not configured, not found, or access denied)
Snippet Content
Ready-to-paste <head> snippet for click-ID capture
Matches the existing CAI portal "Copy code" dialog exactly
Includes DNI settings, placement guidance, and verification steps
Placement Guidance
Primary: Website page <head>
Alternative: Google Tag Manager
Verification Steps
1.
Load the website in a browser
2.
Refresh the page
3.
Confirm the tracking number changes or displays correctly
4.
Place a test call to the displayed number
5.
Confirm the call appears in Convirza reporting within a few minutes

Request

Authorization
Bearer Token
Provide your bearer token in the
Authorization
header when making requests to protected resources.
Example:
Authorization: Bearer ********************
or
Query Params

Responses

🟢200
application/json
DNI snippets retrieved successfully (may include partial failures in errors array)
Bodyapplication/json

🟠400
🟠401
🔴500
Request Request Example
Shell
JavaScript
Java
Swift
curl --location 'https://platform-api.convirza.com/v3/dni/snippet?org_unit_ids=' \
--header 'Authorization: Bearer <token>'
Response Response Example
200 - Example 1
{
    "code": 200,
    "message": "success",
    "request_id": "550e8400-e29b-41d4-a716-446655440000",
    "timestamp": "2026-09-30T10:30:00.000Z",
    "data": {
        "snippets": {
            "70035": {
                "org_unit_id": 70035,
                "org_unit_name": "My Business Group",
                "snippet": "<script defer src=\"https://dni.convirza.com/dni.js?app_id=CT\"></script>\n<script type=\"text/javascript\">\n  function dniLoadingTimer() { \n    if (typeof(getDNIRecord) == \"function\") {\n      getDNIRecord(\"a1b2c3d4e5f6\", \"dni.convirza.com\");\n    } else {\n      setTimeout(dniLoadingTimer, 100); \n    } \n  }\n  setTimeout(dniLoadingTimer, 100); \n</script>",
                "settings": {
                    "identifier": "PHONE_NUMBER",
                    "number_format": "(xxx) xxx-xxxx",
                    "keep_alive_mins": 30,
                    "element_based": {
                        "dni_element": ".phone-number",
                        "dni_type": "source"
                    },
                    "url_based": null
                },
                "placement": {
                    "primary": "head",
                    "alternative": "google_tag_manager"
                },
                "verification_steps": [
                    "Load your website in a browser",
                    "Refresh the page",
                    "Confirm the tracking number changes or displays correctly",
                    "Place a test call to the displayed number",
                    "Confirm the call appears in Convirza reporting within a few minutes"
                ]
            }
        },
        "errors": [
            {
                "org_unit_id": 70037,
                "error_code": "DNI_NOT_CONFIGURED",
                "error_message": "DNI is not configured for this org unit. Enable DNI in the portal first."
            }
        ]
    }
}
Modified at 2026-10-07 10:32:01
Previous
Create DNI Setting
Next
List Geo Locations
Built with