Title: Permalink Manager &#8211; API
Last modified: June 9, 2022

---

# Permalink Manager – API

 *  Resolved [shoshana100](https://wordpress.org/support/users/shoshana100/)
 * (@shoshana100)
 * [4 years ago](https://wordpress.org/support/topic/permalink-manager-api/)
 * I declared link structure for custom post type (by category and post title). 
   All works well when I add or edit the custom post type by dashboard – but if 
   I edit the post by code – the post link isn’t changed by the category of the 
   post.
 * Is there anyway option to update the link of the post automatically when category
   changed by code or API ? (I set the URI update mode to: auto-update permalinks–
   but it doesn’t work when the edit is by code)
    -  This topic was modified 4 years ago by [shoshana100](https://wordpress.org/support/users/shoshana100/).

Viewing 1 replies (of 1 total)

 *  Plugin Author [Maciej Bis](https://wordpress.org/support/users/mbis/)
 * (@mbis)
 * [4 years ago](https://wordpress.org/support/topic/permalink-manager-api/#post-15724707)
 * Hi [@shoshana100](https://wordpress.org/support/users/shoshana100/),
 * You can find all the API functions that allow to generate and save custom permalinks
   in the below article:
    [https://permalinkmanager.pro/docs/filters-hooks/update-permalinks-programatically/](https://permalinkmanager.pro/docs/filters-hooks/update-permalinks-programatically/)
 * As far as I remember WordPress calls this hook:
    [https://developer.wordpress.org/reference/hooks/set_object_terms/](https://developer.wordpress.org/reference/hooks/set_object_terms/)
 * Unfortunately, because I am on holiday I do not have access to my PC, so I cannot
   send you any ready code snippet.

Viewing 1 replies (of 1 total)

The topic ‘Permalink Manager – API’ is closed to new replies.

 * ![](https://ps.w.org/permalink-manager/assets/icon.svg?rev=2625166)
 * [Permalink Manager Lite](https://wordpress.org/plugins/permalink-manager/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/permalink-manager/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/permalink-manager/)
 * [Active Topics](https://wordpress.org/support/plugin/permalink-manager/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/permalink-manager/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/permalink-manager/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Maciej Bis](https://wordpress.org/support/users/mbis/)
 * Last activity: [4 years ago](https://wordpress.org/support/topic/permalink-manager-api/#post-15724707)
 * Status: resolved