For the complete documentation index, see llms.txt. This page is also available as Markdown.

Macros

Get a macro by its ID

get
/macros/{id}

Returns a single macro by ID.

Rate limit: 300 requests per minute

Authorizations
AuthorizationstringRequired

Authorization: Bearer

Path parameters
idstringRequired

The ID of the macro.

Responses
200Success
application/json
request_idstringOptional

The request ID for tracking.

get/macros/{id}
GET /macros/{id} HTTP/1.1
Host: api.usepylon.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "data": {
    "actions": [
      {
        "type": "text"
      }
    ],
    "created_at": "text",
    "has_actions": true,
    "id": "text",
    "macro_group_id": "text",
    "name": "text",
    "text_html": "text",
    "text_type": "text",
    "updated_at": "text",
    "visibility": {
      "team_ids": [
        "text"
      ],
      "type": "text",
      "user_ids": [
        "text"
      ]
    }
  },
  "request_id": "text"
}

Get all macros

get
/macros

Returns all macros for the organization. Optionally filter by macro group ID.

Rate limit: 300 requests per minute

Authorizations
AuthorizationstringRequired

Authorization: Bearer

Query parameters
macro_group_idstringOptional

Filter macros by macro group ID.

Responses
200Success
application/json
request_idstringOptional

The request ID for tracking.

get/macros
GET /macros HTTP/1.1
Host: api.usepylon.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "data": [
    {
      "actions": [
        {
          "type": "text"
        }
      ],
      "created_at": "text",
      "has_actions": true,
      "id": "text",
      "macro_group_id": "text",
      "name": "text",
      "text_html": "text",
      "text_type": "text",
      "updated_at": "text",
      "visibility": {
        "team_ids": [
          "text"
        ],
        "type": "text",
        "user_ids": [
          "text"
        ]
      }
    }
  ],
  "request_id": "text"
}

Delete an existing macro

delete
/macros/{id}

Permanently deletes a macro by ID.

Rate limit: 120 requests per minute

Authorizations
AuthorizationstringRequired

Authorization: Bearer

Path parameters
idstringRequired

The ID of the macro to delete.

Responses
200Success
application/json
request_idstringOptional

The request ID for tracking.

delete/macros/{id}
DELETE /macros/{id} HTTP/1.1
Host: api.usepylon.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "request_id": "text"
}

Get all macro groups

get
/macro-groups

Returns all macro groups for the organization.

Rate limit: 300 requests per minute

Authorizations
AuthorizationstringRequired

Authorization: Bearer

Responses
200Success
application/json
request_idstringOptional

The request ID for tracking.

get/macro-groups
GET /macro-groups HTTP/1.1
Host: api.usepylon.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "data": [
    {
      "created_at": "text",
      "id": "text",
      "title": "text",
      "updated_at": "text"
    }
  ],
  "request_id": "text"
}

Update a macro

patch
/macros/{id}

Updates an existing macro by ID. All fields are optional; only provided fields will be updated.

Rate limit: 300 requests per minute

Authorizations
AuthorizationstringRequired

Authorization: Bearer

Path parameters
idstringRequired

The ID of the macro to update.

Body
macro_group_idstringOptional

The ID of the macro group this macro belongs to.

namestringOptional

The name of the macro.

text_htmlstringOptional

The HTML content of the macro.

text_typestringOptional

The type of text: "reply", "note", or "email".

Responses
200Success
application/json
request_idstringOptional

The request ID for tracking.

patch/macros/{id}
PATCH /macros/{id} HTTP/1.1
Host: api.usepylon.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 295

{
  "conditions": {
    "field": "text",
    "operator": "equals",
    "subfilters": [
      {
        "field": "state",
        "operator": "equals",
        "value": "new"
      }
    ],
    "value": "text",
    "values": [
      "text"
    ]
  },
  "macro_group_id": "text",
  "name": "text",
  "text_html": "text",
  "text_type": "text",
  "visibility": {
    "team_ids": [
      "text"
    ],
    "type": "org",
    "user_ids": [
      "text"
    ]
  }
}
{
  "data": {
    "actions": [
      {
        "type": "text"
      }
    ],
    "created_at": "text",
    "has_actions": true,
    "id": "text",
    "macro_group_id": "text",
    "name": "text",
    "text_html": "text",
    "text_type": "text",
    "updated_at": "text",
    "visibility": {
      "team_ids": [
        "text"
      ],
      "type": "text",
      "user_ids": [
        "text"
      ]
    }
  },
  "request_id": "text"
}

Create a new macro

post
/macros

Creates a new macro within the specified macro group.

Rate limit: 300 requests per minute

Authorizations
AuthorizationstringRequired

Authorization: Bearer

Body
macro_group_idstringRequired

The ID of the macro group this macro belongs to.

namestringRequired

The name of the macro.

text_htmlstringRequired

The HTML content of the macro.

text_typestringOptional

The type of text: "reply", "note", or "email". Defaults to "reply".

Responses
200Success
application/json
request_idstringOptional

The request ID for tracking.

post/macros
POST /macros HTTP/1.1
Host: api.usepylon.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 295

{
  "conditions": {
    "field": "text",
    "operator": "equals",
    "subfilters": [
      {
        "field": "state",
        "operator": "equals",
        "value": "new"
      }
    ],
    "value": "text",
    "values": [
      "text"
    ]
  },
  "macro_group_id": "text",
  "name": "text",
  "text_html": "text",
  "text_type": "text",
  "visibility": {
    "team_ids": [
      "text"
    ],
    "type": "org",
    "user_ids": [
      "text"
    ]
  }
}
{
  "data": {
    "actions": [
      {
        "type": "text"
      }
    ],
    "created_at": "text",
    "has_actions": true,
    "id": "text",
    "macro_group_id": "text",
    "name": "text",
    "text_html": "text",
    "text_type": "text",
    "updated_at": "text",
    "visibility": {
      "team_ids": [
        "text"
      ],
      "type": "text",
      "user_ids": [
        "text"
      ]
    }
  },
  "request_id": "text"
}

Last updated

Was this helpful?