Conversations

Hand a conversation between the AI agent and a person

{ "to": "user", "userId": 318 } assigns a person and stops the AI agent on this conversation. { "to": "ai" } clears the person; the AI agent replies to the next inbound message. Assigning the current assignee again returns the current state. Assignment doesn’t change the conversation status, except that assigning a person to a closed conversation reopens it. Call with your workspace API key.

post/conversations/{conversationId}/assign

Request

  • Base URL
    https://api.spurnow.com
  • Auth
    HTTP bearer

Path parameters

conversationIdnumber required

The conversation (inboxId).

Request body

to'user' | 'ai' required

user: hand the conversation to a person; the AI agent stops on it. ai: clear the person assigned; the AI agent replies to the next inbound message.

userIdnumber

Required with to: "user". Must be an active member of the workspace.

Example request

{
  "userId": 318
}

Response

conversationIdnumber required

The conversation (inboxId).

assignedUserIdnumber nullable required

The person assigned (assignedAgentId), or null.

aiAgentActiveboolean required

True when no person is assigned and the number has an AI agent connected: the AI agent answers the next inbound message.

conversationStatus'OPEN' | 'CLOSED' required

Example response

{
  "conversationId": 49205067,
  "assignedUserId": 318
}

Changes

No recorded changes to this operation across all 1 revision of this API.