by copypressdev on WordPress.org
Extend the WordPress REST API with custom endpoints for managing posts, categories, tags, post types, and taxonomies.
The COPYPRESS REST API plugin extends the WordPress REST API with custom endpoints for managing posts, categories, tags, post types, and taxonomies.
/copypress-api/v1/login – Login with username and password to get a JWT token.
username (string): WordPress usernamepassword (string): WordPress passwordPOST /copypress-api/v1/posts – Create a new post.
title (string): The title of the post.content (string): The content of the post.excerpt (string, optional): The excerpt of the post.category (int, optional): The category ID of the post.tags (string, optional): Comma-separated list of tag slugs.image (string, optional): URL of an image to be set as the post’s featured image.post_type (string, optional): The post type (default: post).author_id (int, optional): The ID of the post author (default: current user).post_status (string): Post publish status.PUT /copypress-api/v1/posts/{id} – Update an existing post.
POST endpoint.DELETE /copypress-api/v1/posts/{id} – Delete a post.
GET /copypress-api/v1/categories – Get all categories.
GET /copypress-api/v1/tags – Get all tags.
GET /copypress-api/v1/post-types – Get all public post types.
GET /copypress-api/v1/get-taxonomies/{post_type} – Get all taxonomies (categories and tags) associated with a specific post type.
This plugin allows cross-origin requests for all the REST API endpoints, enabling requests from different domains.
GET, POST, PUT, DELETEContent-Type, X-Custom-Header, x-csrf-token, Authorization* (Any domain)Once the plugin is activated, the custom API routes are available for interaction with posts, categories, tags, post types, and taxonomies. You can make requests to the respective endpoints from any external application or client that can interact with REST APIs. To create or update posts, a valid JWT token must be provided in the Authorization header as:
Authorization: Bearer YOUR_TOKEN_HERE
This plugin is licensed under the GPLv2 license.