Can't able to create a ticket without using contactId

Can't able to create a ticket without using contactId

To create a ticket
contactId mentioned as optional in API documentation link below:

Then i tried contactId as empty i got a response like contactId is missing below:
stdClass Object
(
    [errorCode] => INVALID_DATA
    [message] => The data is invalid due to validation restrictions
    [errors] => Array
        (
            [0] => stdClass Object
                (
                    [fieldName] => /contactId
                    [errorType] => missing
                    [errorMessage] => 
                )

        )

)