Endpoints

Create Pod

POST/v1/pods

Creates a new Pod from a CRM record using a specified template. Requires the CreatePod scope.


Authentication

This endpoint requires a valid API key with the CreatePod scope. Pass it via the Authorization header:

Authorization: Bearer trpt_a1b2c3_your_key_here

Parameters

Body Parameters

ParameterTypeRequiredDescription
crm_typestringRequiredThe CRM provider. One of: "hubspot", "salesforce", "activecampaign", "msdynamics", "sugarcrm", "brevo", "pipedrive".
crm_objectstringRequiredThe CRM object type to create the Pod from. Valid values depend on the crm_type — see the table below.
crm_idstringRequiredThe unique identifier of the record in your CRM.
template_idstringRequiredThe ID of the trumpet template to use for the Pod. You can find this in the URL of the Template, e.g like 69f0bafc4cc54b506b0355d8.
owner_emailstringOptionalEmail address of the user who should own the Pod. Must be a member of your brand. Defaults to the user who created the API key.

Valid CRM Objects by Type

The crm_object value must be valid for the given crm_type. Note that Salesforce uses PascalCase object names while other CRMs use lowercase.

CRM TypeValid Objects
hubspot
contactsdealscompanies
salesforce
LeadOpportunityAccountContact
activecampaign
contactsdealscompanies
msdynamics
contactsdealscompanies
sugarcrm
contactsdealscompanies
brevo
dealscompanies
pipedrive
dealscontacts

Example Request

cURL
curl -X POST https://trumpet.app/api/v1/pods/new \
  -H "Authorization: Bearer trpt_a1b2c3_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "crm_type": "hubspot",
    "crm_object": "deals",
    "crm_id": "12345",
    "template_id": "tpl_abc123",
    "owner_email": "alice@yourcompany.com"
  }'
JavaScript
const response = await fetch("https://trumpet.app/api/v1/pods/new", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${process.env.TRUMPET_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    crm_type: "hubspot",
    crm_object: "deals",
    crm_id: "12345",
    template_id: "tpl_abc123",
    owner_email: "alice@yourcompany.com",
  }),
});

const { success, data } = await response.json();
Python
import os, requests

response = requests.post(
    "https://trumpet.app/api/v1/pods/new",
    headers={
        "Authorization": f"Bearer {os.environ['TRUMPET_API_KEY']}",
        "Content-Type": "application/json",
    },
    json={
        "crm_type": "hubspot",
        "crm_object": "deals",
        "crm_id": "12345",
        "template_id": "tpl_abc123",
        "owner_email": "alice@yourcompany.com",
    },
)

data = response.json()

Success Response

Returns 200 OK with the created Pod data:

200 OK
{
  "success": true,
  "data": {
    "id": "69f0bafc4cc54b506b0355d8",
    "edit_url": "https://trumpet.app/pods/edit/69f0bafc4cc54b506b0355d8",
    "live_url": "https://trumpet.app/pods/69f0bafc4cc54b506b0355d8/live"
  }
}

Error Responses

StatusErrorCause
400Validation errorMissing or invalid field. The error message specifies which field and what's wrong.
400No {crm_type} integration foundThe specified CRM isn't connected to the brand. Connect it in Settings → Integrations.
401Invalid or revoked API keyThe API key is missing, malformed, revoked, or deleted.
403Insufficient permissionsThe API key lacks the CreatePod scope.
404Brand not foundThe brand associated with the API key has been deleted.
404User not foundThe owner_email doesn't match any user in the brand, or the key creator no longer exists.
404CRM record not foundThe crm_id doesn't match any record of the specified crm_object type in the CRM.

💡

Finding your template ID

Open any template in the trumpet dashboard and check the URL — the template ID is the last like 69f0bafc4cc54b506b0355d8.