API Reference
Log inSign up
v1.7.3
v1.7.3
  • ComplyCube API Reference
  • Integration
  • Test and Live
  • Authentication
  • Rate Limits
  • Service Quota
  • Errors
  • Pagination
  • Filtering
  • Versioning
  • Core resources
    • Clients
      • Create a client
      • Get a client
      • Update a client
      • Delete a client
      • List clients
      • Filtering clients
    • Addresses
      • Create an address
      • Get an address
      • Update an address
      • Delete an address
      • List addresses
      • Filtering addresses
    • Documents
      • Create a document
      • Get a document
      • Update a document
      • Upload image attachment
      • Delete image attachment
      • Download image attachment
      • Redact image attachment
      • Delete a document
      • List documents
      • Filtering documents
    • Live Photos
      • Upload a live photo
      • Get a live photo
      • Download live photo
      • Redact live photo
      • Delete a live photo
      • List live photos
    • Live Videos
      • Get a live video
      • Redact live video
      • Delete live video
      • List live videos
    • Checks
      • Create a check
      • Get a check
      • Update a check
      • Validate check outcome
      • Redact check outcome
      • List checks
      • Filtering checks
    • Risk Profile
      • Get a risk profile
  • Check types
    • AML Screening Check
    • Document Check
    • Identity Check
    • Enhanced Identity Check
    • Proof of Address Check
    • Multi-Bureau Check
    • Face Authentication Check
    • Age Estimation Check
  • Lookups
    • Company Search
      • Search company
      • Get company details
    • Address Search
      • Search address
  • Tools
    • Custom Lists
      • Get a custom list
      • Add entity to custom list
      • List custom lists
  • Static Data
    • Screening Lists
    • Supported Documents
  • Other Resources
    • Flow (Hosted Solution)
      • Create a session
    • Webhooks
      • Create a webhook
      • Get a webhook
      • Update a webhook
      • Delete a webhook
      • List webhooks
      • Filtering webhooks
    • SDK Tokens
      • Generate a token
    • Autofill
      • Perform autofill
    • Reports
      • Generate a client report
      • Generate a check report
    • Team Members
      • Get a team member
      • List team members
      • Filtering team members
    • Audit Logs
      • Get an audit log
      • List audit logs
      • Filtering audit logs
    • Account Info
      • Get account info
  • Useful Resources
    • Testing Data
    • User Docs
Powered by GitBook
On this page
  • URL
  • Headers
  • Body
  • Example request
  • Example response

Was this helpful?

  1. Other Resources
  2. Flow (Hosted Solution)

Create a session

URL

POST https://api.complycube.com/v1/flow/sessions

Creates a session.

Headers

Name
Type
Description

Content-Type*

string

The content-type must always be set to application/json.

Authorization*

string

The API live or test key

Body

Name
Type
Description

clientId*

string

The ID of the client.

checkTypes*

string

An array of check types. Valid values include: 1. standard_screening_check 2. extensive_screening_check 3. document_check 4. identity_check 5. enhanced_identity_check 6. proof_of_address_check

7. face_authentication_check 8. age_estimation_check

successUrl*

array

The URL to which ComplyCube should send clients when KYC and identity verification is complete.

cancelUrl*

array

The URL the client will be directed to if they decide to cancel and return to your website.

enableMonitoring

boolean

Determines whether continuous monitoring is enabled for selected check types. When not provided, it defaults to false.

language

string

The UI language. Valid values include:

  1. en (default)

  2. ar

  3. de

  4. es

  5. fr

  6. hi

  7. hk

  8. id

  9. it

  10. ja

  11. ko

  12. nl

  13. no

  14. pl

  15. pt

  16. sv

  17. th

  18. vi

  19. zh

theme

string

The UI theme to apply. Valid values include:

  1. light (default)

  2. dark

allowDocumentUpload

boolean

Indicates whether to force users to capture their documents using their phones. This removes the document upload option. When not provided, it defaults to true.

supportEmail

string

The support email address that appears on the UI for your clients. When not provided, no email address will be displayed.

messages

object

documentTypes

object

The list of ID document types the client can select. When not provided, your client can select any of the types we support.

The checkTypes attribute

The documentTypes object

Attribute

Type

Description

passport

boolean

Enable or disable passport selection. (Optional)

driving_license

boolean

Enable or disable driving license selection. (Optional)

residence_permit

boolean

Enable or disable residence permit selection. (Optional)

national_identity_card

boolean

Enable or disable national identity card selection. (Optional)

The messages object

Attribute

Type

Description

intro

object

completion

object

The content object

Attribute

Type

Description

heading

string

The heading of the page. (Optional)

message

string

The message body of the page. (Optional)

Example request

curl -X POST https://api.complycube.com/v1/flow/sessions \
     -H 'Authorization: <YOUR_API_KEY>' \
     -H 'Content-Type: application/json' \
     -d '{
          "clientId": "CLIENT_ID",
          "checkTypes": ["extensive_screening_check", "identity_check", "document_check"],
          "successUrl": "https://www.yoursite.com/success",
          "cancelUrl": "https://www.yoursite.com/cancel",
          "documentTypes": {
               "passport": true,
               "driving_license": false,
               "residence_permit": true,
               "national_identity_card": true
          },
          "messages": {
                "intro": {
                    "heading": "Customized header",
                    "message": "Customized message body"
                },
                "completion": {
                    "heading": "Customized header",
                    "message": "Customized message body"
                }
          }
        }'
const { ComplyCube } = require("@complycube/api");

const complycube = new ComplyCube({ apiKey: "<YOUR_API_KEY>" });

const session = await complycube.flow.createSession("CLIENT_ID", {
    checkTypes: [
      "extensive_screening_check",
      "identity_check",
      "document_check"
    ],
    successUrl: "https://www.yoursite.com/success",
    cancelUrl: "https://www.yoursite.com/cancel",
    theme: "light",
    messages: {
      intro: {
        heading: "Customized header",
        message: "Customized message body"
      },
      completion: {
        heading: "Customized header",
        message: "Customized message body"
      }
    }
});
from complycube import ComplyCubeClient

cc_api = ComplyCubeClient(api_key='<YOUR_API_KEY>')

flow_request = {   
        'clientId': 'CLIENT_ID', 
        'checkTypes':[  'extensive_screening_check',
                        'identity_check',
                        'document_check'],
        'successUrl':'https://wwww.yoursite.com/success',
        'cancelUrl':'https://wwww.yoursite.com/cancel',
        'theme': 'light'
        }
   
session = ccapi.flow.create(**flow_request)
use ComplyCube\ComplyCubeClient;

$ccapi = new ComplyCubeClient('<YOUR_API_KEY>');
$fsess = $ccapi->flow()->createSession(
                           ['clientId' => 'CLIENT_ID', 
                           'checkTypes' => ['extensive_screening_check',
                                            'identity_check',
                                            'document_check'], 
                           'successUrl' => 'https://www.yoursite.com/success',
                           'cancelUrl' => 'https://www.yoursite.com/cancel',
                           'theme' => 'light']);
using ComplyCube.Net;
using ComplyCube.Net.Resources.FlowSessions;

var fSession = new FlowSessionApi(new ComplyCubeClient("<YOUR_API_KEY>"));

var flowSession = new FlowSessionRequest {
  clientId = "CLIENT_ID",
  checkTypes = new string[] {
    "extensive_screening_check",
    "identity_check",
    "document_check"
  },
  successUrl = "https://www.yoursite.com/success",
  cancelUrl = "https://www.yoursite.com/cancel"
};

var result = fSession.CreateAsync(flowSession).Result;

Example response

{
    "redirectUrl": "https://flow.complycube.com/test_ODdkNjhiOTU0MzY4YmE5NjRmMDMyY2E5MWYwZjgxNjMzZTcyMWJmNzU2YjZmNDQ4NmFjMTU0ZGZhYTU5MmNhY2NiNjI3ZDE4YWJkYmU2M2M3ZWYzZTlmM2M3MzgxMmM3NzZhMjVlYmQyNDI0ODdkOWQ3M2JiMjkxZTYxNzdhYmExMGEzOGRhYmM2OTIwMjgyYmEzZGY3ZDY0NWZhMjcwN2RlMTFkOTcxZWNhOWI2Zjg0NjllZGNkODVjYzMzMDA5YjdlMWY5OGIwMmZjY2UzNGI2YTMxOGQxNGZmNGFhYjczNzU0YmYwMjFkMzU1M2FjMjQ4ZDQ2ZjJjZTY4YWY0MzIxNjVlMDRjOTIyYTExMTlmMWU3YTYwMDY1NGJmYWM0NTA2MDE5NTg5NTkxYzA4MzYyYTUyM2I0NDM4OGExNWIyMTIzYTBhNDc0NDA4NWM2ZTQwMmNjMGVjMTk2YW?theme=light"
}
{
    "type": "invalid_request",
    "message": "'clientId' is invalid",
    "param": "clientId"
}

PreviousFlow (Hosted Solution)NextWebhooks

Last updated 11 months ago

Was this helpful?

The custom messages to display on the UI for your users. Also, see the .

The checkTypes attribute represents the you would like to perform on your client. ComplyCube will generate the relevant UI capture screens based on the check types provided.

The intro screen message content. See the (Optional)

The completion screen message content. See the (Optional)

check types
messages object below
content object below.
content object below.