Skip to content

Enterprise Metadata — Examples

Replace {enterpriseId} with your enterprise ID and YOUR_SYNC_TOKEN with a valid Sync token.

These endpoints are the discovery surface — call them once at integration startup, cache the results, and refresh on a slow cadence.

Discover the lead identifier

Step 1 — fetch enterprise metadata to learn the identifier field's ID:

bash
curl "https://next.telecrm.in/autoupdate/v2/enterprise/{enterpriseId}/metadata" \
  -H "Authorization: Bearer YOUR_SYNC_TOKEN"

The response includes leadIdentifierFieldId. Step 2 — list all custom fields with detail=true to find the matching field's API name:

bash
curl "https://next.telecrm.in/autoupdate/v2/enterprise/{enterpriseId}/custom-fields?detail=true" \
  -H "Authorization: Bearer YOUR_SYNC_TOKEN"

Match customFields[].id against leadIdentifierFieldId from step 1; the corresponding apiName is what every lead payload must include.

TIP

For most workspaces the identifier is phone. The two-step flow above handles the cases where it isn't (e.g. workspaces using a custom text identifier like a customer ID).

Discover dropdown options before posting

bash
curl "https://next.telecrm.in/autoupdate/v2/enterprise/{enterpriseId}/custom-fields/contact_source" \
  -H "Authorization: Bearer YOUR_SYNC_TOKEN"

Returns the field's full definition including all valid options[].label values. Use these labels exactly when sending dropdown values — though unknown labels auto-create new options, deliberately discovering existing ones avoids accidentally creating duplicates.

Discover writable custom action codes

bash
curl "https://next.telecrm.in/autoupdate/v2/enterprise/{enterpriseId}/custom-actions" \
  -H "Authorization: Bearer YOUR_SYNC_TOKEN"

Returns the summary list. Each entry's code is ACTION_<numeric>. Strip the ACTION_ prefix when calling the Sync API — pass just "1001" (the numeric portion) as the action type. The Async API uses the full ACTION_1001 form.

Discover valid status labels

bash
curl "https://next.telecrm.in/autoupdate/v2/enterprise/{enterpriseId}/lead-stage-pipeline" \
  -H "Authorization: Bearer YOUR_SYNC_TOKEN"

Iterate leadStages[].activeStatuses[].label to build the set of values you can send as lead.fields.status. Filter out archivedStatuses — those exist for historical leads but are not accepted on new ones.

Discover the workspace's date format

bash
curl "https://next.telecrm.in/autoupdate/v2/enterprise/{enterpriseId}/custom-fields?detail=true" \
  -H "Authorization: Bearer YOUR_SYNC_TOKEN"

For each entry where type: "DATE", the dateFormat and timeFormat fields tell you how to format date inputs. For example, DD/MM/YYYY + HH:mm means values like "01/06/2026 10:30" are accepted. Unix milliseconds are always accepted as an alternative — see Field Types → date.