Eventos de contatos
O que os contatos fizeram nos seus sistemas, e os tipos de atividade que mostram isso.
Valores dos exemplos
Digite uma vez e todos os exemplos desta página passam a usá-los. A chave de API fica só nesta página e nunca é guardada.
GET/v1/contact-events
Lista eventos de contato, por contato, nome, canal ou data.
ListarEm caso de sucesso: 200.Permissão: Ler.
Parâmetros da consulta
| Campo | Tipo | Obrigatório | Observações |
|---|---|---|---|
contactId | string (uuid) | Não | |
companyId | string (uuid) | Não | |
event | string | Não | |
from | string (date-time) | Não | |
to | string (date-time) | Não | |
page | integer | Não | min 1 · default 1 |
pageSize | integer | Não | min 1 · max 100 · default 25 |
Resposta
16 campos
| Campo | Tipo | Sempre presente |
|---|---|---|
data | array of object | Sim |
data[].channel | string | null | Sim |
data[].contactId | string (uuid) | Sim |
data[].contactName | string | Sim |
data[].createdAt | string (date-time) | Sim |
data[].createdBy | string (uuid) | Sim |
data[].createdByName | string | Sim |
data[].event | string | Sim |
data[].id | string (uuid) | Sim |
data[].occurredAt | string (date-time) | Sim |
data[].organizationId | string (uuid) | Sim |
data[].properties | object of any | Sim |
data[].reference | string | null | Sim |
page | integer | Sim |
pageSize | integer | Sim |
total | integer | Sim |
Exemplo
curl -X GET "https://api.firmado.app/v1/contact-events" \
-H "X-Api-Key: fmd_..."const res = await fetch("https://api.firmado.app/v1/contact-events", {
method: "GET",
headers: { "X-Api-Key": "fmd_..." },
})
const data = await res.json()import requests
res = requests.get(
"https://api.firmado.app/v1/contact-events",
headers={"X-Api-Key": "fmd_..."},
)
res.raise_for_status()
data = res.json()<?php
$ch = curl_init("https://api.firmado.app/v1/contact-events");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["X-Api-Key: fmd_..."],
]);
$data = json_decode(curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);require "net/http"
require "json"
uri = URI("https://api.firmado.app/v1/contact-events")
req = Net::HTTP::Get.new(uri)
req["X-Api-Key"] = "fmd_..."
res = Net::HTTP.start(uri.host, uri.port, use_ssl: uri.scheme == "https") { |http| http.request(req) }
data = JSON.parse(res.body)req, _ := http.NewRequest("GET", "https://api.firmado.app/v1/contact-events", nil)
req.Header.Set("X-Api-Key", "fmd_...")
res, err := http.DefaultClient.Do(req)var request = HttpRequest.newBuilder(URI.create("https://api.firmado.app/v1/contact-events"))
.header("X-Api-Key", "fmd_...")
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
var response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());using var http = new HttpClient();
http.DefaultRequestHeaders.Add("X-Api-Key", "fmd_...");
var request = new HttpRequestMessage(new HttpMethod("GET"), "https://api.firmado.app/v1/contact-events");
var response = await http.SendAsync(request);
response.EnsureSuccessStatusCode();Resposta (200), com valores de exemplo:
{
"data": [
{
"id": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"organizationId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"contactId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"event": "…",
"properties": {},
"channel": "…",
"reference": "…",
"occurredAt": "2026-11-21T14:00:00.000Z",
"createdBy": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"createdAt": "2026-11-21T14:00:00.000Z",
"contactName": "Ana Lima",
"createdByName": "Ana Lima"
}
],
"page": 1,
"pageSize": 1,
"total": 1
}POST/v1/contact-events
Registra algo que um contato fez; uma reference repetida é guardada uma vez só.
CriarEm caso de sucesso: 201.Permissão: Criar.
Corpo
| Campo | Tipo | Obrigatório | Observações |
|---|---|---|---|
contactId | string (uuid) | Não | |
email | string (email) | Não | max length 320 |
name | string | Não | min length 1 · max length 200 |
event | string | Sim | |
properties | object of string | number | boolean | null | Não | |
occurredAt | string (date-time) | Não | |
channel | string | null | Não | |
reference | string | Não | min length 1 · max length 120 · pattern ^[\w.:-]+$ |
Resposta
10 campos
| Campo | Tipo | Sempre presente |
|---|---|---|
channel | string | null | Sim |
contactId | string (uuid) | Sim |
createdAt | string (date-time) | Sim |
createdBy | string (uuid) | Sim |
event | string | Sim |
id | string (uuid) | Sim |
occurredAt | string (date-time) | Sim |
organizationId | string (uuid) | Sim |
properties | object of any | Sim |
reference | string | null | Sim |
Exemplo
curl -X POST "https://api.firmado.app/v1/contact-events" \
-H "X-Api-Key: fmd_..." \
-H "Content-Type: application/json" \
-d '{
"event": "…",
"contactId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"email": "[email protected]",
"name": "Ana Lima"
}'const res = await fetch("https://api.firmado.app/v1/contact-events", {
method: "POST",
headers: { "X-Api-Key": "fmd_...", "Content-Type": "application/json" },
body: JSON.stringify({
"event": "…",
"contactId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"email": "[email protected]",
"name": "Ana Lima"
}),
})
const data = await res.json()import requests
res = requests.post(
"https://api.firmado.app/v1/contact-events",
headers={"X-Api-Key": "fmd_..."},
json={
"event": "…",
"contactId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"email": "[email protected]",
"name": "Ana Lima",
},
)
res.raise_for_status()
data = res.json()<?php
$ch = curl_init("https://api.firmado.app/v1/contact-events");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["X-Api-Key: fmd_...", "Content-Type: application/json"],
CURLOPT_POSTFIELDS => <<<'JSON'
{
"event": "…",
"contactId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"email": "[email protected]",
"name": "Ana Lima"
}
JSON,
]);
$data = json_decode(curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);require "net/http"
require "json"
uri = URI("https://api.firmado.app/v1/contact-events")
req = Net::HTTP::Post.new(uri)
req["X-Api-Key"] = "fmd_..."
req["Content-Type"] = "application/json"
req.body = <<~JSON
{
"event": "…",
"contactId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"email": "[email protected]",
"name": "Ana Lima"
}
JSON
res = Net::HTTP.start(uri.host, uri.port, use_ssl: uri.scheme == "https") { |http| http.request(req) }
data = JSON.parse(res.body)body := strings.NewReader(`{
"event": "…",
"contactId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"email": "[email protected]",
"name": "Ana Lima"
}`)
req, _ := http.NewRequest("POST", "https://api.firmado.app/v1/contact-events", body)
req.Header.Set("X-Api-Key", "fmd_...")
req.Header.Set("Content-Type", "application/json")
res, err := http.DefaultClient.Do(req)var request = HttpRequest.newBuilder(URI.create("https://api.firmado.app/v1/contact-events"))
.header("X-Api-Key", "fmd_...")
.header("Content-Type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("""
{
"event": "…",
"contactId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"email": "[email protected]",
"name": "Ana Lima"
}
"""))
.build();
var response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());using var http = new HttpClient();
http.DefaultRequestHeaders.Add("X-Api-Key", "fmd_...");
var request = new HttpRequestMessage(new HttpMethod("POST"), "https://api.firmado.app/v1/contact-events");
request.Content = new StringContent(""""
{
"event": "…",
"contactId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"email": "[email protected]",
"name": "Ana Lima"
}
"""", Encoding.UTF8, "application/json");
var response = await http.SendAsync(request);
response.EnsureSuccessStatusCode();Resposta (201), com valores de exemplo:
{
"id": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"organizationId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"contactId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"event": "…",
"properties": {},
"channel": "…",
"reference": "…",
"occurredAt": "2026-11-21T14:00:00.000Z",
"createdBy": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"createdAt": "2026-11-21T14:00:00.000Z"
}DELETE/v1/contact-events/{id}
Exclui um evento de contato.
ExcluirEm caso de sucesso: 204.Permissão: Excluir.
Parâmetros do caminho
| Campo | Tipo | Obrigatório | Observações |
|---|---|---|---|
id | string | Sim |
Exemplo
curl -X DELETE "https://api.firmado.app/v1/contact-events/{id}" \
-H "X-Api-Key: fmd_..."const res = await fetch("https://api.firmado.app/v1/contact-events/{id}", {
method: "DELETE",
headers: { "X-Api-Key": "fmd_..." },
})
if (!res.ok) throw new Error(await res.text())import requests
res = requests.delete(
"https://api.firmado.app/v1/contact-events/{id}",
headers={"X-Api-Key": "fmd_..."},
)
res.raise_for_status()<?php
$ch = curl_init("https://api.firmado.app/v1/contact-events/{id}");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["X-Api-Key: fmd_..."],
]);
$data = json_decode(curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);require "net/http"
require "json"
uri = URI("https://api.firmado.app/v1/contact-events/{id}")
req = Net::HTTP::Delete.new(uri)
req["X-Api-Key"] = "fmd_..."
res = Net::HTTP.start(uri.host, uri.port, use_ssl: uri.scheme == "https") { |http| http.request(req) }req, _ := http.NewRequest("DELETE", "https://api.firmado.app/v1/contact-events/{id}", nil)
req.Header.Set("X-Api-Key", "fmd_...")
res, err := http.DefaultClient.Do(req)var request = HttpRequest.newBuilder(URI.create("https://api.firmado.app/v1/contact-events/{id}"))
.header("X-Api-Key", "fmd_...")
.method("DELETE", HttpRequest.BodyPublishers.noBody())
.build();
var response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());using var http = new HttpClient();
http.DefaultRequestHeaders.Add("X-Api-Key", "fmd_...");
var request = new HttpRequestMessage(new HttpMethod("DELETE"), "https://api.firmado.app/v1/contact-events/{id}");
var response = await http.SendAsync(request);
response.EnsureSuccessStatusCode();GET/v1/contact-events/{id}
Retorna um evento de contato com suas propriedades.
Ver umEm caso de sucesso: 200.Permissão: Ler.
Parâmetros do caminho
| Campo | Tipo | Obrigatório | Observações |
|---|---|---|---|
id | string | Sim |
Resposta
10 campos
| Campo | Tipo | Sempre presente |
|---|---|---|
channel | null nos exemplos | Sim |
contactId | string (uuid) | Sim |
createdAt | string (date-time) | Sim |
createdBy | string (uuid) | Sim |
event | string | Sim |
id | string (uuid) | Sim |
occurredAt | string (date-time) | Sim |
organizationId | string (uuid) | Sim |
properties | object of any | Sim |
reference | null nos exemplos | Sim |
Exemplo
curl -X GET "https://api.firmado.app/v1/contact-events/{id}" \
-H "X-Api-Key: fmd_..."const res = await fetch("https://api.firmado.app/v1/contact-events/{id}", {
method: "GET",
headers: { "X-Api-Key": "fmd_..." },
})
const data = await res.json()import requests
res = requests.get(
"https://api.firmado.app/v1/contact-events/{id}",
headers={"X-Api-Key": "fmd_..."},
)
res.raise_for_status()
data = res.json()<?php
$ch = curl_init("https://api.firmado.app/v1/contact-events/{id}");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["X-Api-Key: fmd_..."],
]);
$data = json_decode(curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);require "net/http"
require "json"
uri = URI("https://api.firmado.app/v1/contact-events/{id}")
req = Net::HTTP::Get.new(uri)
req["X-Api-Key"] = "fmd_..."
res = Net::HTTP.start(uri.host, uri.port, use_ssl: uri.scheme == "https") { |http| http.request(req) }
data = JSON.parse(res.body)req, _ := http.NewRequest("GET", "https://api.firmado.app/v1/contact-events/{id}", nil)
req.Header.Set("X-Api-Key", "fmd_...")
res, err := http.DefaultClient.Do(req)var request = HttpRequest.newBuilder(URI.create("https://api.firmado.app/v1/contact-events/{id}"))
.header("X-Api-Key", "fmd_...")
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
var response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());using var http = new HttpClient();
http.DefaultRequestHeaders.Add("X-Api-Key", "fmd_...");
var request = new HttpRequestMessage(new HttpMethod("GET"), "https://api.firmado.app/v1/contact-events/{id}");
var response = await http.SendAsync(request);
response.EnsureSuccessStatusCode();Resposta (200), com valores de exemplo:
{
"id": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"organizationId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"contactId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"event": "…",
"properties": {},
"channel": null,
"reference": null,
"occurredAt": "2026-11-21T14:00:00.000Z",
"createdBy": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"createdAt": "2026-11-21T14:00:00.000Z"
}POST/v1/contact-events/batch
Registra até 100 eventos de contato de uma vez, dizendo quais foram guardados.
Criar/batchEm caso de sucesso: 200.Permissão: Criar.
Corpo
| Campo | Tipo | Obrigatório | Observações |
|---|---|---|---|
events | array of object | Sim | min items 1 · max items 100 |
events[].contactId | string (uuid) | Não | |
events[].email | string (email) | Não | max length 320 |
events[].name | string | Não | min length 1 · max length 200 |
events[].event | string | Sim | |
events[].properties | object of string | number | boolean | null | Não | |
events[].occurredAt | string (date-time) | Não | |
events[].channel | string | null | Não | |
events[].reference | string | Não | min length 1 · max length 120 · pattern ^[\w.:-]+$ |
Resposta
7 campos
| Campo | Tipo | Sempre presente |
|---|---|---|
recorded | integer | Sim |
results | array of object | Sim |
results[].error | object | Não |
results[].error.code | string | Sim |
results[].error.message | string | Sim |
results[].id | string (uuid) | Não |
results[].index | integer | Sim |
Exemplo
curl -X POST "https://api.firmado.app/v1/contact-events/batch" \
-H "X-Api-Key: fmd_..." \
-H "Content-Type: application/json" \
-d '{
"events": [
{
"event": "…",
"contactId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"email": "[email protected]",
"name": "Ana Lima"
}
]
}'const res = await fetch("https://api.firmado.app/v1/contact-events/batch", {
method: "POST",
headers: { "X-Api-Key": "fmd_...", "Content-Type": "application/json" },
body: JSON.stringify({
"events": [
{
"event": "…",
"contactId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"email": "[email protected]",
"name": "Ana Lima"
}
]
}),
})
const data = await res.json()import requests
res = requests.post(
"https://api.firmado.app/v1/contact-events/batch",
headers={"X-Api-Key": "fmd_..."},
json={
"events": [
{
"event": "…",
"contactId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"email": "[email protected]",
"name": "Ana Lima",
},
],
},
)
res.raise_for_status()
data = res.json()<?php
$ch = curl_init("https://api.firmado.app/v1/contact-events/batch");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["X-Api-Key: fmd_...", "Content-Type: application/json"],
CURLOPT_POSTFIELDS => <<<'JSON'
{
"events": [
{
"event": "…",
"contactId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"email": "[email protected]",
"name": "Ana Lima"
}
]
}
JSON,
]);
$data = json_decode(curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);require "net/http"
require "json"
uri = URI("https://api.firmado.app/v1/contact-events/batch")
req = Net::HTTP::Post.new(uri)
req["X-Api-Key"] = "fmd_..."
req["Content-Type"] = "application/json"
req.body = <<~JSON
{
"events": [
{
"event": "…",
"contactId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"email": "[email protected]",
"name": "Ana Lima"
}
]
}
JSON
res = Net::HTTP.start(uri.host, uri.port, use_ssl: uri.scheme == "https") { |http| http.request(req) }
data = JSON.parse(res.body)body := strings.NewReader(`{
"events": [
{
"event": "…",
"contactId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"email": "[email protected]",
"name": "Ana Lima"
}
]
}`)
req, _ := http.NewRequest("POST", "https://api.firmado.app/v1/contact-events/batch", body)
req.Header.Set("X-Api-Key", "fmd_...")
req.Header.Set("Content-Type", "application/json")
res, err := http.DefaultClient.Do(req)var request = HttpRequest.newBuilder(URI.create("https://api.firmado.app/v1/contact-events/batch"))
.header("X-Api-Key", "fmd_...")
.header("Content-Type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("""
{
"events": [
{
"event": "…",
"contactId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"email": "[email protected]",
"name": "Ana Lima"
}
]
}
"""))
.build();
var response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());using var http = new HttpClient();
http.DefaultRequestHeaders.Add("X-Api-Key", "fmd_...");
var request = new HttpRequestMessage(new HttpMethod("POST"), "https://api.firmado.app/v1/contact-events/batch");
request.Content = new StringContent(""""
{
"events": [
{
"event": "…",
"contactId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"email": "[email protected]",
"name": "Ana Lima"
}
]
}
"""", Encoding.UTF8, "application/json");
var response = await http.SendAsync(request);
response.EnsureSuccessStatusCode();Resposta (200), com valores de exemplo:
{
"recorded": 1,
"results": [
{
"index": 1,
"error": {},
"id": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10"
}
]
}GET/v1/contact-events/names
Cada nome de evento em uso, com quantos há e o mais recente.
Ler/namesEm caso de sucesso: 200.Permissão: Ler.
Resposta
3 campos
| Campo | Tipo | Sempre presente |
|---|---|---|
[].event | string | Sim |
[].lastAt | string (date-time) | Sim |
[].total | integer | Sim |
Exemplo
curl -X GET "https://api.firmado.app/v1/contact-events/names" \
-H "X-Api-Key: fmd_..."const res = await fetch("https://api.firmado.app/v1/contact-events/names", {
method: "GET",
headers: { "X-Api-Key": "fmd_..." },
})
const data = await res.json()import requests
res = requests.get(
"https://api.firmado.app/v1/contact-events/names",
headers={"X-Api-Key": "fmd_..."},
)
res.raise_for_status()
data = res.json()<?php
$ch = curl_init("https://api.firmado.app/v1/contact-events/names");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["X-Api-Key: fmd_..."],
]);
$data = json_decode(curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);require "net/http"
require "json"
uri = URI("https://api.firmado.app/v1/contact-events/names")
req = Net::HTTP::Get.new(uri)
req["X-Api-Key"] = "fmd_..."
res = Net::HTTP.start(uri.host, uri.port, use_ssl: uri.scheme == "https") { |http| http.request(req) }
data = JSON.parse(res.body)req, _ := http.NewRequest("GET", "https://api.firmado.app/v1/contact-events/names", nil)
req.Header.Set("X-Api-Key", "fmd_...")
res, err := http.DefaultClient.Do(req)var request = HttpRequest.newBuilder(URI.create("https://api.firmado.app/v1/contact-events/names"))
.header("X-Api-Key", "fmd_...")
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
var response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());using var http = new HttpClient();
http.DefaultRequestHeaders.Add("X-Api-Key", "fmd_...");
var request = new HttpRequestMessage(new HttpMethod("GET"), "https://api.firmado.app/v1/contact-events/names");
var response = await http.SendAsync(request);
response.EnsureSuccessStatusCode();Resposta (200), com valores de exemplo:
[
{
"event": "…",
"total": 1,
"lastAt": "2026-11-21T14:00:00.000Z"
}
]GET/v1/contact-events/types
Os tipos de atividade: quais eventos aparecem nas páginas de contatos e empresas, e como.
Ler/typesEm caso de sucesso: 200.Permissão: Ler.
Exemplo
curl -X GET "https://api.firmado.app/v1/contact-events/types" \
-H "X-Api-Key: fmd_..."const res = await fetch("https://api.firmado.app/v1/contact-events/types", {
method: "GET",
headers: { "X-Api-Key": "fmd_..." },
})
const data = await res.json()import requests
res = requests.get(
"https://api.firmado.app/v1/contact-events/types",
headers={"X-Api-Key": "fmd_..."},
)
res.raise_for_status()
data = res.json()<?php
$ch = curl_init("https://api.firmado.app/v1/contact-events/types");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["X-Api-Key: fmd_..."],
]);
$data = json_decode(curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);require "net/http"
require "json"
uri = URI("https://api.firmado.app/v1/contact-events/types")
req = Net::HTTP::Get.new(uri)
req["X-Api-Key"] = "fmd_..."
res = Net::HTTP.start(uri.host, uri.port, use_ssl: uri.scheme == "https") { |http| http.request(req) }
data = JSON.parse(res.body)req, _ := http.NewRequest("GET", "https://api.firmado.app/v1/contact-events/types", nil)
req.Header.Set("X-Api-Key", "fmd_...")
res, err := http.DefaultClient.Do(req)var request = HttpRequest.newBuilder(URI.create("https://api.firmado.app/v1/contact-events/types"))
.header("X-Api-Key", "fmd_...")
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
var response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());using var http = new HttpClient();
http.DefaultRequestHeaders.Add("X-Api-Key", "fmd_...");
var request = new HttpRequestMessage(new HttpMethod("GET"), "https://api.firmado.app/v1/contact-events/types");
var response = await http.SendAsync(request);
response.EnsureSuccessStatusCode();Resposta (200), com valores de exemplo:
[]POST/v1/contact-events/types
Cria um tipo de atividade para um nome de evento.
Criar/typesEm caso de sucesso: 201.Permissão: Criar.
Corpo
| Campo | Tipo | Obrigatório | Observações |
|---|---|---|---|
event | string | Sim | |
label | string | Sim | min length 1 · max length 80 |
color | "gray" | "blue" | "teal" | "green" | "amber" | "orange" | "red" | "pink" | "violet" | Sim | |
icon | "activity" | "star" | "heart" | "thumbs-up" | "trophy" | "gift" | "cart" | "card" | "user-plus" | "log-in" | "mail" | "phone" | "message" | "calendar" | "map-pin" | "eye" | "download" | "rocket" | "zap" | "alert" | Sim | |
summary | string | null | Não | |
showOnCompany | boolean | Não | default true |
notify | boolean | Não | default false |
active | boolean | Não | default true |
Resposta
12 campos
| Campo | Tipo | Sempre presente |
|---|---|---|
active | boolean | Sim |
color | string | Sim |
createdAt | string (date-time) | Sim |
event | string | Sim |
icon | string | Sim |
id | string (uuid) | Sim |
label | string | Sim |
notify | boolean | Sim |
organizationId | string (uuid) | Sim |
showOnCompany | boolean | Sim |
summary | string | Sim |
updatedAt | string (date-time) | Sim |
Exemplo
curl -X POST "https://api.firmado.app/v1/contact-events/types" \
-H "X-Api-Key: fmd_..." \
-H "Content-Type: application/json" \
-d '{
"event": "…",
"label": "…",
"color": "gray",
"icon": "activity"
}'const res = await fetch("https://api.firmado.app/v1/contact-events/types", {
method: "POST",
headers: { "X-Api-Key": "fmd_...", "Content-Type": "application/json" },
body: JSON.stringify({
"event": "…",
"label": "…",
"color": "gray",
"icon": "activity"
}),
})
const data = await res.json()import requests
res = requests.post(
"https://api.firmado.app/v1/contact-events/types",
headers={"X-Api-Key": "fmd_..."},
json={
"event": "…",
"label": "…",
"color": "gray",
"icon": "activity",
},
)
res.raise_for_status()
data = res.json()<?php
$ch = curl_init("https://api.firmado.app/v1/contact-events/types");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["X-Api-Key: fmd_...", "Content-Type: application/json"],
CURLOPT_POSTFIELDS => <<<'JSON'
{
"event": "…",
"label": "…",
"color": "gray",
"icon": "activity"
}
JSON,
]);
$data = json_decode(curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);require "net/http"
require "json"
uri = URI("https://api.firmado.app/v1/contact-events/types")
req = Net::HTTP::Post.new(uri)
req["X-Api-Key"] = "fmd_..."
req["Content-Type"] = "application/json"
req.body = <<~JSON
{
"event": "…",
"label": "…",
"color": "gray",
"icon": "activity"
}
JSON
res = Net::HTTP.start(uri.host, uri.port, use_ssl: uri.scheme == "https") { |http| http.request(req) }
data = JSON.parse(res.body)body := strings.NewReader(`{
"event": "…",
"label": "…",
"color": "gray",
"icon": "activity"
}`)
req, _ := http.NewRequest("POST", "https://api.firmado.app/v1/contact-events/types", body)
req.Header.Set("X-Api-Key", "fmd_...")
req.Header.Set("Content-Type", "application/json")
res, err := http.DefaultClient.Do(req)var request = HttpRequest.newBuilder(URI.create("https://api.firmado.app/v1/contact-events/types"))
.header("X-Api-Key", "fmd_...")
.header("Content-Type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("""
{
"event": "…",
"label": "…",
"color": "gray",
"icon": "activity"
}
"""))
.build();
var response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());using var http = new HttpClient();
http.DefaultRequestHeaders.Add("X-Api-Key", "fmd_...");
var request = new HttpRequestMessage(new HttpMethod("POST"), "https://api.firmado.app/v1/contact-events/types");
request.Content = new StringContent(""""
{
"event": "…",
"label": "…",
"color": "gray",
"icon": "activity"
}
"""", Encoding.UTF8, "application/json");
var response = await http.SendAsync(request);
response.EnsureSuccessStatusCode();Resposta (201), com valores de exemplo:
{
"id": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"organizationId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"event": "…",
"label": "…",
"color": "…",
"icon": "…",
"summary": "…",
"showOnCompany": true,
"notify": true,
"active": true,
"createdAt": "2026-11-21T14:00:00.000Z",
"updatedAt": "2026-11-21T14:00:00.000Z"
}DELETE/v1/contact-events/types/{id}
Exclui um tipo de atividade; os eventos continuam, sem aparecer como atividade.
Excluir/types/{id}Em caso de sucesso: 204.Permissão: Excluir.
Parâmetros do caminho
| Campo | Tipo | Obrigatório | Observações |
|---|---|---|---|
id | string | Sim |
Exemplo
curl -X DELETE "https://api.firmado.app/v1/contact-events/types/{id}" \
-H "X-Api-Key: fmd_..."const res = await fetch("https://api.firmado.app/v1/contact-events/types/{id}", {
method: "DELETE",
headers: { "X-Api-Key": "fmd_..." },
})
if (!res.ok) throw new Error(await res.text())import requests
res = requests.delete(
"https://api.firmado.app/v1/contact-events/types/{id}",
headers={"X-Api-Key": "fmd_..."},
)
res.raise_for_status()<?php
$ch = curl_init("https://api.firmado.app/v1/contact-events/types/{id}");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["X-Api-Key: fmd_..."],
]);
$data = json_decode(curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);require "net/http"
require "json"
uri = URI("https://api.firmado.app/v1/contact-events/types/{id}")
req = Net::HTTP::Delete.new(uri)
req["X-Api-Key"] = "fmd_..."
res = Net::HTTP.start(uri.host, uri.port, use_ssl: uri.scheme == "https") { |http| http.request(req) }req, _ := http.NewRequest("DELETE", "https://api.firmado.app/v1/contact-events/types/{id}", nil)
req.Header.Set("X-Api-Key", "fmd_...")
res, err := http.DefaultClient.Do(req)var request = HttpRequest.newBuilder(URI.create("https://api.firmado.app/v1/contact-events/types/{id}"))
.header("X-Api-Key", "fmd_...")
.method("DELETE", HttpRequest.BodyPublishers.noBody())
.build();
var response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());using var http = new HttpClient();
http.DefaultRequestHeaders.Add("X-Api-Key", "fmd_...");
var request = new HttpRequestMessage(new HttpMethod("DELETE"), "https://api.firmado.app/v1/contact-events/types/{id}");
var response = await http.SendAsync(request);
response.EnsureSuccessStatusCode();PUT/v1/contact-events/types/{id}
Altera um tipo de atividade: rótulo, cor, ícone e resumo.
Atualizar/types/{id}Em caso de sucesso: 200.Permissão: Atualizar.
Parâmetros do caminho
| Campo | Tipo | Obrigatório | Observações |
|---|---|---|---|
id | string | Sim |
Corpo
| Campo | Tipo | Obrigatório | Observações |
|---|---|---|---|
event | string | Sim | |
label | string | Sim | min length 1 · max length 80 |
color | "gray" | "blue" | "teal" | "green" | "amber" | "orange" | "red" | "pink" | "violet" | Sim | |
icon | "activity" | "star" | "heart" | "thumbs-up" | "trophy" | "gift" | "cart" | "card" | "user-plus" | "log-in" | "mail" | "phone" | "message" | "calendar" | "map-pin" | "eye" | "download" | "rocket" | "zap" | "alert" | Sim | |
summary | string | null | Não | |
showOnCompany | boolean | Não | default true |
notify | boolean | Não | default false |
active | boolean | Não | default true |
Resposta
12 campos
| Campo | Tipo | Sempre presente |
|---|---|---|
active | boolean | Sim |
color | string | Sim |
createdAt | string (date-time) | Sim |
event | string | Sim |
icon | string | Sim |
id | string (uuid) | Sim |
label | string | Sim |
notify | boolean | Sim |
organizationId | string (uuid) | Sim |
showOnCompany | boolean | Sim |
summary | string | Sim |
updatedAt | string (date-time) | Sim |
Exemplo
curl -X PUT "https://api.firmado.app/v1/contact-events/types/{id}" \
-H "X-Api-Key: fmd_..." \
-H "Content-Type: application/json" \
-d '{
"event": "…",
"label": "…",
"color": "gray",
"icon": "activity"
}'const res = await fetch("https://api.firmado.app/v1/contact-events/types/{id}", {
method: "PUT",
headers: { "X-Api-Key": "fmd_...", "Content-Type": "application/json" },
body: JSON.stringify({
"event": "…",
"label": "…",
"color": "gray",
"icon": "activity"
}),
})
const data = await res.json()import requests
res = requests.put(
"https://api.firmado.app/v1/contact-events/types/{id}",
headers={"X-Api-Key": "fmd_..."},
json={
"event": "…",
"label": "…",
"color": "gray",
"icon": "activity",
},
)
res.raise_for_status()
data = res.json()<?php
$ch = curl_init("https://api.firmado.app/v1/contact-events/types/{id}");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["X-Api-Key: fmd_...", "Content-Type: application/json"],
CURLOPT_POSTFIELDS => <<<'JSON'
{
"event": "…",
"label": "…",
"color": "gray",
"icon": "activity"
}
JSON,
]);
$data = json_decode(curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);require "net/http"
require "json"
uri = URI("https://api.firmado.app/v1/contact-events/types/{id}")
req = Net::HTTP::Put.new(uri)
req["X-Api-Key"] = "fmd_..."
req["Content-Type"] = "application/json"
req.body = <<~JSON
{
"event": "…",
"label": "…",
"color": "gray",
"icon": "activity"
}
JSON
res = Net::HTTP.start(uri.host, uri.port, use_ssl: uri.scheme == "https") { |http| http.request(req) }
data = JSON.parse(res.body)body := strings.NewReader(`{
"event": "…",
"label": "…",
"color": "gray",
"icon": "activity"
}`)
req, _ := http.NewRequest("PUT", "https://api.firmado.app/v1/contact-events/types/{id}", body)
req.Header.Set("X-Api-Key", "fmd_...")
req.Header.Set("Content-Type", "application/json")
res, err := http.DefaultClient.Do(req)var request = HttpRequest.newBuilder(URI.create("https://api.firmado.app/v1/contact-events/types/{id}"))
.header("X-Api-Key", "fmd_...")
.header("Content-Type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("""
{
"event": "…",
"label": "…",
"color": "gray",
"icon": "activity"
}
"""))
.build();
var response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());using var http = new HttpClient();
http.DefaultRequestHeaders.Add("X-Api-Key", "fmd_...");
var request = new HttpRequestMessage(new HttpMethod("PUT"), "https://api.firmado.app/v1/contact-events/types/{id}");
request.Content = new StringContent(""""
{
"event": "…",
"label": "…",
"color": "gray",
"icon": "activity"
}
"""", Encoding.UTF8, "application/json");
var response = await http.SendAsync(request);
response.EnsureSuccessStatusCode();Resposta (200), com valores de exemplo:
{
"id": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"organizationId": "3f0b6c3e-8a51-4c2b-9a51-0d6f3b2a7c10",
"event": "…",
"label": "…",
"color": "…",
"icon": "…",
"summary": "…",
"showOnCompany": true,
"notify": true,
"active": true,
"createdAt": "2026-11-21T14:00:00.000Z",
"updatedAt": "2026-11-21T14:00:00.000Z"
}Eventos de webhook
Mudanças desta funcionalidade que os webhooks podem enviar.
contact_event.createdCriarcontact_event.deletedExcluir