# API - Getting Custom Objects from the 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 the Custom Objects.

<figure><img src="/files/de40deb2a2ec6fe5ffec335a2e6c15f5d9864e5b" alt=""><figcaption><p><em>Object "Support Requests".</em></p></figcaption></figure>

<figure><img src="/files/f6bfb6be6cb3617b22e21b718be92d65a3738861" 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="/files/fcfe69b5b5417b6fd1e7ffa5eddf2cce2c2d160a" alt=""><figcaption><p><em>Getting definitions of Objects.</em></p></figcaption></figure>


---

# Agent Instructions: 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:

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

The question should be specific, self-contained, and written in natural language.
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.
