Update Contact fields

This endpoint updates some fields of a Contact.

Request

To update some fields of a Contact please make a PATCH request to the following URL:

HTTP MethodURL
PATCHhttps://industrial.api.ubidots.com/api/v2.0/contacts/<contact_key>/

Path Parameters

ParameterTypeDescription
contact_keyStringThe id or label of the Contact. The label must use the prefix ~, e.g. ~jane-doe

Body Parameters

Send only the fields to change. Each field replaces the stored value; lists are not merged.

ParameterTypeRequired?Description
nameStringNoName of the Contact. Max 200 characters
labelStringNoLabel of the Contact, stored in lowercase. Max 200 characters. Must be unique in the account
descriptionStringNoDescription of the Contact
tagsString ArrayNoTags of the Contact. Duplicates are removed and tags are stored in lowercase
propertiesObjectNoCustom properties. Custom keys must be declared in _config, otherwise they are dropped
contact_methodsArrayNoAt least one contact method
schedulersArrayNoList of schedulers
🚧

Send contact_methods together with schedulers

On every update the server removes from each scheduler the ids that don't match a contact method sent in the same request. A PATCH with schedulers but without contact_methods leaves every scheduler with an empty contact_methods list. A PATCH with only contact_methods also prunes the stored schedulers to the new methods.

Header

ParameterRequired?Description
X-Auth-TokenYesAuthentication Token of account
Content-TypeYesapplication/json
$ curl -X PATCH 'https://industrial.api.ubidots.com/api/v2.0/contacts/<contact_key>/' \
 -H 'X-Auth-Token: oaXBo6ODhIjPsusNRPUGIK4d72bc73' \
 -H 'Content-Type: application/json' \
 -d '{
    "description": "Maintenance supervisor, plant 2",
    "tags": [
        "maintenance",
        "plant-2"
    ]
}'
{
    "url": "https://industrial.api.ubidots.com/api/v2.0/contacts/6740e1c2f1a3b2000c9d4e51",
    "id": "6740e1c2f1a3b2000c9d4e51",
    "label": "jane-doe",
    "name": "Jane Doe",
    "description": "Maintenance supervisor, plant 2",
    "tags": [
        "maintenance",
        "plant-2"
    ],
    "properties": {
        "_config": null
    },
    "contact_methods": [
        {
            "id": "email:[email protected]",
            "type": "email",
            "is_active": true,
            "email": "[email protected]"
        },
        {
            "id": "sms:+57-+573001234567",
            "type": "sms",
            "is_active": true,
            "country": {
                "id": "CO",
                "label": "Colombia",
                "value": "+57"
            },
            "number": "+573001234567"
        }
    ],
    "schedulers": [
        {
            "timezone": "America/Bogota",
            "days_week": [
                [
                    [
                        "08:00",
                        "18:00"
                    ]
                ],
                [
                    [
                        "08:00",
                        "18:00"
                    ]
                ],
                [
                    [
                        "08:00",
                        "18:00"
                    ]
                ],
                [
                    [
                        "08:00",
                        "18:00"
                    ]
                ],
                [
                    [
                        "08:00",
                        "18:00"
                    ]
                ],
                [],
                []
            ],
            "contact_methods": [
                "sms:+57-+573001234567"
            ]
        }
    ],
    "createdAt": "2026-11-20T14:03:11.512000Z"
}
{
    "code": 400001,
    "message": "Validation Error.",
    "detail": {
        "contact_methods": {
            "0": {
                "email": [
                    "This field is required."
                ]
            }
        }
    }
}
{
    "code": 401001,
    "message": "Authentication credentials were not provided.",
    "detail": "Authentication credentials were not provided."
}
{
    "code": 402001,
    "message": "Your current plan does not include this feature."
}
{
    "detail": "You do not have permission to perform this action."
}
{
    "code": 404001,
    "message": "The request was not found."
}

Response

Returns the updated Contact object.