• Knowledge Base
    • All Articles
    • BuddyBoss Platform
    • BuddyBoss Theme
    • BuddyBoss App
    • Integrations
    • Advanced Setup
    • Troubleshooting
    • Release Notes
      • BuddyBoss Platform
      • BuddyBoss Platform Pro
      • BuddyBoss Theme
      • BuddyBoss App
      • BuddyBoss App Plugin
      • Other Products
  • Developers
    • Developer Tutorials
      • Web Development
      • App Development
    • Code Reference
      • Functions
      • Hooks
      • Classes
      • Methods
      • Commands
      • App Codex
    • REST API
      • BuddyBoss Platform
      • BuddyBoss App
    • Font Cheatsheet
    • Github Project
  • Roadmap
  • Go to BuddyBoss
    Contact Support
    Filter
    • Knowledge Base
      • All Articles
      • BuddyBoss Platform
      • BuddyBoss Theme
      • BuddyBoss App
      • Integrations
      • Advanced Setup
      • Troubleshooting
      • Release Notes
        • BuddyBoss Platform
        • BuddyBoss Platform Pro
        • BuddyBoss Theme
        • BuddyBoss App
        • BuddyBoss App Plugin
        • Other Products
    • Developers
      • Developer Tutorials
        • Web Development
        • App Development
      • Code Reference
        • Functions
        • Hooks
        • Classes
        • Methods
        • Commands
        • App Codex
      • REST API
        • BuddyBoss Platform
        • BuddyBoss App
      • Font Cheatsheet
      • Github Project
    • Roadmap
    • Go to BuddyBoss
    Filter
    Filter

    Contents

    • Description
    • Source
    • Changelog
    • Related
    Code Reference Classes BP_REST_Signup_Endpoint BP_REST_Signup_Endpoint::register_routes()

    BP_REST_Signup_Endpoint::register_routes()

    Register the component routes.

    Description

    Source

    File: bp-members/classes/class-bp-rest-signup-endpoint.php

    	public function register_routes() {
    		register_rest_route(
    			$this->namespace,
    			'/' . $this->rest_base . '/form',
    			array(
    				array(
    					'methods'             => WP_REST_Server::READABLE,
    					'callback'            => array( $this, 'signup_form_items' ),
    					'permission_callback' => array( $this, 'signup_form_items_permissions_check' ),
    				),
    				'schema' => array( $this, 'get_item_schema' ),
    			)
    		);
    
    		register_rest_route(
    			$this->namespace,
    			'/' . $this->rest_base,
    			array(
    				array(
    					'methods'             => WP_REST_Server::READABLE,
    					'callback'            => array( $this, 'get_items' ),
    					'permission_callback' => array( $this, 'get_items_permissions_check' ),
    					'args'                => $this->get_collection_params(),
    				),
    				array(
    					'methods'             => WP_REST_Server::CREATABLE,
    					'callback'            => array( $this, 'create_item' ),
    					'permission_callback' => array( $this, 'create_item_permissions_check' ),
    					'args'                => $this->get_endpoint_args_for_item_schema( WP_REST_Server::CREATABLE ),
    				),
    				'schema' => array( $this, 'get_item_schema' ),
    			)
    		);
    
    		register_rest_route(
    			$this->namespace,
    			'/' . $this->rest_base . '/(?P<id>[\w-]+)',
    			array(
    				'args'   => array(
    					'id' => array(
    						'description' => __( 'Identifier for the signup. Can be a signup ID, an email address, or a user_login.', 'buddyboss' ),
    						'type'        => 'string',
    					),
    				),
    				array(
    					'methods'             => WP_REST_Server::READABLE,
    					'callback'            => array( $this, 'get_item' ),
    					'permission_callback' => array( $this, 'get_item_permissions_check' ),
    					'args'                => array(
    						'context' => $this->get_context_param(
    							array(
    								'default' => 'view',
    							)
    						),
    					),
    				),
    				array(
    					'methods'             => WP_REST_Server::DELETABLE,
    					'callback'            => array( $this, 'delete_item' ),
    					'permission_callback' => array( $this, 'delete_item_permissions_check' ),
    					'args'                => array(
    						'context' => $this->get_context_param( array( 'default' => 'edit' ) ),
    					),
    				),
    				'schema' => array( $this, 'get_item_schema' ),
    			)
    		);
    
    		// Register the activate route.
    		register_rest_route(
    			$this->namespace,
    			'/' . $this->rest_base . '/activate/(?P<id>[\w-]+)',
    			array(
    				'args'   => array(
    					'id' => array(
    						'description' => __( 'Identifier for the signup. Can be a signup ID, an email address, or a user_login.', 'buddyboss' ),
    						'type'        => 'string',
    					),
    				),
    				array(
    					'methods'             => WP_REST_Server::EDITABLE,
    					'callback'            => array( $this, 'activate_item' ),
    					'permission_callback' => array( $this, 'activate_item_permissions_check' ),
    					'args'                => array(
    						'context' => $this->get_context_param( array( 'default' => 'edit' ) ),
    					),
    				),
    				'schema' => array( $this, 'get_item_schema' ),
    			)
    		);
    	}
    

    Expand full source code Collapse full source code

    Changelog

    Changelog
    Version Description
    0.1.0 Introduced.

    Related

    Uses

    Uses
    Uses Description
    bp-members/classes/class-bp-rest-signup-endpoint.php: BP_REST_Signup_Endpoint::get_collection_params()

    Get the query params for collections.

    bp-members/classes/class-bp-rest-signup-endpoint.php: BP_REST_Signup_Endpoint::get_endpoint_args_for_item_schema()

    Edit the type of the some properties for the CREATABLE & EDITABLE methods.

    Questions?

    We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.

    © 2025 • BuddyBoss