Alle Agents gehören zu einer Marke (Unternehmen, Organisation oder Gruppe). Bevor Sie einen Agent erstellen können, müssen Sie zuerst eine Marke erstellen. Marken sind rein organisatorisch und helfen Ihnen, ähnliche KI-Agenten zu gruppieren.
Tester zu einem Agent hinzufügen
cURL
curl -v -X POST "https://businesscommunications.googleapis.com/v1/testers" \ -H "Content-Type: application/json" \ -H "User-Agent: curl/business-messaging" \ -H "`oauth2l header --json rbm-developer-service-account-credentials.json businesscommunications`" \ -d "{ 'agentId': '$AGENT_ID', 'phoneNumber': '$MSISDN' }"
Python
endpoint_url = (BASE_ENDPOINT + 'testers') body = { "agentId": agentId, "phoneNumber": msisdn } response = authed_session.post(endpoint_url, data=json.dumps(body))
Tester eines Agents auflisten
cURL
curl -v -X GET "https://businesscommunications.googleapis.com/v1/testers?agentId=$AGENT_ID" \ -H "User-Agent: curl/business-messaging" \ -H "`oauth2l header --json rbm-developer-service-account-credentials.json businesscommunications`"
Python
endpoint_url = (BASE_ENDPOINT + 'testers?' + 'agentId=' + agentId) response = authed_session.get(endpoint_url)
Status eines Testers abrufen
cURL
curl -v -X GET "https://businesscommunications.googleapis.com/v1/$TESTER_ID?agentId=$AGENT_ID" \ -H "User-Agent: curl/business-messaging" \ -H "`oauth2l header --json rbm-developer-service-account-credentials.json businesscommunications`"
Python
endpoint_url = (BASE_ENDPOINT + testerId + '?agentId=' + agentId) response = authed_session.get(endpoint_url)
Tester löschen
cURL
curl -v -X DELETE "https://businesscommunications.googleapis.com/v1/$TESTER_ID?agentId=$AGENT_ID" \ -H "User-Agent: curl/business-messaging" \ -H "`oauth2l header --json rbm-developer-service-account-credentials.json businesscommunications`"
Python
endpoint_url = (BASE_ENDPOINT + testerId + '?agentId=' + agentId) response = authed_session.delete(endpoint_url)