Simple way to add contacts via command line?

Hi,

basically, what I want to do is, take some base user data that falls out of a previous script and feed it into a commandline to add this user as a new contact into a third-party hosted (no access to the backend) nextcloud instance.

I was hoping for something as simple as PUT requests to add a new entry but to no avail.

I’m trying to make sense from the API docs and previously asked questions but it doesn’t click. I got as far as to understand that some *dav standard is what I need to go through but that’s about it. I read that reading entries is fairly simple but because of different detail implementations, writing is not.
I take that the nextcloud API docs are regarding files and such and that the contact app is different and has nothing to do with what the nextcloud API is about. Is that correct?
Thus the nextcloud commandline API client also isn’t capable of adding a new contact?

Is a client as this https://pypi.org/project/webdavclient3/ what I would go through to interact with the contacts app?

Thanks a lot

I don’t know that specific app but you should be able to use any DAV client (e.g. DavFS2 etc.) to access Nextcloud data, like files, contacts and calendars. Please keep in mind that you never interact with the Contacts app because it is a client appilcation too. You always access the data store directly.