Black Friday Black Friday: the new LetsBot bundles save up to 60% — until 30 November only. See the bundles See the bundles
LetsBot Menu
Get Started English Language

Verified Meta Tech Provider UK Registered Company

Language

CRM · API endpoint

GET /api/v1/crm/objects/{key}/schema New

Custom object fields, filters and sorts

The object plus the lists-engine catalogue of its records: every field with its type, whether it can be filtered or sorted, and the filter operators.

The object plus the lists-engine catalogue of its records: every field with its type, whether it can be filtered or sorted, and the filter operators. Scope: crm.

Example request

curl -G "https://your-workspace.letsbot.net/api/v1/crm/objects/co_projects/schema" \
  -H "X-Zapier-Api-Key: YOUR_WORKSPACE_API_KEY" \
  -H "Accept: application/json"
const response = await fetch("https://your-workspace.letsbot.net/api/v1/crm/objects/co_projects/schema", {
  method: "GET",
  headers: {
    "X-Zapier-Api-Key": "YOUR_WORKSPACE_API_KEY",
    "Accept": "application/json",
  },
});

const data = await response.json();
console.log(data);
<?php

$ch = curl_init('https://your-workspace.letsbot.net/api/v1/crm/objects/co_projects/schema');

curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'GET',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'X-Zapier-Api-Key: YOUR_WORKSPACE_API_KEY',
        'Accept: application/json',
    ],
]);

$data = json_decode(curl_exec($ch), true);
curl_close($ch);

print_r($data);
import requests

response = requests.request(
    "GET",
    "https://your-workspace.letsbot.net/api/v1/crm/objects/co_projects/schema",
    headers={
        "X-Zapier-Api-Key": "YOUR_WORKSPACE_API_KEY",
        "Accept": "application/json",
    },
)

print(response.json())

Responses

Schema200
{
  "success": true,
  "data": {
    "key": "co_projects",
    "label_singular": {
      "ar": "مشروع",
      "en": "Project"
    },
    "label_plural": {
      "ar": "مشاريع",
      "en": "Projects"
    },
    "primary_field": "name",
    "fields": [
      {
        "key": "title",
        "label": "Project name",
        "type": "text",
        "filterable": true,
        "sortable": true,
        "operators": [
          "contains",
          "not_contains",
          "eq",
          "is_empty",
          "is_not_empty"
        ],
        "options": []
      },
      {
        "key": "owner",
        "label": "Owner",
        "type": "user",
        "filterable": true,
        "sortable": false,
        "operators": [
          "in",
          "not_in",
          "is_empty",
          "is_not_empty"
        ],
        "options": [
          {
            "value": 3,
            "label": "Sara Ahmed"
          },
          {
            "value": 5,
            "label": "Omar Ali"
          }
        ]
      },
      {
        "key": "updated_at",
        "label": "Updated",
        "type": "date",
        "filterable": true,
        "sortable": true,
        "operators": [
          "within_days",
          "not_within_days",
          "older_than_days",
          "before",
          "after",
          "is_empty",
          "is_not_empty"
        ],
        "options": []
      },
      {
        "key": "created_at",
        "label": "Created",
        "type": "date",
        "filterable": true,
        "sortable": true,
        "operators": [
          "within_days",
          "not_within_days",
          "older_than_days",
          "before",
          "after",
          "is_empty",
          "is_not_empty"
        ],
        "options": []
      },
      {
        "key": "cf:budget",
        "label": "Budget",
        "type": "number",
        "filterable": true,
        "sortable": true,
        "operators": [
          "eq",
          "gt",
          "lt",
          "is_empty",
          "is_not_empty"
        ],
        "options": []
      },
      {
        "key": "cf:status",
        "label": "Status",
        "type": "enum",
        "filterable": true,
        "sortable": false,
        "operators": [
          "in",
          "not_in",
          "is_empty",
          "is_not_empty"
        ],
        "options": [
          {
            "value": "planned",
            "label": "Planned"
          },
          {
            "value": "active",
            "label": "Active"
          }
        ]
      },
      {
        "key": "cf:starts_on",
        "label": "Starts",
        "type": "date",
        "filterable": true,
        "sortable": false,
        "operators": [
          "within_days",
          "not_within_days",
          "older_than_days",
          "before",
          "after",
          "is_empty",
          "is_not_empty"
        ],
        "options": []
      },
      {
        "key": "cf:ends_on",
        "label": "Ends",
        "type": "date",
        "filterable": true,
        "sortable": false,
        "operators": [
          "within_days",
          "not_within_days",
          "older_than_days",
          "before",
          "after",
          "is_empty",
          "is_not_empty"
        ],
        "options": []
      }
    ],
    "sorts": [
      "title",
      "updated_at",
      "created_at",
      "cf:budget"
    ],
    "default_sort": {
      "key": "updated_at",
      "dir": "desc"
    }
  }
}

Ready when you are

Try this endpoint on your own number

The API works during the free trial. Create an account, connect your WhatsApp number and copy your key from API → Authentication Data.