Skip to main content

Read custom field values through the API

Read the custom field values on contacts, units, reservations and companies through the DoorSpot API or MCP connector, and limit the response to the fields you need.

The DoorSpot API and the DoorSpot MCP connector can return the custom field values saved on contacts, units, reservations and companies. Use this to sync business data you keep in custom fields to another system, and to limit the response to only the fields you need.

Before you begin

  • You need an API key with Read access to the record type you want: Contacts, Units, Reservations or Companies. To create one, go to Settings → Developer and click Create API key.

  • Requests go to https://api.doorspot.com/api/v1 with the header Authorization: Bearer your_api_key_here.

Read custom field values

  1. Send GET /contacts, GET /units, GET /reservations or GET /companies for a list, or add a record ID (for example GET /units/{id}) for one record.

  2. Add ?expand=custom_fields. Each record then includes custom_fields: one entry for every custom field that applies to the record.

  3. Read each entry's id (it starts with cfld_), name and value, for example {"id": "cfld_01HX…", "name": "Gate code", "value": "1234"}. A field with nothing saved returns "value": null.

Return only some custom fields

  1. Copy the id of each field you want from a response with expand=custom_fields.

  2. Add custom_fields with the IDs separated by commas, alongside expand=custom_fields. Example: GET /units?expand=custom_fields&custom_fields=cfld_01HXA,cfld_01HXB

  3. Each record's custom_fields now lists only those fields.

How are unit values filled in?

A unit returns the custom fields that apply to it based on each field's association type. For each field, the value is the unit's own value. When the unit has no value, the API returns the value saved on its direct parent unit. When neither has a value, it returns null. The parent lookup ignores segments.

Good to know

  • The DoorSpot MCP connector's tools for listing and getting contacts, units, reservations and companies accept the same expand and custom_fields options.

  • Custom field values are read-only through the API. On create and update requests, expand=custom_fields returns a 422 error.

  • Property custom fields aren't available through the API.

  • Contacts nested inside another record, such as a reservation's sales rep, don't include custom fields. Request the contact itself.

  • Keys with Use with AI turned on are AI Bot tokens. They receive null for every contact custom field value; the field's id and name are still returned. Unit, reservation and company values are returned as usual.

Troubleshooting

  • 422 error. Check that the request is a GET, and that every ID in custom_fields is a cfld_ ID copied from your own account.

  • 403 error. The key doesn't have Read access to that record type. Update its permissions in Settings → Developer.

  • No custom_fields in the response. Add expand=custom_fields to the request.

  • Every contact value is null. The key has Use with AI turned on, or nothing is saved in those fields.

Related articles

Did this answer your question?