Create a token of a Talk-call via API

In our small club project, we as users want to create a new task and at the same time a talk token for a chat or video call, which will be assigned to the respective task.

How to create a talk call token via API?
So far I have only discovered that you can read chat content from Nextcloud via an external website with API events, but how can I start a new chat externally?

Does the following approach make sense because I don’t know of a direct API command to create a new chat.

  1. Authentication from the portal via the Nextcloud API.
  2. Using the API endpoint to initiate a call, e.g.
    POST /ocs/v2.php/apps/spreed/api/v4/call.
  3. Passing the required parameters such as the participants’ IDs, call type, etc.
  4. The API will initiate the call and create the required token in the background.
  5. Query the created token and assign it to a task.

How exactly do I have to proceed?
I’m a real beginner!
Please help me, I just don’t know what to do, but I like Nextcloud!

You can find the API documentation at Either use the API directly, or maybe you could use occ talk:room:create

Thanks for the reply!
Is there an example somewhere for creating a new conversation or can someone give an example here?