Skip to main content
POST
/
v1
/
interactions
Create an interaction
curl --request POST \
  --url https://api.folk.app/v1/interactions \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "entity": {
    "id": "per_55175e81-9a52-4ac3-930e-82792c23499b"
  },
  "dateTime": "2025-07-17T09:00:00.000Z",
  "title": "Coffee with John Doe",
  "content": "Had a coffee with John Doe\nDiscussed the new project.",
  "type": "coffee",
  "activityType": "coffee"
}
'
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: JSON.stringify({
    entity: {id: 'per_55175e81-9a52-4ac3-930e-82792c23499b'},
    dateTime: '2025-07-17T09:00:00.000Z',
    title: 'Coffee with John Doe',
    content: 'Had a coffee with John Doe\nDiscussed the new project.',
    type: 'coffee',
    activityType: 'coffee'
  })
};

fetch('https://api.folk.app/v1/interactions', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
import requests

url = "https://api.folk.app/v1/interactions"

payload = {
    "entity": { "id": "per_55175e81-9a52-4ac3-930e-82792c23499b" },
    "dateTime": "2025-07-17T09:00:00.000Z",
    "title": "Coffee with John Doe",
    "content": "Had a coffee with John Doe
Discussed the new project.",
    "type": "coffee",
    "activityType": "coffee"
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

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

print(response.text)
require 'uri'
require 'net/http'

url = URI("https://api.folk.app/v1/interactions")

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

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"entity\": {\n    \"id\": \"per_55175e81-9a52-4ac3-930e-82792c23499b\"\n  },\n  \"dateTime\": \"2025-07-17T09:00:00.000Z\",\n  \"title\": \"Coffee with John Doe\",\n  \"content\": \"Had a coffee with John Doe\\nDiscussed the new project.\",\n  \"type\": \"coffee\",\n  \"activityType\": \"coffee\"\n}"

response = http.request(request)
puts response.read_body
package main

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

func main() {

	url := "https://api.folk.app/v1/interactions"

	payload := strings.NewReader("{\n  \"entity\": {\n    \"id\": \"per_55175e81-9a52-4ac3-930e-82792c23499b\"\n  },\n  \"dateTime\": \"2025-07-17T09:00:00.000Z\",\n  \"title\": \"Coffee with John Doe\",\n  \"content\": \"Had a coffee with John Doe\\nDiscussed the new project.\",\n  \"type\": \"coffee\",\n  \"activityType\": \"coffee\"\n}")

	req, _ := http.NewRequest("POST", 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))

}
<?php

$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => "https://api.folk.app/v1/interactions",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => json_encode([
    'entity' => [
        'id' => 'per_55175e81-9a52-4ac3-930e-82792c23499b'
    ],
    'dateTime' => '2025-07-17T09:00:00.000Z',
    'title' => 'Coffee with John Doe',
    'content' => 'Had a coffee with John Doe
Discussed the new project.',
    'type' => 'coffee',
    'activityType' => 'coffee'
  ]),
  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;
}
{
  "data": {
    "id": "lit_b049db09-c03d-4f32-96d6-d314760add5d",
    "interactionType": "logged",
    "from": {
      "type": "user",
      "value": "usr_14c18444-a0c7-459a-86b0-ccd70ebcd65c",
      "name": "John Doe"
    },
    "to": {
      "type": "person",
      "value": "per_55175e81-9a52-4ac3-930e-82792c23499b",
      "name": "John Doe"
    },
    "title": "Coffee with John Doe",
    "content": "Had a coffee with John Doe\nDiscussed the new project.",
    "entity": {
      "id": "per_55175e81-9a52-4ac3-930e-82792c23499b",
      "entityType": "person",
      "fullName": "John Doe"
    },
    "dateTime": "2025-07-17T09:00:00.000Z",
    "privacyLevel": "sharedFull",
    "type": "coffee",
    "activityType": "coffee"
  }
}
{
  "error": {
    "code": "INVALID_REQUEST",
    "message": "The request was invalid.",
    "documentationUrl": "https://developer.folk.app/api-reference/errors#bad-request",
    "requestId": "123e4567-e89b-12d3-a456-426614174000",
    "timestamp": "2025-10-01T12:00:00Z"
  }
}
{
  "error": {
    "code": "UNAUTHORIZED",
    "message": "No valid API key provided.",
    "documentationUrl": "https://developer.folk.app/api-reference/errors#unauthorized",
    "requestId": "123e4567-e89b-12d3-a456-426614174000",
    "timestamp": "2025-10-01T12:00:00Z"
  }
}
{
  "error": {
    "code": "FORBIDDEN",
    "message": "The API key doesn’t have permissions to perform the request.",
    "documentationUrl": "https://developer.folk.app/api-reference/errors#forbidden",
    "requestId": "123e4567-e89b-12d3-a456-426614174000",
    "timestamp": "2025-10-01T12:00:00Z"
  }
}
{
  "error": {
    "code": "RESOURCE_NOT_FOUND",
    "message": "The requested resource was not found.",
    "documentationUrl": "https://developer.folk.app/api-reference/errors#not-found",
    "requestId": "123e4567-e89b-12d3-a456-426614174000",
    "timestamp": "2025-10-01T12:00:00Z"
  }
}
{
  "error": {
    "code": "UNPROCESSABLE_ENTITY",
    "message": "Invalid query parameters",
    "documentationUrl": "https://developer.folk.app/api-reference/errors#unprocessable-entity",
    "details": {
      "issues": [
        {
          "code": "too_small",
          "minimum": 1,
          "type": "number",
          "inclusive": true,
          "exact": false,
          "message": "Number must be greater than or equal to 1",
          "path": [
            "limit"
          ]
        }
      ]
    },
    "requestId": "123e4567-e89b-12d3-a456-426614174000",
    "timestamp": "2025-10-01T12:00:00Z"
  }
}
{
  "error": {
    "code": "RATE_LIMIT_EXCEEDED",
    "message": "The rate limit has been exceeded.",
    "documentationUrl": "https://developer.folk.app/api-reference/errors#rate-limiting",
    "requestId": "123e4567-e89b-12d3-a456-426614174000",
    "timestamp": "2025-10-01T12:00:00Z",
    "details": {
      "limit": 1000,
      "remaining": 0,
      "retryAfter": "2025-10-01T12:00:00Z"
    }
  }
}
{
  "error": {
    "code": "INTERNAL_SERVER_ERROR",
    "message": "An internal server error occurred.",
    "documentationUrl": "https://developer.folk.app/api-reference/errors#internal-server-error",
    "requestId": "123e4567-e89b-12d3-a456-426614174000",
    "timestamp": "2025-10-01T12:00:00Z"
  }
}
{
  "error": {
    "code": "SERVICE_UNAVAILABLE",
    "message": "The service is currently unavailable.",
    "documentationUrl": "https://developer.folk.app/api-reference/errors#service-unavailable",
    "requestId": "123e4567-e89b-12d3-a456-426614174000",
    "timestamp": "2025-10-01T12:00:00Z"
  }
}

Authorizations

Authorization
string
header
required

API key for authentication

Body

application/json
entity
object
required

The entity connected to the interaction. You can link people or companies.

Example:
{
  "id": "per_55175e81-9a52-4ac3-930e-82792c23499b"
}
dateTime
string<date-time>
required

The date and time of the interaction.

Maximum string length: 24
Example:

"2025-07-17T09:00:00.000Z"

title
string
required

The title of the interaction.

Maximum string length: 255
Example:

"Coffee with John Doe"

content
string
required

The multi-line content of the interaction.

Maximum string length: 100000
Example:

"Had a coffee with John Doe\nDiscussed the new project."

type
deprecated

Deprecated. Use activityType instead.

Maximum string length: 50
Example:

"coffee"

activityType

The logged activity type. Can be a predefined activity, a messaging app, or an emoji.

Maximum string length: 50
Example:

"coffee"

Response

The created interaction.

data
object
required

A manually logged interaction linked to an entity.

Example:
{
  "id": "lit_b049db09-c03d-4f32-96d6-d314760add5d",
  "interactionType": "logged",
  "from": {
    "type": "user",
    "value": "usr_14c18444-a0c7-459a-86b0-ccd70ebcd65c",
    "name": "John Doe"
  },
  "to": {
    "type": "person",
    "value": "per_55175e81-9a52-4ac3-930e-82792c23499b",
    "name": "John Doe"
  },
  "title": "Coffee with John Doe",
  "content": "Had a coffee with John Doe\nDiscussed the new project.",
  "entity": {
    "id": "per_55175e81-9a52-4ac3-930e-82792c23499b",
    "entityType": "person",
    "fullName": "John Doe"
  },
  "dateTime": "2025-07-17T09:00:00.000Z",
  "privacyLevel": "sharedFull",
  "type": "coffee",
  "activityType": "coffee"
}
deprecations
string[]
Example:
["This field is deprecated"]