Companies

Query companies

Returns the same records as the list endpoint, with filter, sort, include and pagination sent as a JSON body, so a filter too large for a URL still fits. To fetch the next page, re-send the same body with the next page, or with cursor set to meta.next_cursor after a first request with "cursor": true. A GET to links.next is not a valid request. A body larger than 256 KB returns 413.

post/v1/companies/query

Request

  • Base URL: https://api.relaticle.com
  • URL: https://api.relaticle.com/v1/companies/query
  • Auth: HTTP bearer

Request body

per_pageinteger

Number of results per page (1-100). Default: 15.

cursorstring

Switches to cursor pagination. Send true for the first page, then the meta.next_cursor value of the previous page. Sorts by a custom field need page.

pageinteger

Page number for offset pagination (1-1,000,000, when cursor is not used). Default: 1.

includestring

Include related resources (comma-separated). Allowed: creator, accountOwner, people, opportunities, peopleCount, opportunitiesCount, tasksCount, notesCount.

sortstring

Sort results. Prefix with - for descending. Allowed: name, -name, created_at, -created_at, updated_at, -updated_at.

fieldsstring
filterobject

An object of conditions. Keys starting with $ are keywords: operators ($eq, $contains, $is_empty, $gt, $gte, $lt, $lte, $has_any, $has_none, $in, $not_in) and logic ($and and $or take a list of condition objects, $not takes one and also returns records where the inner fields are empty). Other keys are names. A filter holds at most 20 conditions, 3 levels of $and, $or and $not, and 2 levels of relations. A list holds at most 100 values. Email values match in any letter case. Phone values match in any format, and the operand needs a country code such as +1 415 555 0100. Link values match in any letter case, with or without the scheme. Domain values match as a bare host or a full URL, with or without www. Tags-input values match the exact stored value. Date-time values match a date without a time, such as 2026-10-01, as that whole day. Email and link fields also take a domain sub-field with $in or $not_in, such as {"domain":{"$in":["acme.com"]}}, which matches the host of each value. $not_in and $has_none also match records where the field is empty. $is_empty takes true or false. Native fields: name, created_at, updated_at, creation_source. Relations take $in, $not_in or $is_empty on record ids, or conditions on the related record that use that record type's own filter names, including custom_fields. Prefer conditions over listing the related records first and passing their ids: people (people), opportunities (opportunity). Member relations take $in, $not_in or $is_empty on workspace member ids only, with no nested conditions: creator, accountOwner. custom_fields takes an object keyed by custom field code, each value an operator object.

Example request

{
  "per_page": 15,
  "page": 1,
  "include": "creator",
  "sort": "-created_at",
  "filter": {
    "name": {
      "$contains": "Acme"
    },
    "$or": [
      {
        "creation_source": {
          "$eq": "api"
        }
      },
      {
        "created_at": {
          "$gte": "2026-01-01"
        }
      }
    ]
  }
}

Response

Example response

{
  "data": [
    {
      "id": "",
      "type": "companies",
      "attributes": {
        "name": "Feeney Group",
        "account_owner_id": "01M586GKM2NJSQ57WJ343HGKEM",
        "creation_source": "web",
        "created_at": "2026-10-18T19:06:15.000000Z",
        "updated_at": "2026-10-18T19:06:15.000000Z",
        "custom_fields": {}
      }
    },
    {
      "id": "",
      "type": "companies",
      "attributes": {
        "name": "Ward PLC",
        "account_owner_id": "01M586GKM2NJSQ57WJ343HGKEQ",
        "creation_source": "web",
        "created_at": "2026-10-18T19:06:15.000000Z",
        "updated_at": "2026-10-18T19:06:15.000000Z",
        "custom_fields": {}
      }
    }
  ],
  "links": {
    "first": "/?page=1",
    "last": "/?page=1",
    "prev": null,
    "next": null
  },
  "meta": {
    "current_page": 1,
    "from": 1,
    "last_page": 1,
    "links": [
      {
        "url": null,
        "label": "« Previous",
        "page": null,
        "active": false
      },
      {
        "url": "/?page=1",
        "label": "1",
        "page": 1,
        "active": true
      },
      {
        "url": null,
        "label": "Next »",
        "page": null,
        "active": false
      }
    ],
    "path": "/",
    "per_page": 15,
    "to": 2,
    "total": 2
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.