> 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>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.sprinthub.com/en/topics/api/api-getting-custom-objects-from-the-lead.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
