In the searching we have done to retrieve ticket source fields for dynamic ticket creation, we noticed that our own created sources do not show up from this request: https://{{domain}}.freshdesk.com/api/v2/ticket_fields.
We are looking for one that is going to be “SMS” but it does not show, is there a different request we need to make in order to get the custom sources?
From the docs, I don’t see source is part of the payload for GET /api/v2/ticket_fields. But, I see that any custom fields are returned with cf_ prefixed to the field’s name.
The other thing to look for is the type field. You should be able to fetch tickets by field type using GET /api/v2/ticket_fields?type={{type_name}}, e.g., GET /api/v2/ticket_fields?type=custom_source.
Let me know if that helps. Otherwise, we will forward this query to the Freshdesk API team.
Hi @kaustavdm, thank you for the reply. I have not had any luck figuring this issue out yet. I have already tried that request, here is the request https://{{domain}}.freshdesk.com/api/v2/ticket_fields?type=custom_source with the response:
{
"description": "Validation failed",
"errors": [
{
"field": "type",
"message": "It should be one of these values: 'default_subject, default_requester, default_ticket_type, default_status, default_priority, default_group, default_agent, default_internal_group, default_internal_agent, default_source, default_description, default_product, default_company, custom_text, custom_paragraph, custom_checkbox, custom_number, custom_date, custom_decimal, custom_dropdown, lookup, nested_field, encrypted_text, custom_date_time, custom_file, secure_text'",
"code": "invalid_value"
}
]
}
custom_source is not listed in expected values. I tried most of the type values to test different results but i have not been able to find anything that returns me the custom sources.