> For the complete documentation index, see [llms.txt](https://docs.sprinthub.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.sprinthub.com/en/topics/api/api-getting-custom-objects-from-the-lead.md).

# API - Getting Custom Objects from the Lead

How to pull custom objects from a Lead.

### Route

<mark style="color:green;">`GET`</mark> `/lead/customobjects/lead-id?apitoken=your-token&i=your-instance`

Full endpoint: <mark style="color:green;"><https://sprinthub-api-master.sprinthub.app/lead/customobjects/lead-id?apitoken=your-token\\&i=your-instance></mark>

### Query Params

<table><thead><tr><th width="291">Key</th><th width="450">Description</th></tr></thead><tbody><tr><td>i</td><td>Identifier of your instance, subdomain.</td></tr><tr><td>apitoken</td><td>API token.</td></tr></tbody></table>

## Getting Lead Custom Objects

The request was sent using the software *Postman*. The expected response is a list of objects with all Custom Objects.

<figure><img src="https://684109703-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9FzUKkagBNy5uQ7AtGNa%2Fuploads%2FCwIdzNd3JiMJ1TwJWH0m%2Fobjetos-1.png?alt=media&amp;token=a5633d69-bf8f-45e7-93e3-c5e06501a3c9" alt=""><figcaption><p><em>Object "Support Tickets".</em></p></figcaption></figure>

<figure><img src="https://684109703-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9FzUKkagBNy5uQ7AtGNa%2Fuploads%2FU1H8k8emQpI46SKcEaMV%2Fobjetos-2.png?alt=media&amp;token=ab9c2df0-2b77-4d66-8e24-4da89bb23839" alt=""><figcaption><p><em>Request response.</em></p></figcaption></figure>

### Getting the definition of Custom Objects

The response from the previous call returns the "*definitionId*", which is the identifier of the instance's Custom Object, to get a list of the definitions, the following call can be used:

<mark style="color:green;">`GET`</mark> `/customobjects/def?query={definitions{id,name,pluralName,relationship{id},isPublished,allowDynamicInsert,fields{label,alias,defaultValue,type,required,uniqueIdentifier,properties}}}&apitoken=your-token&i=your-instance`

Full endpoint: <mark style="color:green;"><https://sprinthub-api-master.sprinthub.app/customobjects/def?query={definitions{id,name,pluralName,relationship{id},isPublished,allowDynamicInsert,fields{label,alias,defaultValue,type,required,uniqueIdentifier,properties\\}}}\\&apitoken=your-token\\&i=your-instance></mark>

<figure><img src="https://684109703-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9FzUKkagBNy5uQ7AtGNa%2Fuploads%2FLyHzqhV8CNLaHtLyrK1S%2Fobjetos-3.png?alt=media&amp;token=6c4f6fc4-30ab-4453-b819-01995ab3123b" alt=""><figcaption><p><em>Getting object definitions.</em></p></figcaption></figure>
