Accounts

get

Get a list of accounts

Authorizations
Query parameters
cursorstringOptional

The cursor to use for pagination.

limitinteger · int64Required

The number of accounts to fetch. Defaults to 100. Must be greater than 0 and less than 1000.

Responses
200Success
application/json
get
GET /accounts HTTP/1.1
Host: api.usepylon.com
Authorization: Bearer JWT
Accept: */*
{
  "data": [
    {
      "channels": [
        {
          "channel_id": "text",
          "is_primary": true,
          "source": "text"
        }
      ],
      "created_at": "text",
      "crm_settings": {
        "details": [
          {
            "id": "text",
            "source": "text"
          }
        ]
      },
      "custom_fields": {
        "ANY_ADDITIONAL_PROPERTY": {
          "slug": "text",
          "value": "text",
          "values": [
            "text"
          ]
        }
      },
      "domain": "text",
      "domains": [
        "text"
      ],
      "external_ids": [
        {
          "external_id": "text",
          "label": "text"
        }
      ],
      "id": "text",
      "latest_customer_activity_time": "text",
      "name": "text",
      "owner": {
        "email": "text",
        "id": "text"
      },
      "primary_domain": "text",
      "tags": [
        "text"
      ],
      "type": "text"
    }
  ],
  "pagination": {
    "cursor": "text",
    "has_next_page": true
  },
  "request_id": "text"
}
post

Create a new account

Authorizations
Body
domainstringOptional

Deprecated. Please use Domains and PrimaryDomain instead.

domainsstring[]Optional

The domains of the account, without any leading scheme, for example stripe.com. Must specify one domain as primary.

logo_urlstringOptional

The logo URL of the account. Must be a square .png, .jpg or .jpeg.

namestringRequired

The name of the account.

primary_domainstringOptional

Must be in the list of domains. If there are any domains, there must be exactly one primary domain.

tagsstring[]Optional

An array of strings to use as tags on this account. If provided, the accounts tags will be updated to the given tags.

Responses
200Success
application/json
post
POST /accounts HTTP/1.1
Host: api.usepylon.com
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 299

{
  "channels": [
    {
      "channel_id": "text",
      "is_primary": true,
      "source": "text"
    }
  ],
  "custom_fields": [
    {
      "slug": "text",
      "value": "text",
      "values": [
        "text"
      ]
    }
  ],
  "domain": "text",
  "domains": [
    "text"
  ],
  "external_ids": [
    {
      "external_id": "text",
      "label": "text"
    }
  ],
  "logo_url": "text",
  "name": "text",
  "primary_domain": "text",
  "tags": [
    "text"
  ]
}
{
  "data": {
    "channels": [
      {
        "channel_id": "text",
        "is_primary": true,
        "source": "text"
      }
    ],
    "created_at": "text",
    "crm_settings": {
      "details": [
        {
          "id": "text",
          "source": "text"
        }
      ]
    },
    "custom_fields": {
      "ANY_ADDITIONAL_PROPERTY": {
        "slug": "text",
        "value": "text",
        "values": [
          "text"
        ]
      }
    },
    "domain": "text",
    "domains": [
      "text"
    ],
    "external_ids": [
      {
        "external_id": "text",
        "label": "text"
      }
    ],
    "id": "text",
    "latest_customer_activity_time": "text",
    "name": "text",
    "owner": {
      "email": "text",
      "id": "text"
    },
    "primary_domain": "text",
    "tags": [
      "text"
    ],
    "type": "text"
  },
  "request_id": "text"
}
get

Get an account by its ID or external ID

Authorizations
Path parameters
idstringRequired

The ID or external ID of the account to fetch.

Responses
200Success
application/json
get
GET /accounts/{id} HTTP/1.1
Host: api.usepylon.com
Authorization: Bearer JWT
Accept: */*
{
  "data": {
    "channels": [
      {
        "channel_id": "text",
        "is_primary": true,
        "source": "text"
      }
    ],
    "created_at": "text",
    "crm_settings": {
      "details": [
        {
          "id": "text",
          "source": "text"
        }
      ]
    },
    "custom_fields": {
      "ANY_ADDITIONAL_PROPERTY": {
        "slug": "text",
        "value": "text",
        "values": [
          "text"
        ]
      }
    },
    "domain": "text",
    "domains": [
      "text"
    ],
    "external_ids": [
      {
        "external_id": "text",
        "label": "text"
      }
    ],
    "id": "text",
    "latest_customer_activity_time": "text",
    "name": "text",
    "owner": {
      "email": "text",
      "id": "text"
    },
    "primary_domain": "text",
    "tags": [
      "text"
    ],
    "type": "text"
  },
  "request_id": "text"
}
patch

Update an existing account

Authorizations
Path parameters
idstringRequired

The ID or external ID of the account to update.

Body
domainsstring[]Optional

Domains of the account. Must specify one domain as primary.

namestringOptional

The name of the account.

owner_idstringOptional

The ID of the owner of the account.

primary_domainstringOptional

Must be in the list of domains. If there are any domains, there must be exactly one primary domain.

tagsstring[]Optional

An array of strings to use as tags on this account. If provided, the accounts tags will be updated to the given tags.

Responses
200Success
application/json
patch
PATCH /accounts/{id} HTTP/1.1
Host: api.usepylon.com
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 283

{
  "channels": [
    {
      "channel_id": "text",
      "is_primary": true,
      "source": "text"
    }
  ],
  "custom_fields": [
    {
      "slug": "text",
      "value": "text",
      "values": [
        "text"
      ]
    }
  ],
  "domains": [
    "text"
  ],
  "external_ids": [
    {
      "external_id": "text",
      "label": "text"
    }
  ],
  "name": "text",
  "owner_id": "text",
  "primary_domain": "text",
  "tags": [
    "text"
  ]
}
{
  "data": {
    "channels": [
      {
        "channel_id": "text",
        "is_primary": true,
        "source": "text"
      }
    ],
    "created_at": "text",
    "crm_settings": {
      "details": [
        {
          "id": "text",
          "source": "text"
        }
      ]
    },
    "custom_fields": {
      "ANY_ADDITIONAL_PROPERTY": {
        "slug": "text",
        "value": "text",
        "values": [
          "text"
        ]
      }
    },
    "domain": "text",
    "domains": [
      "text"
    ],
    "external_ids": [
      {
        "external_id": "text",
        "label": "text"
      }
    ],
    "id": "text",
    "latest_customer_activity_time": "text",
    "name": "text",
    "owner": {
      "email": "text",
      "id": "text"
    },
    "primary_domain": "text",
    "tags": [
      "text"
    ],
    "type": "text"
  },
  "request_id": "text"
}
delete

Delete an existing account

Authorizations
Path parameters
idstringRequired

The ID or external ID of the account to delete.

Responses
200Success
application/json
delete
DELETE /accounts/{id} HTTP/1.1
Host: api.usepylon.com
Authorization: Bearer JWT
Accept: */*
200Success
{
  "request_id": "text"
}

Search for accounts by a given filter

post

Currently, the following fields are filterable for accounts:

  • domains. Allowed operators: contains, does_not_contain, in, not_in

  • tags. Allowed operators: contains, does_not_contain, in, not_in

  • name. Allowed operators: equals, in, not_in

  • custom fields (pass in the slug of the custom field)

Authorizations
Body
cursorstringOptional

The cursor to use for pagination.

limitinteger · int64Optional

The number of accounts to fetch. Defaults to 100. Must be greater than 0 and less than 1000.

Responses
200Success
application/json
post
POST /accounts/search HTTP/1.1
Host: api.usepylon.com
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 312

{
  "cursor": "text",
  "filter": {
    "field": "text",
    "operator": "equals",
    "subfilters": [
      {
        "field": "text",
        "operator": "equals",
        "subfilters": [
          {
            "field": "text",
            "operator": "equals",
            "subfilters": "[Circular Reference]",
            "value": "text",
            "values": [
              "text"
            ]
          }
        ],
        "value": "text",
        "values": [
          "text"
        ]
      }
    ],
    "value": "text",
    "values": [
      "text"
    ]
  },
  "limit": 1
}
{
  "data": [
    {
      "channels": [
        {
          "channel_id": "text",
          "is_primary": true,
          "source": "text"
        }
      ],
      "created_at": "text",
      "crm_settings": {
        "details": [
          {
            "id": "text",
            "source": "text"
          }
        ]
      },
      "custom_fields": {
        "ANY_ADDITIONAL_PROPERTY": {
          "slug": "text",
          "value": "text",
          "values": [
            "text"
          ]
        }
      },
      "domain": "text",
      "domains": [
        "text"
      ],
      "external_ids": [
        {
          "external_id": "text",
          "label": "text"
        }
      ],
      "id": "text",
      "latest_customer_activity_time": "text",
      "name": "text",
      "owner": {
        "email": "text",
        "id": "text"
      },
      "primary_domain": "text",
      "tags": [
        "text"
      ],
      "type": "text"
    }
  ],
  "pagination": {
    "cursor": "text",
    "has_next_page": true
  },
  "request_id": "text"
}

Last updated

Was this helpful?