Skip to content

Latest commit

 

History

History
111 lines (76 loc) · 4.56 KB

File metadata and controls

111 lines (76 loc) · 4.56 KB

SignUps

Overview

Available Operations

  • get - Retrieve a sign-up by ID
  • update - Update a sign-up

get

Retrieve the details of the sign-up with the given ID

Example Usage

package hello.world;

import com.clerk.backend_api.Clerk;
import com.clerk.backend_api.models.errors.ClerkErrors;
import com.clerk.backend_api.models.operations.GetSignUpResponse;
import java.lang.Exception;

public class Application {

    public static void main(String[] args) throws ClerkErrors, Exception {

        Clerk sdk = Clerk.builder()
                .bearerAuth(System.getenv().getOrDefault("BEARER_AUTH", ""))
            .build();

        GetSignUpResponse res = sdk.signUps().get()
                .id("<id>")
                .call();

        if (res.signUp().isPresent()) {
            System.out.println(res.signUp().get());
        }
    }
}

Parameters

Parameter Type Required Description
id String ✔️ The ID of the sign-up to retrieve

Response

GetSignUpResponse

Errors

Error Type Status Code Content Type
models/errors/ClerkErrors 403 application/json
models/errors/SDKError 4XX, 5XX */*

update

Update the sign-up with the given ID

Example Usage

package hello.world;

import com.clerk.backend_api.Clerk;
import com.clerk.backend_api.models.errors.ClerkErrors;
import com.clerk.backend_api.models.operations.UpdateSignUpResponse;
import java.lang.Exception;

public class Application {

    public static void main(String[] args) throws ClerkErrors, Exception {

        Clerk sdk = Clerk.builder()
                .bearerAuth(System.getenv().getOrDefault("BEARER_AUTH", ""))
            .build();

        UpdateSignUpResponse res = sdk.signUps().update()
                .id("<id>")
                .call();

        if (res.signUp().isPresent()) {
            System.out.println(res.signUp().get());
        }
    }
}

Parameters

Parameter Type Required Description
id String ✔️ The ID of the sign-up to update
requestBody Optional<UpdateSignUpRequestBody> N/A

Response

UpdateSignUpResponse

Errors

Error Type Status Code Content Type
models/errors/ClerkErrors 403 application/json
models/errors/SDKError 4XX, 5XX */*