curl --request PUT \
--url https://api.statisfy.com/v1/activities \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"external_id": "<string>",
"occurred_at": "2023-11-07T05:31:56Z",
"person": {
"email": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"linkedin_url": "<string>",
"title": "<string>"
},
"source": "<string>",
"account": {
"crm_account_id": "<string>",
"domain": "<string>",
"id": "<string>"
},
"body_text": "<string>",
"messages": [
{
"body_text": "<string>",
"external_id": "<string>",
"sent_at": "2023-11-07T05:31:56Z",
"sent_by": "<string>",
"subject": "<string>"
}
],
"outcome": {
"attended": true,
"clicked_at": "2023-11-07T05:31:56Z",
"duration_seconds": 1,
"opened_at": "2023-11-07T05:31:56Z",
"replied_at": "2023-11-07T05:31:56Z"
},
"sent_by": "<string>",
"subject": "<string>",
"url": "<string>"
}
'import requests
url = "https://api.statisfy.com/v1/activities"
payload = {
"external_id": "<string>",
"occurred_at": "2023-11-07T05:31:56Z",
"person": {
"email": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"linkedin_url": "<string>",
"title": "<string>"
},
"source": "<string>",
"account": {
"crm_account_id": "<string>",
"domain": "<string>",
"id": "<string>"
},
"body_text": "<string>",
"messages": [
{
"body_text": "<string>",
"external_id": "<string>",
"sent_at": "2023-11-07T05:31:56Z",
"sent_by": "<string>",
"subject": "<string>"
}
],
"outcome": {
"attended": True,
"clicked_at": "2023-11-07T05:31:56Z",
"duration_seconds": 1,
"opened_at": "2023-11-07T05:31:56Z",
"replied_at": "2023-11-07T05:31:56Z"
},
"sent_by": "<string>",
"subject": "<string>",
"url": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
external_id: '<string>',
occurred_at: '2023-11-07T05:31:56Z',
person: {
email: '<string>',
first_name: '<string>',
last_name: '<string>',
linkedin_url: '<string>',
title: '<string>'
},
source: '<string>',
account: {crm_account_id: '<string>', domain: '<string>', id: '<string>'},
body_text: '<string>',
messages: [
{
body_text: '<string>',
external_id: '<string>',
sent_at: '2023-11-07T05:31:56Z',
sent_by: '<string>',
subject: '<string>'
}
],
outcome: {
attended: true,
clicked_at: '2023-11-07T05:31:56Z',
duration_seconds: 1,
opened_at: '2023-11-07T05:31:56Z',
replied_at: '2023-11-07T05:31:56Z'
},
sent_by: '<string>',
subject: '<string>',
url: '<string>'
})
};
fetch('https://api.statisfy.com/v1/activities', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.statisfy.com/v1/activities",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'external_id' => '<string>',
'occurred_at' => '2023-11-07T05:31:56Z',
'person' => [
'email' => '<string>',
'first_name' => '<string>',
'last_name' => '<string>',
'linkedin_url' => '<string>',
'title' => '<string>'
],
'source' => '<string>',
'account' => [
'crm_account_id' => '<string>',
'domain' => '<string>',
'id' => '<string>'
],
'body_text' => '<string>',
'messages' => [
[
'body_text' => '<string>',
'external_id' => '<string>',
'sent_at' => '2023-11-07T05:31:56Z',
'sent_by' => '<string>',
'subject' => '<string>'
]
],
'outcome' => [
'attended' => true,
'clicked_at' => '2023-11-07T05:31:56Z',
'duration_seconds' => 1,
'opened_at' => '2023-11-07T05:31:56Z',
'replied_at' => '2023-11-07T05:31:56Z'
],
'sent_by' => '<string>',
'subject' => '<string>',
'url' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.statisfy.com/v1/activities"
payload := strings.NewReader("{\n \"external_id\": \"<string>\",\n \"occurred_at\": \"2023-11-07T05:31:56Z\",\n \"person\": {\n \"email\": \"<string>\",\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"linkedin_url\": \"<string>\",\n \"title\": \"<string>\"\n },\n \"source\": \"<string>\",\n \"account\": {\n \"crm_account_id\": \"<string>\",\n \"domain\": \"<string>\",\n \"id\": \"<string>\"\n },\n \"body_text\": \"<string>\",\n \"messages\": [\n {\n \"body_text\": \"<string>\",\n \"external_id\": \"<string>\",\n \"sent_at\": \"2023-11-07T05:31:56Z\",\n \"sent_by\": \"<string>\",\n \"subject\": \"<string>\"\n }\n ],\n \"outcome\": {\n \"attended\": true,\n \"clicked_at\": \"2023-11-07T05:31:56Z\",\n \"duration_seconds\": 1,\n \"opened_at\": \"2023-11-07T05:31:56Z\",\n \"replied_at\": \"2023-11-07T05:31:56Z\"\n },\n \"sent_by\": \"<string>\",\n \"subject\": \"<string>\",\n \"url\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.statisfy.com/v1/activities")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"external_id\": \"<string>\",\n \"occurred_at\": \"2023-11-07T05:31:56Z\",\n \"person\": {\n \"email\": \"<string>\",\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"linkedin_url\": \"<string>\",\n \"title\": \"<string>\"\n },\n \"source\": \"<string>\",\n \"account\": {\n \"crm_account_id\": \"<string>\",\n \"domain\": \"<string>\",\n \"id\": \"<string>\"\n },\n \"body_text\": \"<string>\",\n \"messages\": [\n {\n \"body_text\": \"<string>\",\n \"external_id\": \"<string>\",\n \"sent_at\": \"2023-11-07T05:31:56Z\",\n \"sent_by\": \"<string>\",\n \"subject\": \"<string>\"\n }\n ],\n \"outcome\": {\n \"attended\": true,\n \"clicked_at\": \"2023-11-07T05:31:56Z\",\n \"duration_seconds\": 1,\n \"opened_at\": \"2023-11-07T05:31:56Z\",\n \"replied_at\": \"2023-11-07T05:31:56Z\"\n },\n \"sent_by\": \"<string>\",\n \"subject\": \"<string>\",\n \"url\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.statisfy.com/v1/activities")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"external_id\": \"<string>\",\n \"occurred_at\": \"2023-11-07T05:31:56Z\",\n \"person\": {\n \"email\": \"<string>\",\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"linkedin_url\": \"<string>\",\n \"title\": \"<string>\"\n },\n \"source\": \"<string>\",\n \"account\": {\n \"crm_account_id\": \"<string>\",\n \"domain\": \"<string>\",\n \"id\": \"<string>\"\n },\n \"body_text\": \"<string>\",\n \"messages\": [\n {\n \"body_text\": \"<string>\",\n \"external_id\": \"<string>\",\n \"sent_at\": \"2023-11-07T05:31:56Z\",\n \"sent_by\": \"<string>\",\n \"subject\": \"<string>\"\n }\n ],\n \"outcome\": {\n \"attended\": true,\n \"clicked_at\": \"2023-11-07T05:31:56Z\",\n \"duration_seconds\": 1,\n \"opened_at\": \"2023-11-07T05:31:56Z\",\n \"replied_at\": \"2023-11-07T05:31:56Z\"\n },\n \"sent_by\": \"<string>\",\n \"subject\": \"<string>\",\n \"url\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"accounts": [
"<string>"
],
"id": "<string>",
"person_id": "<string>",
"result": "created"
}{
"accounts": [
"<string>"
],
"id": "<string>",
"person_id": "<string>",
"result": "created"
}Push an activity
Creates the activity with this source and external_id, or updates it. Returns it with result: created (201), updated or unchanged. Pushes what another system (a marketing platform, a sequencer) did with a person, typed by its channel as Statisfy types its own: email is an email thread, linkedin a LinkedIn conversation, call and meeting a meeting, and webinar, form, web_visit, event and other a marketing event. Each shows its origin: source api on the activity, and pushed.system your system’s name. It is identified by your source and external_id, so sending it again (a retry, a re-sync, an email later opened) updates it in place. A conversation is one activity with its messages (one email or LinkedIn message sent without messages is a thread of one): send it again with the whole thread or only the new messages, and they merge by each message’s external_id; its date is its latest message, and GET /v1/activities//content reads them back, oldest first. The person is matched by email, ignoring case, and created when Statisfy has none; an address on your own domains is a 422. The account is the one you name (account: an id, a CRM id or a domain, else a 404), else the person’s, else their email’s domain (on a CRM-connected workspace only a CRM account matches; a personal address such as gmail.com never does). With no account it stays on the person: send it again once the account exists to add it. It shows on the account’s and the person’s timelines, and agents read it; nothing summarizes it with AI, replies to it, or pushes it to your CRM, and it never counts as your team’s own mail (an email awaiting a reply, a deal gone quiet). The person reaching out (an inbound touch, a message from them, or outcome.replied_at) counts as their engagement and moves the account’s last activity date; a touch that only went out to them does neither.
curl --request PUT \
--url https://api.statisfy.com/v1/activities \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"external_id": "<string>",
"occurred_at": "2023-11-07T05:31:56Z",
"person": {
"email": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"linkedin_url": "<string>",
"title": "<string>"
},
"source": "<string>",
"account": {
"crm_account_id": "<string>",
"domain": "<string>",
"id": "<string>"
},
"body_text": "<string>",
"messages": [
{
"body_text": "<string>",
"external_id": "<string>",
"sent_at": "2023-11-07T05:31:56Z",
"sent_by": "<string>",
"subject": "<string>"
}
],
"outcome": {
"attended": true,
"clicked_at": "2023-11-07T05:31:56Z",
"duration_seconds": 1,
"opened_at": "2023-11-07T05:31:56Z",
"replied_at": "2023-11-07T05:31:56Z"
},
"sent_by": "<string>",
"subject": "<string>",
"url": "<string>"
}
'import requests
url = "https://api.statisfy.com/v1/activities"
payload = {
"external_id": "<string>",
"occurred_at": "2023-11-07T05:31:56Z",
"person": {
"email": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"linkedin_url": "<string>",
"title": "<string>"
},
"source": "<string>",
"account": {
"crm_account_id": "<string>",
"domain": "<string>",
"id": "<string>"
},
"body_text": "<string>",
"messages": [
{
"body_text": "<string>",
"external_id": "<string>",
"sent_at": "2023-11-07T05:31:56Z",
"sent_by": "<string>",
"subject": "<string>"
}
],
"outcome": {
"attended": True,
"clicked_at": "2023-11-07T05:31:56Z",
"duration_seconds": 1,
"opened_at": "2023-11-07T05:31:56Z",
"replied_at": "2023-11-07T05:31:56Z"
},
"sent_by": "<string>",
"subject": "<string>",
"url": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
external_id: '<string>',
occurred_at: '2023-11-07T05:31:56Z',
person: {
email: '<string>',
first_name: '<string>',
last_name: '<string>',
linkedin_url: '<string>',
title: '<string>'
},
source: '<string>',
account: {crm_account_id: '<string>', domain: '<string>', id: '<string>'},
body_text: '<string>',
messages: [
{
body_text: '<string>',
external_id: '<string>',
sent_at: '2023-11-07T05:31:56Z',
sent_by: '<string>',
subject: '<string>'
}
],
outcome: {
attended: true,
clicked_at: '2023-11-07T05:31:56Z',
duration_seconds: 1,
opened_at: '2023-11-07T05:31:56Z',
replied_at: '2023-11-07T05:31:56Z'
},
sent_by: '<string>',
subject: '<string>',
url: '<string>'
})
};
fetch('https://api.statisfy.com/v1/activities', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.statisfy.com/v1/activities",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'external_id' => '<string>',
'occurred_at' => '2023-11-07T05:31:56Z',
'person' => [
'email' => '<string>',
'first_name' => '<string>',
'last_name' => '<string>',
'linkedin_url' => '<string>',
'title' => '<string>'
],
'source' => '<string>',
'account' => [
'crm_account_id' => '<string>',
'domain' => '<string>',
'id' => '<string>'
],
'body_text' => '<string>',
'messages' => [
[
'body_text' => '<string>',
'external_id' => '<string>',
'sent_at' => '2023-11-07T05:31:56Z',
'sent_by' => '<string>',
'subject' => '<string>'
]
],
'outcome' => [
'attended' => true,
'clicked_at' => '2023-11-07T05:31:56Z',
'duration_seconds' => 1,
'opened_at' => '2023-11-07T05:31:56Z',
'replied_at' => '2023-11-07T05:31:56Z'
],
'sent_by' => '<string>',
'subject' => '<string>',
'url' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.statisfy.com/v1/activities"
payload := strings.NewReader("{\n \"external_id\": \"<string>\",\n \"occurred_at\": \"2023-11-07T05:31:56Z\",\n \"person\": {\n \"email\": \"<string>\",\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"linkedin_url\": \"<string>\",\n \"title\": \"<string>\"\n },\n \"source\": \"<string>\",\n \"account\": {\n \"crm_account_id\": \"<string>\",\n \"domain\": \"<string>\",\n \"id\": \"<string>\"\n },\n \"body_text\": \"<string>\",\n \"messages\": [\n {\n \"body_text\": \"<string>\",\n \"external_id\": \"<string>\",\n \"sent_at\": \"2023-11-07T05:31:56Z\",\n \"sent_by\": \"<string>\",\n \"subject\": \"<string>\"\n }\n ],\n \"outcome\": {\n \"attended\": true,\n \"clicked_at\": \"2023-11-07T05:31:56Z\",\n \"duration_seconds\": 1,\n \"opened_at\": \"2023-11-07T05:31:56Z\",\n \"replied_at\": \"2023-11-07T05:31:56Z\"\n },\n \"sent_by\": \"<string>\",\n \"subject\": \"<string>\",\n \"url\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.statisfy.com/v1/activities")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"external_id\": \"<string>\",\n \"occurred_at\": \"2023-11-07T05:31:56Z\",\n \"person\": {\n \"email\": \"<string>\",\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"linkedin_url\": \"<string>\",\n \"title\": \"<string>\"\n },\n \"source\": \"<string>\",\n \"account\": {\n \"crm_account_id\": \"<string>\",\n \"domain\": \"<string>\",\n \"id\": \"<string>\"\n },\n \"body_text\": \"<string>\",\n \"messages\": [\n {\n \"body_text\": \"<string>\",\n \"external_id\": \"<string>\",\n \"sent_at\": \"2023-11-07T05:31:56Z\",\n \"sent_by\": \"<string>\",\n \"subject\": \"<string>\"\n }\n ],\n \"outcome\": {\n \"attended\": true,\n \"clicked_at\": \"2023-11-07T05:31:56Z\",\n \"duration_seconds\": 1,\n \"opened_at\": \"2023-11-07T05:31:56Z\",\n \"replied_at\": \"2023-11-07T05:31:56Z\"\n },\n \"sent_by\": \"<string>\",\n \"subject\": \"<string>\",\n \"url\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.statisfy.com/v1/activities")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"external_id\": \"<string>\",\n \"occurred_at\": \"2023-11-07T05:31:56Z\",\n \"person\": {\n \"email\": \"<string>\",\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"linkedin_url\": \"<string>\",\n \"title\": \"<string>\"\n },\n \"source\": \"<string>\",\n \"account\": {\n \"crm_account_id\": \"<string>\",\n \"domain\": \"<string>\",\n \"id\": \"<string>\"\n },\n \"body_text\": \"<string>\",\n \"messages\": [\n {\n \"body_text\": \"<string>\",\n \"external_id\": \"<string>\",\n \"sent_at\": \"2023-11-07T05:31:56Z\",\n \"sent_by\": \"<string>\",\n \"subject\": \"<string>\"\n }\n ],\n \"outcome\": {\n \"attended\": true,\n \"clicked_at\": \"2023-11-07T05:31:56Z\",\n \"duration_seconds\": 1,\n \"opened_at\": \"2023-11-07T05:31:56Z\",\n \"replied_at\": \"2023-11-07T05:31:56Z\"\n },\n \"sent_by\": \"<string>\",\n \"subject\": \"<string>\",\n \"url\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"accounts": [
"<string>"
],
"id": "<string>",
"person_id": "<string>",
"result": "created"
}{
"accounts": [
"<string>"
],
"id": "<string>",
"person_id": "<string>",
"result": "created"
}Authorizations
An API key, sent as Authorization: Bearer stfy_live_…. See Authentication for how to get one and which scopes it needs.
Body
What was written, in plain text. Left out with messages: a conversation's words are its messages
32768Response
Successful Response
Was this page helpful?