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
curl -L \
  --url 'https://api.usepylon.com/accounts?limit=1' \
  --header 'Authorization: Bearer JWT'
{
  "data": [
    {
      "channels": [
        {
          "channel_id": "text",
          "is_primary": true,
          "source": "text"
        }
      ],
      "created_at": "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": {
        "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
channelsobject[]optional

An array of channels to be linked to this account.

custom_fieldsobject[]optional

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

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.

external_idsobject[]optional

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_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
curl -L \
  --request POST \
  --url 'https://api.usepylon.com/accounts' \
  --header 'Authorization: Bearer JWT' \
  --header 'Content-Type: application/json' \
  --data '{
    "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",
    "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": {
      "id": "text"
    },
    "primary_domain": "text",
    "tags": [
      "text"
    ],
    "type": "text"
  },
  "request_id": "text"
}
get

Get an account by its ID

Authorizations
Path parameters
idstringrequired

The ID or external ID of the account to fetch.

Responses
curl -L \
  --url 'https://api.usepylon.com/accounts/{id}' \
  --header 'Authorization: Bearer JWT'
{
  "data": {
    "channels": [
      {
        "channel_id": "text",
        "is_primary": true,
        "source": "text"
      }
    ],
    "created_at": "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": {
      "id": "text"
    },
    "primary_domain": "text",
    "tags": [
      "text"
    ],
    "type": "text"
  },
  "request_id": "text"
}
patch

Update an existing account

Authorizations
Path parameters
idstringrequired

The ID of the account to update.

Body
channelsobject[]optional

An array of channels to be linked to this account.

custom_fieldsobject[]optional

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

domainsstring[]optional

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

external_idsobject[]optional

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.

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
curl -L \
  --request PATCH \
  --url 'https://api.usepylon.com/accounts/{id}' \
  --header 'Authorization: Bearer JWT' \
  --header 'Content-Type: application/json' \
  --data '{
    "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",
    "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": {
      "id": "text"
    },
    "primary_domain": "text",
    "tags": [
      "text"
    ],
    "type": "text"
  },
  "request_id": "text"
}
delete

Delete an existing account

Authorizations
Path parameters
idstringrequired

The ID of the account to delete.

Responses
curl -L \
  --request DELETE \
  --url 'https://api.usepylon.com/accounts/{id}' \
  --header 'Authorization: Bearer JWT'
{
  "request_id": "text"
}
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.

filterobjectrequired

limitinteger · int64optional

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

Responses
curl -L \
  --request POST \
  --url 'https://api.usepylon.com/accounts/search' \
  --header 'Authorization: Bearer JWT' \
  --header 'Content-Type: application/json' \
  --data '{
    "cursor": "text",
    "filter": {
      "field": "text",
      "operator": "equals",
      "subfilters": [
        "[Circular Reference]"
      ],
      "value": "text",
      "values": [
        "text"
      ]
    },
    "limit": 1
  }'
{
  "data": [
    {
      "channels": [
        {
          "channel_id": "text",
          "is_primary": true,
          "source": "text"
        }
      ],
      "created_at": "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": {
        "id": "text"
      },
      "primary_domain": "text",
      "tags": [
        "text"
      ],
      "type": "text"
    }
  ],
  "pagination": {
    "cursor": "text",
    "has_next_page": true
  },
  "request_id": "text"
}

Last updated

Was this helpful?