v29

latestOpenAPI 3.0.3raw.githubusercontent.com2026-05-13511526891.2 KB
Lookup Relationships

Get sources by target

Returns a list of source objects whose values are populated with the id of a related target object. For example, if you have a lookup field called "Success Manager" on a ticket, this endpoint can answer the question, "What tickets (sources) is this user (found by target_type and target_id) assigned as the 'Success Manager' (field referenced by field_id)?"

Allowed For

  • Agents

Pagination

  • Cursor pagination (recommended)
  • Offset pagination

See Pagination.

get/api/v2/{target_type}/{target_id}/relationship_fields/{field_id}/{source_type}

Path parameters

target_typestring required

The type of object the relationship field is targeting. The options are "zen:user", "zen:ticket", "zen:organization", and "zen:custom_object:CUSTOM_OBJECT_KEY"

target_idinteger required

The id of the object the relationship field is targeting

field_idinteger required

The id of the lookup relationship field

source_typestring required

The type of object the relationship field belongs to (example. ticket field belongs to a ticket object). The options are "zen:user", "zen:ticket", "zen:organization", and "zen:custom_object:CUSTOM_OBJECT_KEY"

Query parameters

page[before]string

A pagination cursor that tells the endpoint which page to start on. It should be a meta.before_cursor value from a previous request. Note: page[before] and page[after] can't be used together in the same request.

page[after]string

A pagination cursor that tells the endpoint which page to start on. It should be a meta.after_cursor value from a previous request. Note: page[before] and page[after] can't be used together in the same request.

page[size]integer

Specifies how many records should be returned in the response. You can specify up to 100 records per page.

Response

Success response