Accounts

Get a list of accounts.

GEThttps://api.usepylon.com/accounts
Query parameters
Response
Body
dataarray of Account (object)

The data payload of the response.

paginationPagination (object)
request_idstring

The request ID for tracking.

Request
const response = await fetch('https://api.usepylon.com/accounts?limit=0', {
    method: 'GET',
    headers: {},
});
const data = await response.json();
Response
{
  "data": [
    {
      "channels": [
        {
          "channel_id": "text",
          "source": "text"
        }
      ],
      "created_at": "text",
      "domain": "text",
      "domains": [
        "text"
      ],
      "external_ids": [
        {
          "external_id": "text",
          "label": "text"
        }
      ],
      "id": "text",
      "latest_customer_activity_time": "text",
      "name": "text",
      "owner": {
        "id": "text"
      },
      "primary_domain": "text",
      "tags": [
        "text"
      ],
      "type": "text"
    }
  ],
  "pagination": {
    "cursor": "text",
    "has_next_page": false
  },
  "request_id": "text"
}

Create a new account.

POSThttps://api.usepylon.com/accounts
Body
channelsarray of Channel (object)

An array of channels to be linked to this account.

custom_fieldsarray of CustomFieldValue (object)

An array of custom fields to be used on this account.

domainstring

Deprecated. Please use Domains and PrimaryDomain instead.

domainsarray of string

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

external_idsarray of ExternalID (object)

An array of external IDs to be used on this account. If provided, the accounts external IDs will be updated to the given external IDs.

logo_urlstring

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

name*string

The name of the account.

primary_domainstring

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

tagsarray of string

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

Response
Body
dataAccount (object)
request_idstring

The request ID for tracking.

Request
const response = await fetch('https://api.usepylon.com/accounts', {
    method: 'POST',
    headers: {
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      "name": "text"
    }),
});
const data = await response.json();
Response
{
  "data": {
    "channels": [
      {
        "channel_id": "text",
        "source": "text"
      }
    ],
    "created_at": "text",
    "domain": "text",
    "domains": [
      "text"
    ],
    "external_ids": [
      {
        "external_id": "text",
        "label": "text"
      }
    ],
    "id": "text",
    "latest_customer_activity_time": "text",
    "name": "text",
    "owner": {
      "id": "text"
    },
    "primary_domain": "text",
    "tags": [
      "text"
    ],
    "type": "text"
  },
  "request_id": "text"
}

Get an account by its ID.

GEThttps://api.usepylon.com/accounts/{id}
Path parameters
id*string

The ID of the account to fetch.

Response
Body
dataAccount (object)
request_idstring

The request ID for tracking.

Request
const response = await fetch('https://api.usepylon.com/accounts/{id}', {
    method: 'GET',
    headers: {},
});
const data = await response.json();
Response
{
  "data": {
    "channels": [
      {
        "channel_id": "text",
        "source": "text"
      }
    ],
    "created_at": "text",
    "domain": "text",
    "domains": [
      "text"
    ],
    "external_ids": [
      {
        "external_id": "text",
        "label": "text"
      }
    ],
    "id": "text",
    "latest_customer_activity_time": "text",
    "name": "text",
    "owner": {
      "id": "text"
    },
    "primary_domain": "text",
    "tags": [
      "text"
    ],
    "type": "text"
  },
  "request_id": "text"
}

Update an existing account.

PATCHhttps://api.usepylon.com/accounts/{id}
Path parameters
id*string

The ID of the account to update.

Body
channelsarray of Channel (object)

An array of channels to be linked to this account.

custom_fieldsarray of CustomFieldValue (object)

An array of custom fields to be used on this account.

domainsarray of string

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

external_idsarray of ExternalID (object)

An array of external IDs to be used on this account. If provided, the accounts external IDs will be updated to the given external IDs.

namestring

The name of the account.

owner_idstring

The ID of the owner of the account.

primary_domainstring

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

tagsarray of string

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

Response
Body
dataAccount (object)
request_idstring

The request ID for tracking.

Request
const response = await fetch('https://api.usepylon.com/accounts/{id}', {
    method: 'PATCH',
    headers: {
      "Content-Type": "application/json"
    },
    body: JSON.stringify({}),
});
const data = await response.json();
Response
{
  "data": {
    "channels": [
      {
        "channel_id": "text",
        "source": "text"
      }
    ],
    "created_at": "text",
    "domain": "text",
    "domains": [
      "text"
    ],
    "external_ids": [
      {
        "external_id": "text",
        "label": "text"
      }
    ],
    "id": "text",
    "latest_customer_activity_time": "text",
    "name": "text",
    "owner": {
      "id": "text"
    },
    "primary_domain": "text",
    "tags": [
      "text"
    ],
    "type": "text"
  },
  "request_id": "text"
}

Currently, the following fields are filterable for accounts:

  • domains

  • tags

  • name

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

POSThttps://api.usepylon.com/accounts/search
Body
cursorstring

The cursor to use for pagination.

filter*Filter (object)
limitinteger (int64)

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

Response
Body
dataarray of Account (object)

The data payload of the response.

paginationPagination (object)
request_idstring

The request ID for tracking.

Request
const response = await fetch('https://api.usepylon.com/accounts/search', {
    method: 'POST',
    headers: {
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      "filter": {
        "field": "text",
        "operator": "equals"
      }
    }),
});
const data = await response.json();
Response
{
  "data": [
    {
      "channels": [
        {
          "channel_id": "text",
          "source": "text"
        }
      ],
      "created_at": "text",
      "domain": "text",
      "domains": [
        "text"
      ],
      "external_ids": [
        {
          "external_id": "text",
          "label": "text"
        }
      ],
      "id": "text",
      "latest_customer_activity_time": "text",
      "name": "text",
      "owner": {
        "id": "text"
      },
      "primary_domain": "text",
      "tags": [
        "text"
      ],
      "type": "text"
    }
  ],
  "pagination": {
    "cursor": "text",
    "has_next_page": false
  },
  "request_id": "text"
}

Last updated