curl --request POST \
--url 'https://api-prod.usefini.com/v2/macros/public' \
--header 'Authorization: Bearer fini_your_api_key' \
--header 'Content-Type: application/json' \
--data '{"title": "Documents sent", "body": "Hi {{attributes.firstName}}, your requested documents are ready."}'
const response = await fetch('https://api-prod.usefini.com/v2/macros/public', {
method: 'POST',
headers: {"Authorization": "Bearer fini_your_api_key", "Content-Type": "application/json"},
body: JSON.stringify({"title": "Documents sent", "body": "Hi {{attributes.firstName}}, your requested documents are ready."})
});
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
const data = await response.json();
import requests
response = requests.post(
"https://api-prod.usefini.com/v2/macros/public",
headers={"Authorization": "Bearer fini_your_api_key"},
json={"title": "Documents sent", "body": "Hi {{attributes.firstName}}, your requested documents are ready."},
)
response.raise_for_status()
data = response.json()
{
"id": "e73b7a87-6eaf-4e77-8d04-5a3f29a52f60",
"companyId": "97c8757b-83be-45aa-9f29-749d03f873fb",
"title": "Documents sent",
"body": "Hi {{attributes.firstName}}, your requested documents are ready.",
"createdBy": "a5dc0132-4998-4be2-a821-910881658bcb",
"updatedBy": "a5dc0132-4998-4be2-a821-910881658bcb",
"createdAt": "2026-10-08T08:00:00.000Z",
"updatedAt": "2026-10-08T08:00:00.000Z"
}
Macros
Create macro
Create a shared saved reply without sending a message.
POST
/
v2
/
macros
/
public
curl --request POST \
--url 'https://api-prod.usefini.com/v2/macros/public' \
--header 'Authorization: Bearer fini_your_api_key' \
--header 'Content-Type: application/json' \
--data '{"title": "Documents sent", "body": "Hi {{attributes.firstName}}, your requested documents are ready."}'
const response = await fetch('https://api-prod.usefini.com/v2/macros/public', {
method: 'POST',
headers: {"Authorization": "Bearer fini_your_api_key", "Content-Type": "application/json"},
body: JSON.stringify({"title": "Documents sent", "body": "Hi {{attributes.firstName}}, your requested documents are ready."})
});
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
const data = await response.json();
import requests
response = requests.post(
"https://api-prod.usefini.com/v2/macros/public",
headers={"Authorization": "Bearer fini_your_api_key"},
json={"title": "Documents sent", "body": "Hi {{attributes.firstName}}, your requested documents are ready."},
)
response.raise_for_status()
data = response.json()
{
"id": "e73b7a87-6eaf-4e77-8d04-5a3f29a52f60",
"companyId": "97c8757b-83be-45aa-9f29-749d03f873fb",
"title": "Documents sent",
"body": "Hi {{attributes.firstName}}, your requested documents are ready.",
"createdBy": "a5dc0132-4998-4be2-a821-910881658bcb",
"updatedBy": "a5dc0132-4998-4be2-a821-910881658bcb",
"createdAt": "2026-10-08T08:00:00.000Z",
"updatedAt": "2026-10-08T08:00:00.000Z"
}
Create a shared saved reply without sending a message. See the Macros overview for the shared object and scope model.
Headers
string
required
Bearer token containing your workspace API key. The key needs
write scope.Body
string
required
Non-empty title, up to 150 characters after trimming. Titles must be unique within the workspace, ignoring case and surrounding spaces.
string
required
Non-empty Markdown message, up to 10,000 characters after trimming. Variables are stored as template text, not resolved by this endpoint.
Response
Returns the macro object. Examples use synthetic IDs and timestamps.curl --request POST \
--url 'https://api-prod.usefini.com/v2/macros/public' \
--header 'Authorization: Bearer fini_your_api_key' \
--header 'Content-Type: application/json' \
--data '{"title": "Documents sent", "body": "Hi {{attributes.firstName}}, your requested documents are ready."}'
const response = await fetch('https://api-prod.usefini.com/v2/macros/public', {
method: 'POST',
headers: {"Authorization": "Bearer fini_your_api_key", "Content-Type": "application/json"},
body: JSON.stringify({"title": "Documents sent", "body": "Hi {{attributes.firstName}}, your requested documents are ready."})
});
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
const data = await response.json();
import requests
response = requests.post(
"https://api-prod.usefini.com/v2/macros/public",
headers={"Authorization": "Bearer fini_your_api_key"},
json={"title": "Documents sent", "body": "Hi {{attributes.firstName}}, your requested documents are ready."},
)
response.raise_for_status()
data = response.json()
{
"id": "e73b7a87-6eaf-4e77-8d04-5a3f29a52f60",
"companyId": "97c8757b-83be-45aa-9f29-749d03f873fb",
"title": "Documents sent",
"body": "Hi {{attributes.firstName}}, your requested documents are ready.",
"createdBy": "a5dc0132-4998-4be2-a821-910881658bcb",
"updatedBy": "a5dc0132-4998-4be2-a821-910881658bcb",
"createdAt": "2026-10-08T08:00:00.000Z",
"updatedAt": "2026-10-08T08:00:00.000Z"
}
Errors
400: Invalid parameters or failed field validation.401: Missing or invalid credential.403: Credential lacks the required scope.406: No workspace is associated with the authenticated user.409: Another macro already uses that title in this workspace.
Was this page helpful?

