Update a user
PATCH /users/{id}
PATCH /users/{id}
Operation
PATCH
/users/{id}
Non-admin callers may only update their own profile (name, given/family_name, linkedin_profile_url, role_title, based_in). Admin callers may additionally mutate email, admin flag, auth0_uid, publisher_id, agency_id, network_id, advertiser_id, payment_date, company_type, publisher_type, and password.
Operation ID:
updateUser
·
Tags: Users
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
id
|
path | Yes | integer | — |
Request Body
Required: Yes
{
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"user": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"given_name": {
"type": "string"
},
"family_name": {
"type": "string"
},
"email": {
"type": "string",
"format": "email",
"description": "Admin-only"
},
"linkedin_profile_url": {
"type": "string",
"format": "uri"
},
"role_title": {
"type": "string"
},
"based_in": {
"type": "string"
},
"admin": {
"type": "boolean",
"description": "Admin-only"
},
"auth0_uid": {
"type": "string",
"description": "Admin-only"
},
"publisher_id": {
"type": "integer",
"description": "Admin-only"
},
"agency_id": {
"type": "integer",
"description": "Admin-only"
},
"network_id": {
"type": "integer",
"description": "Admin-only"
},
"advertiser_id": {
"type": "integer",
"description": "Admin-only"
},
"payment_date": {
"type": "string",
"format": "date",
"description": "Admin-only"
},
"company_type": {
"type": "string",
"description": "Admin-only"
},
"publisher_type": {
"type": "string",
"description": "Admin-only"
},
"password": {
"type": "string",
"description": "Admin-only password reset"
}
}
}
},
"required": [
"user"
]
},
"examples": {
"self_profile_update": {
"summary": "User updating their own profile",
"value": {
"user": {
"given_name": "New",
"family_name": "Name",
"based_in": "Paris, FR"
}
}
},
"admin_moves_user": {
"summary": "Admin moving a user to a publisher",
"value": {
"user": {
"publisher_id": 42
}
}
}
}
}
}
}
Responses
Content Types
application/json
{
"description": "Updated user",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"data": {
"type": "object",
"additionalProperties": true
}
}
}
}
}
}
{
"$ref": "#/components/responses/Unauthorized"
}
{
"$ref": "#/components/responses/Forbidden"
}
{
"$ref": "#/components/responses/NotFound"
}
Content Types
application/json
{
"description": "Validation errors",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
API Playground
The in-page tester only supports GET. For PATCH, use the sample curl below or the dedicated resource docs (e.g. Contacts, Link Builder).
Sign in to enable live testing with your API key.
| Action | Method | Endpoint | Description |
|---|---|---|---|
| Update a user | PATCH |
/api/v1/users/1 |
OpenAPI operationId: updateUser. |
Example request (replace YOUR_API_KEY or sign in above):
curl -X PATCH "https://app.hienergy.ai/api/v1/users/1" \
-H "X-Api-Key: YOUR_API_KEY" \
-H "Accept: application/json"
-H "Content-Type: application/json" \
-d '{}'