Skip to main content
PATCH
/
agents
/
{id}
Update an agent
curl --request PATCH \
  --url https://api.myupfront.com/v1/agents/{id} \
  --header 'Content-Type: application/json' \
  --header 'x-upfront-key: <api-key>' \
  --data '
{
  "first_name": "Jane",
  "last_name": "Doe",
  "role": "AGENT",
  "date_of_birth": "1990-01-01",
  "external_id": "123",
  "metadata": {
    "key": "value"
  },
  "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

Path Parameters

id
string
required
Example:

"abc123"

Body

application/json

The agent to update

first_name
string
Required string length: 1 - 255
Example:

"Jane"

last_name
string
Required string length: 1 - 255
Example:

"Doe"

role
enum<string>
Available options:
COLLECTIVE_ADMIN,
BROKER_ADMIN,
OFFICE_ADMIN,
ADMIN,
AGENT
Example:

"AGENT"

date_of_birth
string | null
Example:

"1990-01-01"

external_id
string
Example:

"123"

metadata
object
Example:
{ "key": "value" }
brokerage_id
string
Example:

"cm5gy0r4m00000cjs97rxc467"

office_id
string
Example:

"cm5gy0r4m00000cjs97rxc467"

collective_id
string
Example:

"cm5gy0r4m00000cjs97rxc467"

Response

The updated 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"
}
]