diff --git a/src/main/java/com/auth0/client/mgmt/ManagementAPI.java b/src/main/java/com/auth0/client/mgmt/ManagementAPI.java
index bc2a2d8f..6d4b03c2 100644
--- a/src/main/java/com/auth0/client/mgmt/ManagementAPI.java
+++ b/src/main/java/com/auth0/client/mgmt/ManagementAPI.java
@@ -388,6 +388,14 @@ public PromptsEntity prompts() {
return new PromptsEntity(client, baseUrl, tokenProvider);
}
+ /**
+ * Getter for the SelfServiceProfiles Entity
+ * @return the SelfServiceProfiles Entity
+ */
+ public SelfServiceProfilesEntity selfServiceProfiles() {
+ return new SelfServiceProfilesEntity(client, baseUrl, tokenProvider);
+ }
+
/**
* Builder for {@link ManagementAPI} API client instances.
*/
diff --git a/src/main/java/com/auth0/client/mgmt/SelfServiceProfilesEntity.java b/src/main/java/com/auth0/client/mgmt/SelfServiceProfilesEntity.java
new file mode 100644
index 00000000..cf1cbdfe
--- /dev/null
+++ b/src/main/java/com/auth0/client/mgmt/SelfServiceProfilesEntity.java
@@ -0,0 +1,239 @@
+package com.auth0.client.mgmt;
+
+import com.auth0.client.mgmt.filter.PageBasedPaginationFilter;
+import com.auth0.json.mgmt.selfserviceprofiles.SelfServiceProfile;
+import com.auth0.json.mgmt.selfserviceprofiles.SelfServiceProfileResponse;
+import com.auth0.json.mgmt.selfserviceprofiles.SelfServiceProfileResponsePage;
+import com.auth0.json.mgmt.selfserviceprofiles.SsoAccessTicketResponse;
+import com.auth0.net.*;
+import com.auth0.net.client.Auth0HttpClient;
+import com.auth0.net.client.HttpMethod;
+import com.auth0.utils.Asserts;
+import com.fasterxml.jackson.core.type.TypeReference;
+import okhttp3.HttpUrl;
+
+import java.util.Map;
+
+public class SelfServiceProfilesEntity extends BaseManagementEntity {
+
+ private final static String ORGS_PATH = "api/v2/self-service-profiles";
+
+ SelfServiceProfilesEntity(Auth0HttpClient client, HttpUrl baseUrl, TokenProvider tokenProvider) {
+ super(client, baseUrl, tokenProvider);
+ }
+
+ /**
+ * Request the list of self-service profiles.
+ * A token with {@code read:self_service_profiles} scope is needed
+ * @see https://auth0.com/docs/api/management/v2#!/self-service-profiles/get-self-service-profiles
+ * @param pageFilter the pagination filter to apply. Can be null to use the default values.
+ * @return a Request to execute.
+ */
+ public Request get(PageBasedPaginationFilter pageFilter) {
+ HttpUrl.Builder builder = baseUrl.newBuilder()
+ .addPathSegments(ORGS_PATH);
+
+ if (pageFilter != null) {
+ for (Map.Entry e : pageFilter.getAsMap().entrySet()) {
+ builder.addQueryParameter(e.getKey(), String.valueOf(e.getValue()));
+ }
+ }
+
+ String url = builder.build().toString();
+ return new BaseRequest<>(this.client, tokenProvider, url, HttpMethod.GET, new TypeReference() {
+ });
+ }
+
+ /**
+ * Create a new self-service profile.
+ * A token with {@code create:self_service_profiles} scope is needed
+ * @see https://auth0.com/docs/api/management/v2#!/self-service-profiles/post-self-service-profiles
+ * @param selfServiceProfile the self-service profile to create.
+ * @return a Request to execute.
+ */
+ public Request create(SelfServiceProfile selfServiceProfile) {
+ Asserts.assertNotNull(selfServiceProfile, "self service profile");
+ Asserts.assertNotNull(selfServiceProfile.getName(), "name");
+
+ String url = baseUrl.newBuilder()
+ .addPathSegments(ORGS_PATH)
+ .build()
+ .toString();
+
+ BaseRequest request = new BaseRequest<>(this.client, tokenProvider, url, HttpMethod.POST, new TypeReference() {
+ });
+ request.setBody(selfServiceProfile);
+ return request;
+ }
+
+ /**
+ * Request the self-service profile with the given ID.
+ * A token with {@code read:self_service_profiles} scope is needed
+ * @see https://auth0.com/docs/api/management/v2#!/self-service-profiles/get-self-service-profiles-by-id
+ * @param id the self-service profile ID.
+ * @return a Request to execute.
+ */
+ public Request getById(String id) {
+ Asserts.assertNotNull(id, "id");
+
+ String url = baseUrl.newBuilder()
+ .addPathSegments(ORGS_PATH)
+ .addPathSegment(id)
+ .build()
+ .toString();
+
+ return new BaseRequest<>(this.client, tokenProvider, url, HttpMethod.GET, new TypeReference() {
+ });
+ }
+
+ /**
+ * Delete the self-service profile with the given ID.
+ * A token with {@code delete:self_service_profiles} scope is needed
+ * @see https://auth0.com/docs/api/management/v2#!/self-service-profiles/delete-self-service-profiles-by-id
+ * @param id the self-service profile ID.
+ * @return a Request to execute.
+ */
+ public Request delete(String id) {
+ Asserts.assertNotNull(id, "id");
+
+ String url = baseUrl.newBuilder()
+ .addPathSegments(ORGS_PATH)
+ .addPathSegment(id)
+ .build()
+ .toString();
+
+ return new VoidRequest(this.client, tokenProvider, url, HttpMethod.DELETE);
+ }
+
+ /**
+ * Update the self-service profile with the given ID.
+ * A token with {@code update:self_service_profiles} scope is needed
+ * @see https://auth0.com/docs/api/management/v2#!/self-service-profiles/patch-self-service-profiles-by-id
+ * @param selfServiceProfile the self-service profile to update.
+ * @param id the self-service profile ID.
+ * @return a Request to execute.
+ */
+ public Request update(SelfServiceProfile selfServiceProfile, String id) {
+ Asserts.assertNotNull(selfServiceProfile, "self service profile");
+ Asserts.assertNotNull(id, "id");
+
+ String url = baseUrl.newBuilder()
+ .addPathSegments(ORGS_PATH)
+ .addPathSegment(id)
+ .build()
+ .toString();
+
+ BaseRequest request = new BaseRequest<>(this.client, tokenProvider, url, HttpMethod.PATCH, new TypeReference() {
+ });
+ request.setBody(selfServiceProfile);
+ return request;
+ }
+
+ /**
+ * Get the custom text for specific self-service profile and language.
+ * A token with {@code read:self_service_profile_custom_texts} scope is needed
+ * @see https://auth0.com/docs/api/management/v2#!/self-service-profiles/get-self-service-profile-custom-text
+ * @param id the self-service profile ID.
+ * @param language the language.
+ * @param page the page.
+ * @return a Request to execute.
+ */
+ public Request