PUT
/
users
curl --request PUT \
  --url https://app.melodi.fyi/api/external/users \
  --header 'Content-Type: application/json' \
  --header 'api-key: <api-key>' \
  --data '{
  "externalId": "<string>",
  "email": "<string>",
  "name": "<string>",
  "username": "<string>",
  "segments": {
    "team": "engineering",
    "role": "developer"
  }
}'
{
  "id": 123,
  "organizationId": 456,
  "externalId": "user123",
  "name": "John Doe",
  "email": "user@example.com",
  "username": "johndoe",
  "segments": [
    {
      "id": 789,
      "name": "developer",
      "type": {
        "id": 101,
        "name": "role"
      }
    }
  ],
  "createdAt": "2024-03-21T00:00:00Z",
  "updatedAt": "2024-03-21T00:00:00Z"
}

Authorizations

api-key
string
header
required

Your Melodi API key

Body

application/json

External user object for creation or update

Request object for creating or updating an external user

Response

200
application/json

External user successfully created or updated

Represents an external user. Note: The combination of organizationId and externalId must be unique.