> For the complete documentation index, see [llms.txt](https://developers.bloomcredit.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developers.bloomcredit.io/quick-start/create-your-first-consumer.md).

# Create Consumers

## Consumer

A consumer represents a single, unique, real-world human being. The information provided when creating a consumer allows Bloom to look for that consumer's credit information across bureaus.

### Create a consumer

Once you have completed the API Authentication setup, you can start registering consumers within Bloom using the Consumer API. The consumer details include the following:

* Birth Date
* Last name
* First name
* Address
  * Street name and number
  * City
  * State Code
  * Zip Code
  * Country Code
    * If a country code is not specified, it will be set as US by default
  * Primary

{% hint style="warning" %}
**Primary Address**

A consumer may have multiple addresses, but one of them must be set as the primary address.
{% endhint %}

Check out the [Creates a Consumer](/reference/core/consumers/creates-a-consumer.md) API reference to learn how to send a `POST` request to Consumer API with the consumer's personal information in the request body.

The response will include an ID ( `consumer_id`) that is used to identify the consumer uniquely.

### Consumer Registration Example Request

You can see an example of a `POST` request made to the Consumer API below:

{% tabs %}
{% tab title="cURL" %}

```bash
curl --location --request POST 'https://sandbox.bloom.dev/v2/core/consumers' \
--header 'Authorization: Bearer $ACCESS_TOKEN' \
--header 'Content-Type: application/json' \
--data-raw '{
    "data": {
        "type": "consumers",
        "attributes": {
            "ssn": "123456789",
            "date_of_birth": "1964-03-15",
            "name": {
                "first_name": "Michael",
                "last_name": "Scott"
            },
            "addresses": [
                {
                    "line1": "1725 Slough Avenue",
                    "city": "Scranton",
                    "state_code": "PA",
                    "zipcode": "18503",
                    "primary": true
                }
            ]
        }
    }
}'
```

{% endtab %}

{% tab title="HTTP" %}

```http
POST /v2/core/consumers HTTP/1.1
Host: sandbox.bloom.dev
Authorization: Bearer $TOKEN
Content-Type: application/json
Content-Length: 560

{
    "data": {
        "type": "consumers",
        "attributes": {
            "ssn": "123456789",
            "date_of_birth": "1964-03-15",
            "name": {
                "first_name": "Michael",
                "last_name": "Scott"
            },
            "addresses": [
                {
                    "line1": "1725 Slough Avenue",
                    "city": "Scranton",
                    "state_code": "PA",
                    "zipcode": "18503",
                    "primary": true
                }
            ]
        }
    }
}
```

{% endtab %}

{% tab title="JavaScript - Fetch" %}

```javascript
var myHeaders = new Headers();
myHeaders.append("Authorization", "Bearer $ACCESS_TOKEN");
myHeaders.append("Content-Type", "application/json");

var raw = JSON.stringify({
  "data": {
    "type": "consumers",
    "attributes": {
      "ssn": "123456789",
      "date_of_birth": "1964-03-15",
      "name": {
        "first_name": "Michael",
        "last_name": "Scott"
      },
      "addresses": [
        {
          "line1": "1725 Slough Avenue",
          "city": "Scranton",
          "state_code": "PA",
          "zipcode": "18503",
          "primary": true
        }
      ]
    }
  }
});

var requestOptions = {
  method: 'POST',
  headers: myHeaders,
  body: raw,
  redirect: 'follow'
};

fetch("https://sandbox.bloom.dev/v2/core/consumers", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));
```

{% endtab %}

{% tab title="Python - Requests" %}

```python
import requests
import json

url = "https://sandbox.bloom.dev/v2/core/consumers"

payload = json.dumps({
  "data": {
    "type": "consumers",
    "attributes": {
      "ssn": "123456789",
      "date_of_birth": "1964-03-15",
      "name": {
        "first_name": "Michael",
        "last_name": "Scott"
      },
      "addresses": [
        {
          "line1": "1725 Slough Avenue",
          "city": "Scranton",
          "state_code": "PA",
          "zipcode": "18503",
          "primary": True
        }
      ]
    }
  }
})
headers = {
  'Authorization': 'Bearer $ACCESS_TOKEN',
  'Content-Type': 'application/json'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)

```

{% endtab %}

{% tab title="Node.js" %}

```javascript
var request = require('request');
var options = {
  'method': 'POST',
  'url': 'https://sandbox.bloom.dev/v2/core/consumers',
  'headers': {
    'Authorization': 'Bearer $ACCESS_TOKEN',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    "data": {
      "type": "consumers",
      "attributes": {
        "ssn": "123456789",
        "date_of_birth": "1964-03-15",
        "name": {
          "first_name": "Michael",
          "last_name": "Scott"
        },
        "addresses": [
          {
            "line1": "1725 Slough Avenue",
            "city": "Scranton",
            "state_code": "PA",
            "zipcode": "18503",
            "primary": true
          }
        ]
      }
    }
  })

};
request(options, function (error, response) {
  if (error) throw new Error(error);
  console.log(response.body);
});

```

{% endtab %}

{% tab title="Go" %}

```go
package main

import (
  "fmt"
  "strings"
  "net/http"
  "io/ioutil"
)

func main() {

  url := "https://sandbox.bloom.dev/v2/core/consumers"
  method := "POST"

  payload := strings.NewReader(`{
    "data": {
        "type": "consumers",
        "attributes": {
            "ssn": "123456789",
            "date_of_birth": "1964-03-15",
            "name": {
                "first_name": "Michael",
                "last_name": "Scott"
            },
            "addresses": [
                {
                    "line1": "1725 Slough Avenue",
                    "city": "Scranton",
                    "state_code": "PA",
                    "zipcode": "18503",
                    "primary": true
                }
            ]
        }
    }
}`)

  client := &http.Client {
  }
  req, err := http.NewRequest(method, url, payload)

  if err != nil {
    fmt.Println(err)
    return
  }
  req.Header.Add("Authorization", "Bearer $ACCESS_TOKEN")
  req.Header.Add("Content-Type", "application/json")

  res, err := client.Do(req)
  if err != nil {
    fmt.Println(err)
    return
  }
  defer res.Body.Close()

  body, err := ioutil.ReadAll(res.Body)
  if err != nil {
    fmt.Println(err)
    return
  }
  fmt.Println(string(body))
}
```

{% endtab %}
{% endtabs %}

### Consumer Registration Example Response

You can see an example of a response to a consumer registration request below:

{% code title="JSON" %}

```json
{
    "data": {
        "id": "720ba006-c578-4155-95ee-26013cfeb348",
        "type": "consumers",
        "attributes": {
            "ssn": "123456789",
            "date_of_birth": "1964-03-15",
            "name": {
                "first_name": "Michael",
                "last_name": "Scott"
            },
            "addresses": [
                {
                    "id": "355ac53e-4147-4fc6-8dba-537e853440aa",
                    "line1": "1725 Slough Avenue",
                    "city": "Scranton",
                    "state_code": "PA",
                    "zipcode": "18503",
                    "country_code": "US",
                    "primary": true,
                    "metro2": {
                        "line1_metro2": "1725 SLOUGH AVENUE",
                        "city_metro2": "SCRANTON",
                        "state_code_metro2": "PA",
                        "zipcode_metro2": "18503"
                    }
                }
            ]
        }
    }
}
```

{% endcode %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://developers.bloomcredit.io/quick-start/create-your-first-consumer.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
