• Resolved digidev

    (@digidev)


    I’m trying to create a custom post type via this API to no avail. I did not see the API call in docs either (POST probably?) – post type is mainly built with ACF data so I figured I could add the post somehow via this API. Am I mistaken and is this not possible?

    http://mylocalpage/wp-json/acf/v2 shows my custom post type and route for
    /acf/v2/my-custom-post-type/(?P<id>[\\d]+)/?(?P<field>[\\w\\-\\_]+)?

    With this I can easily GET or update (PUT) stuff, but how to actually create a post? I tried only
    http://mylocalpage/wp-json/acf/v2/my-custom-post-type and passing POST data to create it, but it says that ‘No route was found’.

    I’m probably kicking in the dark here somehow.

    Thanks for any help.

    https://wordpress.org/plugins/acf-to-rest-api/

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Create custom post type’ is closed to new replies.