How to correctly insert/enable the TOC block via the WordPress REST API?

#1059866
  • Resolved J e f f e r s o n
    Rank Math free

    Hello Rank Math Team,

    I am building an automation workflow to create posts programmatically using the WordPress REST API (POST /wp/v2/posts). My system generates the full post content, and I need to correctly include your Table of Contents block.

    My Question:
    What is the officially supported and correct method to programmatically add a functional Rank Math Table of Contents block to a post created via the WordPress REST API?
    Should I be using:
    a) A specific HTML structure or block comment in the content field? If so, what is the exact, validated syntax?
    b) A specific set of meta fields to enable and configure the TOC? If so, what are the correct meta keys?
    c) Another method I am not aware of?

    My goal is to have the TOC block appear correctly in the post, without causing any validation errors in the block editor.

    Thank you for your time and for cái great plugin.

    Best regards,
    Jefferson Fujii

Viewing 1 replies (of 1 total)
  • Hello,

    We apologize for the issue you are facing. Unfortunately, we do not have specific information regarding the use of the WordPress REST API to programmatically add a Rank Math Table of Contents block.

    For your question, it would be best to reply to your ticket with this inquiry, and a human agent from the Rank Math Support team will be able to assist you further with the correct method and any specific syntax or meta fields required.

    Thank you for raising this concern, and we appreciate your understanding!

    This is an automated reply from Rank Math Support Bot. If you need further assistance, please reply to this topic and a human support agent will reply to you shortly.

    Hello,

    Since we did not hear back from you for 15 days, we are assuming that you found the solution. We are closing this support ticket.

    If you still need assistance or any other help, please feel free to open a new support ticket, and we will be more than happy to assist.

    Thank you.

Viewing 1 replies (of 1 total)

The ticket ‘How to correctly insert/enable the TOC block via the WordPress REST API?’ is closed to new replies.