curl -X POST "https://server.smartlead.ai/api/v1/client/456/code-integrations?api_key=YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"snippet_name": "LinkedIn Outreach", "snippet_code": "<script>/* ... */</script>"}'
import requests
response = requests.post(
"https://server.smartlead.ai/api/v1/client/456/code-integrations",
params={"api_key": "YOUR_API_KEY"},
json={"snippet_name": "LinkedIn Outreach", "snippet_code": "<script>/* ... */</script>"}
)
print(response.json())
{
"success": true,
"data": {
"id": 12
}
}
{
"error": "Client not found - Invalid client_id."
}
{
"message": "Not authorized"
}
Client Management
Add Client Code Snippet
Add a code snippet (whitelabel code integration) to a client
POST
/
api
/
v1
/
client
/
{client_id}
/
code-integrations
curl -X POST "https://server.smartlead.ai/api/v1/client/456/code-integrations?api_key=YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"snippet_name": "LinkedIn Outreach", "snippet_code": "<script>/* ... */</script>"}'
import requests
response = requests.post(
"https://server.smartlead.ai/api/v1/client/456/code-integrations",
params={"api_key": "YOUR_API_KEY"},
json={"snippet_name": "LinkedIn Outreach", "snippet_code": "<script>/* ... */</script>"}
)
print(response.json())
{
"success": true,
"data": {
"id": 12
}
}
{
"error": "Client not found - Invalid client_id."
}
{
"message": "Not authorized"
}
Code snippets are added to the client’s whitelabel app. List a client’s snippets with Get Client by ID and
includeCodeIntegrations=true.Path Parameters
number
required
Client ID
Query Parameters
string
required
Your SmartLead API key (client API keys are not allowed)
Request Body
string
required
Snippet name (1–255 characters)
string
required
Snippet code (at least 1 character)
curl -X POST "https://server.smartlead.ai/api/v1/client/456/code-integrations?api_key=YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"snippet_name": "LinkedIn Outreach", "snippet_code": "<script>/* ... */</script>"}'
import requests
response = requests.post(
"https://server.smartlead.ai/api/v1/client/456/code-integrations",
params={"api_key": "YOUR_API_KEY"},
json={"snippet_name": "LinkedIn Outreach", "snippet_code": "<script>/* ... */</script>"}
)
print(response.json())
Response Example
{
"success": true,
"data": {
"id": 12
}
}
{
"error": "Client not found - Invalid client_id."
}
{
"message": "Not authorized"
}
