> ## Documentation Index
> Fetch the complete documentation index at: https://docs.b3.fun/llms.txt
> Use this file to discover all available pages before exploring further.

# Set Profile Preference

Allows users to set their preferred profile source through cryptographic signature verification. The signature must be valid and the timestamp must be within 10 minutes of the current time.

` POST /preference `

Set Profile Preference

Allows users to set their preferred profile source through cryptographic signature verification. The signature must be valid and the timestamp must be within 10 minutes of the current time.

## Servers

- ` https://profiles.b3.fun ` — Production server

## Request body (required)

Content type: ` application/json `

- ` value `: type ` object ` — Request to set profile source preference

  - Required fields: ` key `, ` preferredType `, ` signature `, ` signer `, ` timestamp `

  - ` key `: type ` string ` — Ethereum wallet address (will be normalized to lowercase)

  - ` preferredType `: type ` string ` — Preferred profile source type

    - enum: ` ["ensdata","basement","b3-ens","thirdweb-farcaster","thirdweb-lens","global-account"] `

  - ` signature `: type ` string ` — EIP-191 signature of the preference message

  - ` signer `: type ` string ` — Address that signed the message (must match key)

  - ` timestamp `: type ` integer `; format ` int64 ` — Unix timestamp in seconds (must be within 10 minutes of current time)

## Responses

### ` 200 ` — Preference set successfully

Content type: ` application/json `

- ` value `: type ` object `

  - ` success `: type ` boolean `

    - example: ` true `

### ` 400 ` — Bad Request - Invalid signature, timestamp, or authorization

Content type: ` application/json `

- ` value `: type ` object `

  - Required fields: ` error `

  - ` error `: type ` string ` — Error message describing what went wrong

## Request examples

### cURL

```curl
curl -X POST 'https://profiles.b3.fun/preference' \
  -H 'Content-Type: application/json' \
  -d '{
  "key": "string",
  "preferredType": "ensdata",
  "signature": "string",
  "signer": "string",
  "timestamp": 0
}'
```

### JavaScript

```javascript
const response = await fetch('https://profiles.b3.fun/preference', {
  method: 'POST',
  headers: {
      "Content-Type": "application/json"
  },
  body: JSON.stringify({
    "key": "string",
    "preferredType": "ensdata",
    "signature": "string",
    "signer": "string",
    "timestamp": 0
  })
});

const data = await response.json();
console.log(data);
```

### Python

```python
import requests

response = requests.post('https://profiles.b3.fun/preference', json={
  "key": "string",
  "preferredType": "ensdata",
  "signature": "string",
  "signer": "string",
  "timestamp": 0
})
print(response.json())
```