---
title: Create a profile
slug: andrei/create-a-profile
createdAt: 2026-10-05T10:36:01.732Z
---

{
  "id": "1X2HdS1fIpTHun7yGKLrD",
  "type": "api-oas-v2",
  "data": {
    "method": "POST",
    "url": "https://api.detected.app/api/v2/public/profiles",
    "servers": [
      {
        "url": "https://api.detected.app/api/v2/public/profiles",
        "description": "Production"
      }
    ],
    "name": "Create a profile",
    "description": "<p>Creates a profile. There are two ways to do it, both using this endpoint with different fields.</p>\n<h3>Option 1: create from a search result</h3>\n<p>Use this after you have searched for the company with <code>POST /search</code>. Send the <code>lookup_id</code> from the search response and the <code>response_id</code> of the result you want. The company details come from the search result, so do not send them yourself.</p>\n<ul>\n<li>Required: <code>customer_reference</code>, <code>lookup_id</code>, <code>response_id</code></li>\n<li>Optional: <code>type</code>, <code>domain</code>, <code>brand_id</code></li>\n</ul>\n<h3>Option 2: create manually</h3>\n<p>Use this when the company cannot be found by search, or when you want to supply the details yourself. Send the company details.</p>\n<ul>\n<li>Required: <code>customer_reference</code>, <code>name</code>, <code>address</code> (with <code>country_code</code> and <code>city</code>)</li>\n<li>Optional: <code>type</code>, <code>company_number</code>, <code>vat_number</code>, <code>domain</code>, <code>brand_id</code>, and the rest of the address</li>\n</ul>\n<p>If you do not send <code>type</code>, <code>company_number</code> is also required. If you send <code>type</code>, the exact company details that are required depend on the entity type.</p>\n<p>You cannot mix the two options: a request that contains <code>lookup_id</code> or <code>response_id</code> together with any of the company details (<code>name</code>, <code>company_number</code>, <code>vat_number</code> or <code>address</code>) is rejected with a <code>422</code> error.</p>",
    "contentType": "application/json",
    "request": {
      "pathParameters": [],
      "headerParameters": [
        {
          "name": "accept",
          "type": "string",
          "kind": "optional",
          "description": "Generated from available response content types",
          "enum": [
            "application/json"
          ],
          "default": "application/json"
        }
      ],
      "queryParameters": [],
      "bodyDataParameters": [
        {
          "kind": "optional",
          "name": "body",
          "type": "object",
          "description": "<p>Send either the search result fields (Option 1) or the company details (Option 2). See the description of this endpoint.</p>",
          "customType": "CreateProfileRequest",
          "schema": [],
          "modelRef": "#/components/schemas/CreateProfileRequest",
          "complexItems": [
            {
              "name": "object",
              "schema": [
                {
                  "name": "type",
                  "kind": "optional",
                  "type": "string<company | sole_trader | partnership | charity | government_entity | incorporated_syndicate | company_syndicate | syndicate | association | trust | fund | club | individual | joint_individual>",
                  "description": "Entity type of the profile.",
                  "enum": [
                    "company",
                    "sole_trader",
                    "partnership",
                    "charity",
                    "government_entity",
                    "incorporated_syndicate",
                    "company_syndicate",
                    "syndicate",
                    "association",
                    "trust",
                    "fund",
                    "club",
                    "individual",
                    "joint_individual"
                  ]
                },
                {
                  "name": "lookup_id",
                  "kind": "required",
                  "type": "number",
                  "description": "<p>Lookup ID from a <code>POST /search</code> response. Send it with <code>response_id</code> to create the profile from a search result.</p>"
                },
                {
                  "name": "response_id",
                  "kind": "required",
                  "type": "number",
                  "description": "<p>ID of the search result to create the profile from. Send it with <code>lookup_id</code>.</p>"
                },
                {
                  "name": "customer_reference",
                  "kind": "required",
                  "type": "string",
                  "description": "Your unique reference for the profile."
                },
                {
                  "name": "brand_id",
                  "kind": "optional",
                  "type": "string<uuid>",
                  "description": "Brand UUID to assign to the profile.",
                  "format": "uuid"
                },
                {
                  "name": "domain",
                  "kind": "optional",
                  "type": "string",
                  "description": "<p>Company domain, without protocol or path, for example <code>detected.co</code>.</p>"
                }
              ],
              "modelRef": "#/components/schemas/CreateProfileFromSearchRequest",
              "customType": "CreateProfileFromSearchRequest"
            },
            {
              "name": "object",
              "schema": [
                {
                  "name": "type",
                  "kind": "optional",
                  "type": "string<company | sole_trader | partnership | charity | government_entity | incorporated_syndicate | company_syndicate | syndicate | association | trust | fund | club | individual | joint_individual>",
                  "description": "Entity type of the profile.",
                  "enum": [
                    "company",
                    "sole_trader",
                    "partnership",
                    "charity",
                    "government_entity",
                    "incorporated_syndicate",
                    "company_syndicate",
                    "syndicate",
                    "association",
                    "trust",
                    "fund",
                    "club",
                    "individual",
                    "joint_individual"
                  ]
                },
                {
                  "name": "customer_reference",
                  "kind": "required",
                  "type": "string",
                  "description": "Your unique reference for the profile."
                },
                {
                  "name": "brand_id",
                  "kind": "optional",
                  "type": "string<uuid>",
                  "description": "Brand UUID to assign to the profile.",
                  "format": "uuid"
                },
                {
                  "name": "company_number",
                  "kind": "optional",
                  "type": "string",
                  "description": "Company registration number."
                },
                {
                  "name": "name",
                  "kind": "required",
                  "type": "string",
                  "description": "Company name."
                },
                {
                  "name": "vat_number",
                  "kind": "optional",
                  "type": "string",
                  "description": "VAT number."
                },
                {
                  "name": "domain",
                  "kind": "optional",
                  "type": "string",
                  "description": "<p>Company domain, without protocol or path, for example <code>detected.co</code>.</p>"
                },
                {
                  "name": "address",
                  "kind": "required",
                  "type": "object",
                  "description": "Address of the company.",
                  "example": "",
                  "schema": [
                    {
                      "name": "line_1",
                      "kind": "optional",
                      "type": "string",
                      "description": "First line of the address."
                    },
                    {
                      "name": "line_2",
                      "kind": "optional",
                      "type": "string",
                      "description": "Second line of the address."
                    },
                    {
                      "name": "country_code",
                      "kind": "required",
                      "type": "string",
                      "description": "<p>Country of the address, ISO 3166-1 alpha-2 country code.</p>"
                    },
                    {
                      "name": "town",
                      "kind": "optional",
                      "type": "string",
                      "description": "Town."
                    },
                    {
                      "name": "city",
                      "kind": "required",
                      "type": "string",
                      "description": "City."
                    },
                    {
                      "name": "post_code",
                      "kind": "optional",
                      "type": "string",
                      "description": "Postcode."
                    },
                    {
                      "name": "province",
                      "kind": "optional",
                      "type": "string",
                      "description": "Province."
                    },
                    {
                      "name": "state",
                      "kind": "optional",
                      "type": "string",
                      "description": "State or region."
                    }
                  ]
                }
              ],
              "modelRef": "#/components/schemas/CreateProfileManualRequest",
              "customType": "CreateProfileManualRequest"
            }
          ],
          "complexType": "oneOf",
          "isExpanded": true
        }
      ],
      "formDataParameters": [],
      "oAuthParameters": [
        {
          "id": "AccessToken",
          "name": "AccessToken",
          "kind": "optional",
          "type": "http",
          "description": "<p>The API uses OAuth 2.0. Request an access token from <code>POST /oauth/token</code> with the client ID and client secret of your integration client, and your account slug. Send the access token in the <code>Authorization</code> header of every request, in the format <code>Authorization: Bearer &#x3C;access_token></code>. The access token carries the scopes set on your integration client in the dashboard. Access tokens expire. When one expires, request a new one.</p>",
          "scheme": "bearer"
        }
      ],
      "cookieParameters": []
    },
    "responses": [
      {
        "statusCode": "201",
        "description": "Created. The profile was created.",
        "jsonExample": "",
        "isExpanded": true,
        "headers": [
          {
            "kind": "optional",
            "name": "X-RateLimit-Limit",
            "description": ""
          },
          {
            "kind": "optional",
            "name": "X-RateLimit-Remaining",
            "description": ""
          },
          {
            "kind": "optional",
            "name": "x-ratelimit-reset",
            "description": ""
          },
          {
            "kind": "optional",
            "name": "retry-after",
            "description": ""
          }
        ],
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "schema": [
              {
                "name": "data",
                "kind": "optional",
                "type": "object",
                "description": "",
                "modelRef": "#/components/schemas/ProfileListResource",
                "customType": "ProfileListResource",
                "schema": [
                  {
                    "name": "id",
                    "kind": "required",
                    "type": "string",
                    "description": "Profile UUID."
                  },
                  {
                    "name": "entity_type",
                    "kind": "optional",
                    "type": "object",
                    "description": "Entity type information.",
                    "example": "",
                    "schema": [
                      {
                        "name": "id",
                        "kind": "optional",
                        "type": "integer",
                        "description": "Entity type ID."
                      },
                      {
                        "name": "type",
                        "kind": "optional",
                        "type": "string<company | sole_trader | partnership | charity | government_entity | incorporated_syndicate | company_syndicate | syndicate | association | trust | fund | club | individual | joint_individual>",
                        "description": "Entity type value.",
                        "enum": [
                          "company",
                          "sole_trader",
                          "partnership",
                          "charity",
                          "government_entity",
                          "incorporated_syndicate",
                          "company_syndicate",
                          "syndicate",
                          "association",
                          "trust",
                          "fund",
                          "club",
                          "individual",
                          "joint_individual"
                        ]
                      },
                      {
                        "name": "label",
                        "kind": "optional",
                        "type": "string",
                        "description": "Entity type label."
                      }
                    ]
                  },
                  {
                    "name": "customer_reference",
                    "kind": "required",
                    "type": "string",
                    "description": "Your unique reference for the profile."
                  },
                  {
                    "name": "company_name",
                    "kind": "optional",
                    "type": "string",
                    "description": "Name of the company."
                  },
                  {
                    "name": "risk",
                    "kind": "optional",
                    "type": "object",
                    "description": "<p>Risk category assigned to the profile, or <code>null</code> if there is none.</p>",
                    "example": "",
                    "schema": [
                      {
                        "name": "id",
                        "kind": "optional",
                        "type": "string",
                        "description": "Risk category ID."
                      },
                      {
                        "name": "label",
                        "kind": "optional",
                        "type": "string",
                        "description": "Label of the risk category."
                      },
                      {
                        "name": "category",
                        "kind": "optional",
                        "type": "string",
                        "description": "Category of the risk."
                      }
                    ]
                  },
                  {
                    "name": "team",
                    "kind": "optional",
                    "type": "object",
                    "description": "<p>Team the profile is assigned to, or <code>null</code> if there is none.</p>",
                    "example": "",
                    "schema": [
                      {
                        "name": "id",
                        "kind": "optional",
                        "type": "number",
                        "description": "Team ID."
                      },
                      {
                        "name": "label",
                        "kind": "optional",
                        "type": "string",
                        "description": "Label of the team."
                      }
                    ]
                  },
                  {
                    "name": "configuration",
                    "kind": "optional",
                    "type": "object",
                    "description": "<p>Configuration assigned to the profile, or <code>null</code> if there is none.</p>",
                    "example": "",
                    "schema": [
                      {
                        "name": "id",
                        "kind": "optional",
                        "type": "number",
                        "description": "Configuration ID."
                      },
                      {
                        "name": "name",
                        "kind": "optional",
                        "type": "string",
                        "description": "Name of the configuration."
                      }
                    ]
                  },
                  {
                    "name": "brand",
                    "kind": "optional",
                    "type": "object",
                    "description": "<p>Brand assigned to the profile, or <code>null</code> if there is none.</p>",
                    "example": "",
                    "schema": [
                      {
                        "name": "id",
                        "kind": "optional",
                        "type": "string",
                        "description": "Brand UUID."
                      },
                      {
                        "name": "name",
                        "kind": "optional",
                        "type": "string",
                        "description": "Brand name."
                      },
                      {
                        "name": "slug",
                        "kind": "optional",
                        "type": "string",
                        "description": "Brand slug."
                      }
                    ]
                  },
                  {
                    "name": "review_status",
                    "kind": "required",
                    "type": "string<Processed | Needs Review | Additional Info Required | Approved | Declined | Archived>",
                    "description": "Review status of the profile.",
                    "enum": [
                      "Processed",
                      "Needs Review",
                      "Additional Info Required",
                      "Approved",
                      "Declined",
                      "Archived"
                    ]
                  },
                  {
                    "name": "assignee",
                    "kind": "optional",
                    "type": "object",
                    "description": "<p>Case management user the profile is assigned to, or <code>null</code> if there is none.</p>",
                    "example": "",
                    "schema": [
                      {
                        "name": "id",
                        "kind": "optional",
                        "type": "string",
                        "description": "ID of the case management user."
                      },
                      {
                        "name": "name",
                        "kind": "optional",
                        "type": "string",
                        "description": "Name of the case management user."
                      }
                    ]
                  },
                  {
                    "name": "review_at",
                    "kind": "optional",
                    "type": "string",
                    "description": "Date the profile's current review period started. The next review falls a configured review period after this date."
                  },
                  {
                    "name": "updated_at",
                    "kind": "required",
                    "type": "string",
                    "description": "Date and time the profile was last updated."
                  },
                  {
                    "name": "created_at",
                    "kind": "required",
                    "type": "string",
                    "description": "Date and time the profile was created."
                  }
                ]
              }
            ],
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "401",
        "description": "<p>Unauthorized. The access token is missing, invalid or has expired.</p>",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "schema": [
              {
                "name": "message",
                "kind": "optional",
                "type": "string",
                "description": "<p>A human-readable description of the error.</p>"
              }
            ],
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "422",
        "description": "Unprocessable Content. The request was understood but failed validation. The response lists the fields that failed and why.",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "schema": [
              {
                "name": "message",
                "kind": "optional",
                "type": "string",
                "description": "<p>A human-readable description of the error.</p>"
              },
              {
                "name": "example_field",
                "kind": "optional",
                "type": "array",
                "description": "<p>Validation errors for one field of the request body. The property name is the name of the field that failed validation (<code>example_field</code> is a placeholder).</p>",
                "example": "",
                "itemType": "string",
                "customType": "string[]",
                "itemExample": "",
                "itemDefault": ""
              }
            ],
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "429",
        "description": "<p>Too Many Requests. You have exceeded the rate limit. Wait for the number of seconds given in the <code>Retry-After</code> header before trying again.</p>",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "schema": [
              {
                "name": "message",
                "kind": "optional",
                "type": "string",
                "description": "<p>A human-readable description of the error.</p>"
              }
            ],
            "isExpanded": true
          }
        ]
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "example-0-curl",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url https://api.detected.app/api/v2/public/profiles \\\n     --header 'accept: application/json' \\\n     --header 'content-type: application/json' \\\n     --data '{\n     \"lookup_id\": \"\",\n     \"response_id\": \"\",\n     \"customer_reference\": \"\"\n     }'"
        },
        {
          "id": "example-1-javascript",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\n\nvar raw = JSON.stringify({\n   \"lookup_id\": \"\",\n   \"response_id\": \"\",\n   \"customer_reference\": \"\"\n});\n\nvar requestOptions = {\n   method: 'POST',\n   headers: myHeaders,\n   body: raw,\n   redirect: 'follow'\n};\n\nfetch(\"https://api.detected.app/api/v2/public/profiles\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "example-2-ruby",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://api.detected.app/api/v2/public/profiles\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\nrequest.body = JSON.dump({\n   \"lookup_id\": \"\",\n   \"response_id\": \"\",\n   \"customer_reference\": \"\"\n})\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "example-3-python",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://api.detected.app/api/v2/public/profiles\"\n\npayload = json.dumps({\n   \"lookup_id\": \"\",\n   \"response_id\": \"\",\n   \"customer_reference\": \"\"\n})\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "example-0-curl"
    },
    "results": {
      "languages": [
        {
          "id": "response-0-201",
          "language": "201",
          "code": "// Created. The profile was created.\n{\n  \"data\": {\n    \"id\": \"\",\n    \"entity_type\": {\n      \"id\": 0,\n      \"type\": \"\",\n      \"label\": \"\"\n    },\n    \"customer_reference\": \"\",\n    \"company_name\": \"\",\n    \"risk\": {\n      \"id\": \"\",\n      \"label\": \"\",\n      \"category\": \"\"\n    },\n    \"team\": {\n      \"id\": 0,\n      \"label\": \"\"\n    },\n    \"configuration\": {\n      \"id\": 0,\n      \"name\": \"\"\n    },\n    \"brand\": {\n      \"id\": \"\",\n      \"name\": \"\",\n      \"slug\": \"\"\n    },\n    \"review_status\": \"\",\n    \"assignee\": {\n      \"id\": \"\",\n      \"name\": \"\"\n    },\n    \"review_at\": \"\",\n    \"updated_at\": \"\",\n    \"created_at\": \"\"\n  }\n}"
        },
        {
          "id": "response-1-401",
          "language": "401",
          "code": "// Unauthorized. The access token is missing, invalid or has expired.\n{\n  \"message\": \"\"\n}"
        },
        {
          "id": "response-2-422",
          "language": "422",
          "code": "// Unprocessable Content. The request was understood but failed validation. The response lists the fields that failed and why.\n{\n  \"message\": \"\",\n  \"example_field\": [\n    \"\"\n  ]\n}"
        },
        {
          "id": "response-3-429",
          "language": "429",
          "code": "// Too Many Requests. You have exceeded the rate limit. Wait for the number of seconds given in the Retry-After header before trying again.\n{\n  \"message\": \"\"\n}"
        }
      ],
      "selectedLanguageId": "response-0-201"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}