> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.simz.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.simz.com/_mcp/server.

# Submit leads to an agent

POST https://api.simz.com/api/lead-receive-service/agent/receiveLead/{agentId}
Content-Type: application/json

Submit one or more leads to a specific SimZ agent for outbound calling.

Reference: https://docs.simz.com/api-reference/sim-z-integration-api/lead-receive/submit-leads

## Authentication

- `X-Company-API-Key` header (required) — Company API key issued by SimZ.

## Request

### Path parameters

- `agentId` (string, required) — SimZ agent ID that should receive the leads.

### Body (application/json)

This endpoint expects a LeadSubmissionRequest.

- `leads` (list of LeadInput, required) — Leads to submit to the target agent.
- `options` (LeadSubmissionOptions, optional)

## Response

### 200

All submitted leads were accepted.

- `success` (boolean, optional)
- `message` (string, optional)
- `data` (LeadSubmissionData, optional)

### 207

Some submitted leads were accepted and some were rejected. Each rejected lead is listed in `data.rejectedLeadDetails`.

- `success` (boolean, optional)
- `message` (string, optional)
- `data` (LeadSubmissionData, optional)

## Errors

### 400 Bad Request Error

Invalid request body, or no submitted lead was accepted. When no lead was accepted, `code` is `DYNAMIC_VARIABLES_INVALID` if at least one lead was rejected by the dynamic variables check and `INVALID_REQUEST` otherwise, and nothing is queued.

- `success` (boolean, required)
- `error` (string, required) — Human-readable error message.
- `code` (enum, required) — `DYNAMIC_VARIABLES_INVALID` when no lead was accepted and at least one lead was rejected by the dynamic variables check; otherwise `INVALID_REQUEST`.
  - Allowed values: `INVALID_REQUEST`, `DYNAMIC_VARIABLES_INVALID`
- `details` (list of string, required) — Readable lines: one per problem in the request body, or one per rejected lead as `<phoneNumber>: <reason>`.
- `data` (LeadSubmissionErrorResponseData, optional) — Present when no lead was accepted and at least one lead reached the dynamic variables check.

### 401 Unauthorized Error

Missing, invalid, or expired company API key.

- `success` (boolean, optional)
- `code` (string, optional)
- `message` (string, optional)
- `error` (string, optional) — Human-readable error message when returned by batch control endpoints.

### 402 Payment Required Error

The company has insufficient credits. The lead batch was not created and no leads were queued for calling. Add credits before resubmitting.

- `success` (boolean, optional)
- `code` (string, optional)
- `message` (string, optional)
- `data` (InsufficientCreditsResponseData, optional)

### 404 Not Found Error

Agent not found or unavailable for this company.

- `success` (boolean, optional)
- `code` (string, optional)
- `message` (string, optional)
- `error` (string, optional) — Human-readable error message when returned by batch control endpoints.

### 429 Too Many Requests Error

Too many requests.

- `success` (boolean, optional)
- `code` (string, optional)
- `message` (string, optional)
- `error` (string, optional) — Human-readable error message when returned by batch control endpoints.

### 503 Service Unavailable Error

SimZ could not complete a check that must pass before leads are queued: the credit balance check (`BILLING_CHECK_FAILED`) or the dynamic variables check (`DYNAMIC_VARIABLES_CHECK_FAILED`). The request fails closed and no leads were queued. Retry shortly.

- `SubmitLeadsRequestServiceUnavailableError`
  - BillingCheckFailedResponse: BillingCheckFailedResponse
  - DynamicVariablesCheckFailedResponse: DynamicVariablesCheckFailedResponse

## Types

### LeadInput

- `phoneNumber` (string, required) — Lead phone number. E.164 is recommended.
- `firstName` (string, optional, nullable)
- `lastName` (string, optional, nullable)
- `email` (string, optional, nullable)
- `salesforceId` (string, optional, nullable) — Optional CRM record ID.
- `campaignType` (string, optional, nullable) — Optional campaign identifier.
- `customData` (map from string to any, optional, nullable) — Client-defined metadata preserved by SimZ and returned in supported webhook payloads. Must be a JSON object: a lead whose `customData` is a string, an array, a number, or a boolean is rejected with the reason `customData must be a JSON object`.
- `dynamicVariables` (DynamicVariables, optional) — The value for one variable. Send a string of at most 200 characters (leading and trailing spaces are ignored); `number` and `identifier` variables also accept a JSON number. `null` or an empty string counts as not sent.

### LeadSubmissionOptions

- `priority` (string, optional, nullable) — Optional processing priority.
- `enableAMD` (boolean, optional, nullable) — Optional answering-machine detection flag when enabled for your account.
- `webhookUrl` (string, optional, nullable) — Optional per-request webhook URL when enabled for your account.

### LeadSubmissionData

- `batchId` (string, optional, nullable) — Batch identifier for the submitted leads when returned. Save this value to manage the batch later.
- `agentId` (string, optional)
- `agentName` (string, optional)
- `totalLeads` (integer, optional)
- `acceptedLeads` (integer, optional)
- `rejectedLeads` (integer, optional)
- `estimatedStartTime` (datetime, optional, nullable)
- `rejectedLeadDetails` (list of RejectedLeadDetail, optional)

### LeadSubmissionErrorResponseData

Present when no lead was accepted and at least one lead reached the dynamic variables check.

- `rejectedLeadDetails` (list of RejectedLeadDetail, optional)

### InsufficientCreditsResponseData

- `agentId` (string, optional)
- `companyId` (string, optional)
- `totalCredits` (integer, optional) — Company credit balance at the time of the check.
- `totalLeads` (integer, optional) — Total number of leads in the submission.
- `acceptedLeads` (integer, optional) — Always 0 because the batch was not created.
- `rejectedLeads` (integer, optional) — Number of leads that were not queued.
- `reason` (string, optional)
- `actionRequired` (string, optional)

### BillingCheckFailedResponse

Returned when SimZ cannot verify the company credit balance. The request fails closed and no leads are queued.

- `success` (boolean, optional)
- `code` (string, optional)
- `message` (string, optional)
- `data` (BillingCheckFailedResponseData, optional)

### DynamicVariablesCheckFailedResponse

Returned when SimZ cannot check the dynamic variables of the submitted leads. The request fails closed and no leads are queued.

- `success` (boolean, required)
- `code` (enum, required)
  - Allowed values: `DYNAMIC_VARIABLES_CHECK_FAILED`
- `message` (string, required)
- `data` (DynamicVariablesCheckFailedResponseData, required)

### DynamicVariables

The value for one variable. Send a string of at most 200 characters (leading and trailing spaces are ignored); `number` and `identifier` variables also accept a JSON number. `null` or an empty string counts as not sent.

- string
- double

### RejectedLeadDetail

- `phoneNumber` (string, optional)
- `reason` (string, optional) — Reason the lead was rejected during processing. For a lead rejected by the dynamic variables check, a readable summary that names the keys and says to create the variables in the portal under Agents > Variables. It never contains a submitted value.
- `code` (string, optional) — Machine-readable rejection code. `DYNAMIC_VARIABLES_INVALID` when the lead was rejected by the dynamic variables check.
- `unknownVariables` (list of string, optional) — Keys in `dynamicVariables` that are not registered for the company.
- `missingVariables` (list of string, optional) — Must variables that the outbound prompt refers to and that the lead did not send.
- `invalidVariables` (list of InvalidDynamicVariable, optional) — Keys whose value was not accepted.

### BillingCheckFailedResponseData

- `agentId` (string, optional)
- `companyId` (string, optional)

### DynamicVariablesCheckFailedResponseData

- `agentId` (string, optional)
- `companyId` (string, optional)

### InvalidDynamicVariable

A dynamic variable whose value was not accepted. The value itself is never returned.

- `key` (string, required) — Key of the variable, or `dynamicVariables` when the reason concerns the object as a whole.
- `reason` (enum, required) — Why the value was not accepted. `not_an_object` and `too_many_keys` are reported under the key `dynamicVariables` and concern the lead's `dynamicVariables` object as a whole.
  - Allowed values: `too_long`, `wrong_type`, `bad_characters`, `not_a_number`, `not_a_date`, `not_a_phone`, `not_an_object`, `too_many_keys`

## Examples

### One lead rejected by the dynamic variables check

**Response**

```json
{
  "success": true,
  "message": "Some leads were rejected",
  "data": {
    "batchId": "batch_123",
    "agentId": "agent_123",
    "agentName": "Spring Outreach",
    "totalLeads": 2,
    "acceptedLeads": 1,
    "rejectedLeads": 1,
    "estimatedStartTime": "2026-12-01T18:30:00Z",
    "rejectedLeadDetails": [
      {
        "phoneNumber": "+15557654321",
        "reason": "Lead rejected: unknown variables: promo_cod; missing required: appointment_date. Create variables in the portal under Agents > Variables.",
        "code": "DYNAMIC_VARIABLES_INVALID",
        "unknownVariables": [
          "promo_cod"
        ],
        "missingVariables": [
          "appointment_date"
        ],
        "invalidVariables": []
      }
    ]
  }
}
```

**SDK Code**

```python One lead rejected by the dynamic variables check
import requests

url = "https://api.simz.com/api/lead-receive-service/agent/receiveLead/agentId"

headers = {"X-Company-API-Key": "<apiKey>"}

response = requests.post(url, headers=headers)

print(response.json())
```

```javascript One lead rejected by the dynamic variables check
const url = 'https://api.simz.com/api/lead-receive-service/agent/receiveLead/agentId';
const options = {method: 'POST', headers: {'X-Company-API-Key': '<apiKey>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go One lead rejected by the dynamic variables check
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.simz.com/api/lead-receive-service/agent/receiveLead/agentId"

	req, _ := http.NewRequest("POST", url, nil)

	req.Header.Add("X-Company-API-Key", "<apiKey>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby One lead rejected by the dynamic variables check
require 'uri'
require 'net/http'

url = URI("https://api.simz.com/api/lead-receive-service/agent/receiveLead/agentId")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["X-Company-API-Key"] = '<apiKey>'

response = http.request(request)
puts response.read_body
```

```java One lead rejected by the dynamic variables check
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.simz.com/api/lead-receive-service/agent/receiveLead/agentId")
  .header("X-Company-API-Key", "<apiKey>")
  .asString();
```

```php One lead rejected by the dynamic variables check
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.simz.com/api/lead-receive-service/agent/receiveLead/agentId', [
  'headers' => [
    'X-Company-API-Key' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp One lead rejected by the dynamic variables check
using RestSharp;

var client = new RestClient("https://api.simz.com/api/lead-receive-service/agent/receiveLead/agentId");
var request = new RestRequest(Method.POST);
request.AddHeader("X-Company-API-Key", "<apiKey>");
IRestResponse response = client.Execute(request);
```

```swift One lead rejected by the dynamic variables check
import Foundation

let headers = ["X-Company-API-Key": "<apiKey>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.simz.com/api/lead-receive-service/agent/receiveLead/agentId")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### Submit one lead with dynamic variables

**Request**

```json
{
  "leads": [
    {
      "phoneNumber": "+15551234567",
      "firstName": "Jane",
      "lastName": "Doe",
      "customData": {
        "leadId": "LEAD-001"
      },
      "dynamicVariables": {
        "appointment_date": "2026-12-03",
        "promo_code": "SPRING-25"
      }
    }
  ]
}
```

**Response**

```json
{
  "success": true,
  "message": "Leads received and queued successfully",
  "data": {
    "batchId": "batch_123",
    "agentId": "agent_123",
    "agentName": "Spring Outreach",
    "totalLeads": 1,
    "acceptedLeads": 1,
    "rejectedLeads": 0,
    "estimatedStartTime": "2026-07-06T18:30:00Z",
    "rejectedLeadDetails": []
  }
}
```

**SDK Code**

```python Submit one lead with dynamic variables
import requests

url = "https://api.simz.com/api/lead-receive-service/agent/receiveLead/agentId"

payload = { "leads": [
        {
            "phoneNumber": "+15551234567",
            "firstName": "Jane",
            "lastName": "Doe",
            "customData": { "leadId": "LEAD-001" },
            "dynamicVariables": {
                "appointment_date": "2026-12-03",
                "promo_code": "SPRING-25"
            }
        }
    ] }
headers = {
    "X-Company-API-Key": "<apiKey>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript Submit one lead with dynamic variables
const url = 'https://api.simz.com/api/lead-receive-service/agent/receiveLead/agentId';
const options = {
  method: 'POST',
  headers: {'X-Company-API-Key': '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"leads":[{"phoneNumber":"+15551234567","firstName":"Jane","lastName":"Doe","customData":{"leadId":"LEAD-001"},"dynamicVariables":{"appointment_date":"2026-12-03","promo_code":"SPRING-25"}}]}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Submit one lead with dynamic variables
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.simz.com/api/lead-receive-service/agent/receiveLead/agentId"

	payload := strings.NewReader("{\n  \"leads\": [\n    {\n      \"phoneNumber\": \"+15551234567\",\n      \"firstName\": \"Jane\",\n      \"lastName\": \"Doe\",\n      \"customData\": {\n        \"leadId\": \"LEAD-001\"\n      },\n      \"dynamicVariables\": {\n        \"appointment_date\": \"2026-12-03\",\n        \"promo_code\": \"SPRING-25\"\n      }\n    }\n  ]\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("X-Company-API-Key", "<apiKey>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Submit one lead with dynamic variables
require 'uri'
require 'net/http'

url = URI("https://api.simz.com/api/lead-receive-service/agent/receiveLead/agentId")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["X-Company-API-Key"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"leads\": [\n    {\n      \"phoneNumber\": \"+15551234567\",\n      \"firstName\": \"Jane\",\n      \"lastName\": \"Doe\",\n      \"customData\": {\n        \"leadId\": \"LEAD-001\"\n      },\n      \"dynamicVariables\": {\n        \"appointment_date\": \"2026-12-03\",\n        \"promo_code\": \"SPRING-25\"\n      }\n    }\n  ]\n}"

response = http.request(request)
puts response.read_body
```

```java Submit one lead with dynamic variables
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.simz.com/api/lead-receive-service/agent/receiveLead/agentId")
  .header("X-Company-API-Key", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"leads\": [\n    {\n      \"phoneNumber\": \"+15551234567\",\n      \"firstName\": \"Jane\",\n      \"lastName\": \"Doe\",\n      \"customData\": {\n        \"leadId\": \"LEAD-001\"\n      },\n      \"dynamicVariables\": {\n        \"appointment_date\": \"2026-12-03\",\n        \"promo_code\": \"SPRING-25\"\n      }\n    }\n  ]\n}")
  .asString();
```

```php Submit one lead with dynamic variables
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.simz.com/api/lead-receive-service/agent/receiveLead/agentId', [
  'body' => '{
  "leads": [
    {
      "phoneNumber": "+15551234567",
      "firstName": "Jane",
      "lastName": "Doe",
      "customData": {
        "leadId": "LEAD-001"
      },
      "dynamicVariables": {
        "appointment_date": "2026-12-03",
        "promo_code": "SPRING-25"
      }
    }
  ]
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'X-Company-API-Key' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp Submit one lead with dynamic variables
using RestSharp;

var client = new RestClient("https://api.simz.com/api/lead-receive-service/agent/receiveLead/agentId");
var request = new RestRequest(Method.POST);
request.AddHeader("X-Company-API-Key", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"leads\": [\n    {\n      \"phoneNumber\": \"+15551234567\",\n      \"firstName\": \"Jane\",\n      \"lastName\": \"Doe\",\n      \"customData\": {\n        \"leadId\": \"LEAD-001\"\n      },\n      \"dynamicVariables\": {\n        \"appointment_date\": \"2026-12-03\",\n        \"promo_code\": \"SPRING-25\"\n      }\n    }\n  ]\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Submit one lead with dynamic variables
import Foundation

let headers = [
  "X-Company-API-Key": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = ["leads": [
    [
      "phoneNumber": "+15551234567",
      "firstName": "Jane",
      "lastName": "Doe",
      "customData": ["leadId": "LEAD-001"],
      "dynamicVariables": [
        "appointment_date": "2026-12-03",
        "promo_code": "SPRING-25"
      ]
    ]
  ]] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.simz.com/api/lead-receive-service/agent/receiveLead/agentId")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### Example 3

**Request**

```json
{
  "leads": [
    {
      "phoneNumber": "+15551234567",
      "firstName": "Jane",
      "lastName": "Doe",
      "customData": {
        "leadId": "LEAD-001",
        "campaignTag": "spring-2026"
      }
    }
  ],
  "options": {
    "priority": "normal"
  }
}
```

**Response**

```json
{
  "success": true,
  "message": "Leads received and queued successfully",
  "data": {
    "batchId": "batch_123",
    "agentId": "agent_123",
    "agentName": "Spring Outreach",
    "totalLeads": 1,
    "acceptedLeads": 1,
    "rejectedLeads": 0,
    "estimatedStartTime": "2026-07-06T18:30:00Z",
    "rejectedLeadDetails": []
  }
}
```

**SDK Code**

```python
import requests

url = "https://api.simz.com/api/lead-receive-service/agent/receiveLead/agentId"

payload = {
    "leads": [
        {
            "phoneNumber": "+15551234567",
            "firstName": "Jane",
            "lastName": "Doe",
            "customData": {
                "leadId": "LEAD-001",
                "campaignTag": "spring-2026"
            }
        }
    ],
    "options": { "priority": "normal" }
}
headers = {
    "X-Company-API-Key": "<apiKey>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.simz.com/api/lead-receive-service/agent/receiveLead/agentId';
const options = {
  method: 'POST',
  headers: {'X-Company-API-Key': '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"leads":[{"phoneNumber":"+15551234567","firstName":"Jane","lastName":"Doe","customData":{"leadId":"LEAD-001","campaignTag":"spring-2026"}}],"options":{"priority":"normal"}}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.simz.com/api/lead-receive-service/agent/receiveLead/agentId"

	payload := strings.NewReader("{\n  \"leads\": [\n    {\n      \"phoneNumber\": \"+15551234567\",\n      \"firstName\": \"Jane\",\n      \"lastName\": \"Doe\",\n      \"customData\": {\n        \"leadId\": \"LEAD-001\",\n        \"campaignTag\": \"spring-2026\"\n      }\n    }\n  ],\n  \"options\": {\n    \"priority\": \"normal\"\n  }\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("X-Company-API-Key", "<apiKey>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.simz.com/api/lead-receive-service/agent/receiveLead/agentId")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["X-Company-API-Key"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"leads\": [\n    {\n      \"phoneNumber\": \"+15551234567\",\n      \"firstName\": \"Jane\",\n      \"lastName\": \"Doe\",\n      \"customData\": {\n        \"leadId\": \"LEAD-001\",\n        \"campaignTag\": \"spring-2026\"\n      }\n    }\n  ],\n  \"options\": {\n    \"priority\": \"normal\"\n  }\n}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.simz.com/api/lead-receive-service/agent/receiveLead/agentId")
  .header("X-Company-API-Key", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"leads\": [\n    {\n      \"phoneNumber\": \"+15551234567\",\n      \"firstName\": \"Jane\",\n      \"lastName\": \"Doe\",\n      \"customData\": {\n        \"leadId\": \"LEAD-001\",\n        \"campaignTag\": \"spring-2026\"\n      }\n    }\n  ],\n  \"options\": {\n    \"priority\": \"normal\"\n  }\n}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.simz.com/api/lead-receive-service/agent/receiveLead/agentId', [
  'body' => '{
  "leads": [
    {
      "phoneNumber": "+15551234567",
      "firstName": "Jane",
      "lastName": "Doe",
      "customData": {
        "leadId": "LEAD-001",
        "campaignTag": "spring-2026"
      }
    }
  ],
  "options": {
    "priority": "normal"
  }
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'X-Company-API-Key' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.simz.com/api/lead-receive-service/agent/receiveLead/agentId");
var request = new RestRequest(Method.POST);
request.AddHeader("X-Company-API-Key", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"leads\": [\n    {\n      \"phoneNumber\": \"+15551234567\",\n      \"firstName\": \"Jane\",\n      \"lastName\": \"Doe\",\n      \"customData\": {\n        \"leadId\": \"LEAD-001\",\n        \"campaignTag\": \"spring-2026\"\n      }\n    }\n  ],\n  \"options\": {\n    \"priority\": \"normal\"\n  }\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "X-Company-API-Key": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = [
  "leads": [
    [
      "phoneNumber": "+15551234567",
      "firstName": "Jane",
      "lastName": "Doe",
      "customData": [
        "leadId": "LEAD-001",
        "campaignTag": "spring-2026"
      ]
    ]
  ],
  "options": ["priority": "normal"]
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.simz.com/api/lead-receive-service/agent/receiveLead/agentId")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```