> ## Documentation Index
> Fetch the complete documentation index at: https://developer.folk.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Custom objects

> One set of endpoints for every object type in a group.

Groups in folk can contain any object type you define. **Deals** is the default object type, but you can create your own custom objects — Projects, Applications, Properties, and so on.

Every object type shares the same API: list, create, get, update, and delete under `/v1/groups/{groupId}/{objectType}`.

<Info>
  The [Deals](/api-reference/deals/list-deals) endpoints and the ones below are
  the same operations. `Deals` is simply the most common value of the
  `objectType` path parameter.
</Info>

## Available endpoints

| Operation                                                          | Endpoint                                              |
| ------------------------------------------------------------------ | ----------------------------------------------------- |
| [List objects](/api-reference/custom-objects/list-objects)         | `GET /v1/groups/{groupId}/{objectType}`               |
| [Create an object](/api-reference/custom-objects/create-an-object) | `POST /v1/groups/{groupId}/{objectType}`              |
| [Get an object](/api-reference/custom-objects/get-an-object)       | `GET /v1/groups/{groupId}/{objectType}/{objectId}`    |
| [Update an object](/api-reference/custom-objects/update-an-object) | `PATCH /v1/groups/{groupId}/{objectType}/{objectId}`  |
| [Delete an object](/api-reference/custom-objects/delete-an-object) | `DELETE /v1/groups/{groupId}/{objectType}/{objectId}` |

## Find the object types of a group

The `objectType` path parameter is the name of the object type, exactly as it appears in the folk app (for example `Deals`, `Projects`, or `Applications`). The match is case-sensitive.

To list the object types available in a group, call [List group custom fields](/api-reference/group-custom-fields/list-group-custom-fields) with `person` as the entity type. Every field returned with a `type` of `objectField` is an object type you can use, and its `name` is the value to pass as `objectType`.

```bash theme={null}
curl -X GET "https://api.folk.app/v1/groups/grp_bc984b3f-0386-434d-82d7-a91eb6badd71/custom-fields/person" \
  -H "Authorization: Bearer YOUR_API_KEY"
```

```json theme={null}
{
  "data": {
    "items": [
      { "name": "Deals", "type": "objectField" },
      { "name": "Applications", "type": "objectField" },
      { "name": "Lifecycle stage", "type": "singleSelect" }
    ],
    "pagination": {}
  }
}
```

In the response above, both `Deals` and `Applications` can be used as `objectType`.

<Warning>
  If the object type does not exist in the group, the API returns a `404 Not
      Found` response whose message lists the entity types available in that group.
</Warning>

## Shared fields

Whatever the object type, every object has the same native fields:

* `name`: The name of the object.
* `people`: A list of people associated with the object.
* `companies`: A list of companies associated with the object.
* `createdAt`: The date and time the object was created.
* `createdBy`: The user who created the object.

Everything else is a custom field, defined per object type in the group, and read or written through `customFieldValues`.

<Card horizontal title="Custom fields" icon="rectangle-list" href="/core-concepts/custom-fields">
  Read more about custom fields <Icon icon="arrow-right" />
</Card>
