Skip to main content
POST
/
agents
Create agent
curl --request POST \
  --url https://api.myupfront.com/v1/agents \
  --header 'Content-Type: application/json' \
  --header 'x-upfront-key: <api-key>' \
  --data '
{
  "email": "[email protected]",
  "first_name": "Jane",
  "last_name": "Doe",
  "profile": {
    "tier": "A",
    "id": "<string>",
    "userId": "<string>",
    "realStaqUUID": "<string>",
    "realStaqOfficeId": "<string>",
    "realStaqMlsAgentId": "<string>",
    "realStaqMlsId": "<string>",
    "realStaqStatus": "<string>",
    "mlsId": "<string>",
    "onboardingComplete": true,
    "payloadConnectedAccountId": "<string>",
    "payloadOnboardingComplete": true,
    "clientMetadata": {},
    "externalId": "<string>"
  },
  "role": "AGENT",
  "phone": "+12345678900",
  "image_url": "https://example.com/image.jpg",
  "date_of_birth": "1990-01-01",
  "brokerage_id": "cm5gy0r4m00000cjs97rxc467",
  "office_id": "cm5gy0r4m00000cjs97rxc467",
  "collective_id": "cm5gy0r4m00000cjs97rxc467"
}
'
{
  "id": "cm5gy0r4m00000cjs97rxc467",
  "email": "[email protected]",
  "date_of_birth": "1990-01-01",
  "first_name": "Jane",
  "last_name": "Doe",
  "profile": {
    "onboarding_complete": true,
    "client_metadata": {},
    "external_id": "<string>"
  },
  "current_brokerage_id": "cm5gy0r4m00000cjs97rxc467",
  "role_assignments": [
    {
      "brokerage_id": "cm5gy0r4m00000cjs97rxc467",
      "office_id": "null",
      "collective_id": "null",
      "role": "BROKER_ADMIN"
    }
  ]
}

Authorizations

x-upfront-key
string
header
required

Upfront API key

Body

application/json

The agent to create

email
string<email>
required
first_name
string
required
Required string length: 1 - 255
Example:

"Jane"

last_name
string
required
Required string length: 1 - 255
Example:

"Doe"

profile
object
required
role
enum<string>
default:AGENT
Available options:
COLLECTIVE_ADMIN,
BROKER_ADMIN,
OFFICE_ADMIN,
ADMIN,
AGENT
Example:

"AGENT"

phone
string
Example:

"+12345678900"

image_url
string | null
Example:

"https://example.com/image.jpg"

date_of_birth
string | null
Example:

"1990-01-01"

brokerage_id
string | null
Example:

"cm5gy0r4m00000cjs97rxc467"

office_id
string | null
Example:

"cm5gy0r4m00000cjs97rxc467"

collective_id
string | null
Example:

"cm5gy0r4m00000cjs97rxc467"

Response

The created agent

id
string
required
Example:

"cm5gy0r4m00000cjs97rxc467"

email
string<email>
required
date_of_birth
string | null
required
Example:

"1990-01-01"

first_name
string
required
Required string length: 1 - 255
Example:

"Jane"

last_name
string
required
Required string length: 1 - 255
Example:

"Doe"

profile
object
required
current_brokerage_id
string | null
required

The ID of the brokerage the agent is currently associated with. An agent can only be active with a single brokerage. A null value indicates the agent is not associated with a brokerage.

Example:

"cm5gy0r4m00000cjs97rxc467"

role_assignments
object[]
required
Example:
[
  {
    "brokerage_id": "cm5gy0r4m00000cjs97rxc467",
    "office_id": "null",
    "collective_id": "null",
    "role": "BROKER_ADMIN"
  }
]