MBTI.ai / PersonalityPolice.com 1 1

METAPHYSICS

API Access




This is the official REST API documentation for PersonalityPolice.com to allow you to generate MBTI tests programatically and gather the results when complete to integrate into your own applications / services.

API Endpoint:

https://api.personalitypolice.com/v1/

Response encoding:

JSON

Notice: Every API request requires an API key which you can request from [email protected]






Create test link

Generate a test link for your user to complete.

Method name:

new_test

Accepts GET parameters:

Example:

curl --request GET \
    --url 'https://api.personalitypolice.com/v1/new_test?api_key=123-123-123'

Successful response:

{
    "meta": {
        "status_code": 200,
        "success": true,
        "docs_url": "https://docs.personalitypolice.com/",
        "total_results": 2
    },
    "data": {
        "test_id": "e5c467b01c91e4a307593d583a1890426621e96e94b54384717297",
        "test_url": "https://personalitypolice.com/api-personality-test/e5c467b01c91e4a307593d583a1890426621e96e94b54384717297"
    }
}






Check test result

Check if the test is done and get its results.

Method name:

check_test

Accepts GET parameters:

Example:

curl --request GET \
    --url 'https://api.personalitypolice.com/v1/check_test?api_key=123-123-123&test_id=e5c467b01c91e4a307593d583a1890426621e96e94b54384717297'

Successful response:

{
    "meta": {
        "status_code": 200,
        "success": true,
        "docs_url": "https://docs.personalitypolice.com/",
        "total_results": 7
    },
    "data": {
        "prediction": "ESTJ",
        "predictions": {
            "ESTJ": 3,
            "INTP": 2,
            "ENTJ": 2,
            "ISTP": 2,
            "ENTP": 1,
            "ESFJ": 1,
            "INTJ": 1,
            "ISFP": 1,
            "ESTP": 1,
            "INFJ": 1,
            "INFP": 1,
            "ISFJ": 0,
            "ESFP": 0,
            "ENFJ": 0,
            "ISTJ": 0,
            "ENFP": 0
        },
        "trait_order_conscious": {
            "hero": "ti",
            "parent": "si",
            "child": "ni",
            "inferior": "fi"
        },
        "trait_order_shadow": {
            "nemesis": "ne",
            "critic": "te",
            "trickster": "se",
            "demon": "fe"
        },
        "matches": [
            "Matching ESTJ second highest conscious trait.",
            "Matching ESTJ lowest conscious trait.",
            "Matching ESTJ lowest unconscious trait.",
            "Matching ESTP second highest unconscious trait.",
            "Matching ISTP high conscious trait.",
            "Matching ISTP second lowest conscious trait.",
            "Matching ISFP second lowest conscious trait.",
            "Matching ESFJ second highest conscious trait.",
            "Matching ENTP second highest unconscious trait.",
            "Matching INTP high conscious trait.",
            "Matching INTP second lowest unconscious trait.",
            "Matching ENTJ lowest conscious trait.",
            "Matching ENTJ lowest unconscious trait.",
            "Matching INTJ high unconscious trait.",
            "Matching INFJ high unconscious trait.",
            "Matching INFP second lowest unconscious trait."
        ],
        "test_id": "e5c467b01c91e4a307593d583a1890426621e96e94b54384717297",
        "result_date": "2024-04-18 23:37:43"
    }
}