Update an ambassador

PATCH /chat/ambassadors/{ambassador}

Path parameters

  • ambassador integer Required

    The ambassador id

application/json

Body

  • email_tmp string(nullable)

Responses

  • 200 application/json

    Return the updated ambassador

    Hide response attributes Show response attributes object
    • id_ambassador integer(int32)
    • image string
    • firstname string
    • lastname string
    • username string
    • email string
    • email_tmp string
    • active integer(int32)
    • status integer(int32)
    • online boolean

      true: when last_action_date is less than 5 minutes ago

    • last_action_date string(date-time)
    • customer_id string
    • anonymized boolean
  • 401 application/json

    Unauthorized.

    Hide response attribute Show response attribute object
    • message string
  • 403

    Forbidden - You don't have permission to access this route

  • 404

    Not found - The ambassador does not exist

  • 422 application/json

    Unprocessable Content

    Hide response attributes Show response attributes object
    • message string

      Error message.

    • errors object
      Hide errors attributes Show errors attributes object
      • field array[string]

        Error message details.

      • * array[string] Additional properties

        Error message details.

PATCH /chat/ambassadors/{ambassador}
curl \
 --request PATCH 'https://domain.tld/api/v2/chat/ambassadors/{ambassador}' \
 --header "Authorization: Bearer $ACCESS_TOKEN" \
 --header "Content-Type: application/json" \
 --data '{"email_tmp":"string"}'
Request examples
{
  "email_tmp": "string"
}
Response examples (200)
{
  "id_ambassador": 42,
  "image": "string",
  "firstname": "string",
  "lastname": "string",
  "username": "string",
  "email": "string",
  "email_tmp": "string",
  "active": 42,
  "status": 42,
  "online": true,
  "last_action_date": "2025-05-04T09:42:00Z",
  "customer_id": "string",
  "anonymized": true
}
Response examples (401)
{
  "message": "Unauthorized."
}
Response examples (422)
{
  "message": "field is required! (and 3 more error)",
  "errors": {
    "field": [
      "Error message details here"
    ],
    "additionalProperty1": [
      "Error message details here"
    ],
    "additionalProperty2": [
      "Error message details here"
    ]
  }
}