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

# Get a sample event payload

GET https://api.youratlas.com/v1/api/events-gateway/trigger/perform/{triggerName}

Returns an example payload for the given event, built from real data in the specified campaign. Use it to build and test your webhook receiver before subscribing.

Reference: https://docs.youratlas.com/api-reference/atlas-api/events-gateway/events-get-sample-payload

## Authentication

- `api-key` header (required) — Your Atlas API key. Get it from the Atlas Portal under Settings > API Keys.

## Request

### Path parameters

- `triggerName` (enum, required) — The event to build a sample payload for.
  - Allowed values: `call_started`, `call_completed`, `message_received`, `message_sent`, `message_session_completed`

### Query parameters

- `campaignId` (string, required) — The campaign to build the sample payload from.

## Response

### 200

Sample event payload. The shape of each item depends on the `triggerName` path parameter.

- `list of EventsGatewayTriggerPerformTriggerNameGetResponsesContentApplicationJsonSchemaItems`

## Errors

### 400 Bad Request Error

Bad request

- `error` (ErrorError, optional)

### 500 Internal Server Error

Internal server error

- `error` (ErrorError, optional)

## Types

### EventsGatewayTriggerPerformTriggerNameGetResponsesContentApplicationJsonSchemaItems

### ErrorError

- `message` (string, optional)
- `code` (string, optional)
- `requestId` (string, optional)

### CallStartedEvent

Payload delivered when a call starts.

- `campaignId` (string, optional)
- `agentId` (string, optional)
- `callId` (string, optional)
- `customerNumber` (string, optional)
- `customerName` (string, optional)
- `campaignName` (string, optional)
- `agentName` (string, optional)
- `campaignType` (string, optional)

### CallCompletedEvent

Payload delivered when a call ends. Includes the call result.

- `campaignId` (string, optional)
- `agentId` (string, optional)
- `callId` (string, optional)
- `customerNumber` (string, optional)
- `customerName` (string, optional)
- `campaignName` (string, optional)
- `agentName` (string, optional)
- `campaignType` (string, optional)
- `callSummary` (string, optional)
- `startedAt` (datetime, optional)
- `endedAt` (datetime, optional)
- `durationMs` (integer, optional)
- `durationSeconds` (integer, optional)
- `durationMinutes` (double, optional)
- `callTranscript` (string, optional)
- `audioUrl` (string, optional)
- `customerEmail` (string, optional)
- `status` (enum, optional) — Call disposition. Always a terminal value — never empty or in-progress.
  - Allowed values: `Accepted`, `Missed`, `Rejected`
- `endedReason` (string, optional) — Raw reason the call ended (e.g. `customer-ended-call`, `voicemail`, `customer-busy`).

### MessageReceivedEvent

Payload delivered when a customer message is received. Note: this payload carries no `sessionId` and no message id — to attribute or dedup a message you must re-pull the session/messages via the REST API. (`message_session_completed` does include `sessionId` and a `messages[]` array.)

- `campaignId` (string, optional)
- `agentId` (string, optional)
- `customerNumber` (string, optional)
- `customerName` (string, optional)
- `campaignName` (string, optional)
- `agentName` (string, optional)
- `campaignType` (string, optional)
- `messageContent` (string, optional)
- `receivedAt` (datetime, optional)

### MessageSentEvent

Payload delivered when the agent sends a message. Note: like `message_received`, this payload carries no `sessionId` and no message id — attribution/dedup requires a REST re-pull.

- `campaignId` (string, optional)
- `agentId` (string, optional)
- `customerNumber` (string, optional)
- `customerName` (string, optional)
- `campaignName` (string, optional)
- `agentName` (string, optional)
- `campaignType` (string, optional)
- `messageContent` (string, optional)
- `sentAt` (datetime, optional)

### ConversationCompletedEvent

Payload delivered when a messaging conversation ends after a period of inactivity. Includes the full message history and an AI-generated summary.

- `campaignId` (string, optional)
- `agentId` (string, optional)
- `customerNumber` (string, optional)
- `customerName` (string, optional)
- `campaignName` (string, optional)
- `agentName` (string, optional)
- `campaignType` (string, optional)
- `sessionId` (string, optional)
- `startedAt` (datetime, optional)
- `endedAt` (datetime, optional)
- `messageCount` (integer, optional)
- `messages` (list of ConversationMessage, optional)
- `conversationSummary` (string, optional)

### ConversationMessage

- `role` (enum, optional) — Who sent the message.
  - Allowed values: `user`, `assistant`
- `content` (string, optional)
- `timestamp` (datetime, optional)

## Examples

**Response**

```json
[
  {
    "agentId": "string",
    "agentName": "string",
    "callId": "string",
    "campaignId": "string",
    "campaignName": "string",
    "campaignType": "string",
    "customerName": "string",
    "customerNumber": "string"
  }
]
```

**SDK Code**

```python
import requests

url = "https://api.youratlas.com/v1/api/events-gateway/trigger/perform/call_started"

querystring = {"campaignId":"campaignId"}

headers = {"api-key": "<apiKey>"}

response = requests.get(url, headers=headers, params=querystring)

print(response.json())
```

```javascript
const url = 'https://api.youratlas.com/v1/api/events-gateway/trigger/perform/call_started?campaignId=campaignId';
const options = {method: 'GET', headers: {'api-key': '<apiKey>'}};

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"
	"net/http"
	"io"
)

func main() {

	url := "https://api.youratlas.com/v1/api/events-gateway/trigger/perform/call_started?campaignId=campaignId"

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

	req.Header.Add("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
require 'uri'
require 'net/http'

url = URI("https://api.youratlas.com/v1/api/events-gateway/trigger/perform/call_started?campaignId=campaignId")

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

request = Net::HTTP::Get.new(url)
request["api-key"] = '<apiKey>'

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.get("https://api.youratlas.com/v1/api/events-gateway/trigger/perform/call_started?campaignId=campaignId")
  .header("api-key", "<apiKey>")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.youratlas.com/v1/api/events-gateway/trigger/perform/call_started?campaignId=campaignId', [
  'headers' => [
    'api-key' => '<apiKey>',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://api.youratlas.com/v1/api/events-gateway/trigger/perform/call_started?campaignId=campaignId");
var request = new RestRequest(Method.GET);
request.AddHeader("api-key", "<apiKey>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["api-key": "<apiKey>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.youratlas.com/v1/api/events-gateway/trigger/perform/call_started?campaignId=campaignId")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
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()
```