Create Agent API

This API allows to add new agents to the Alohaa portal with necessary details including contact information, work hours etc.

Endpoint Description

POST https://user.alohaa.ai/v1/external/user

Parameters

Request Headers

FieldValueDescriptionMandatory

Content-Type

application/json

Specifies the content type of the request.

Yes

x-metro-api-key

*************************

API key for authentication purposes.

Yes

Request Body

FieldData TypeDescriptionMandatory

name

String

Full name of the agent.

Yes

email

String

Email address of the agent.

Yes

phoneNumber

String

Contact number of the agent.

Yes

startTime

String

Work shift start time (e.g., "10:00").

Yes

endTime

String

Work shift end time (e.g., "19:00").

Yes

empId

String

Employee ID.

Yes

Sample Request

{
  "x-metro-api-key": "****************"
}

Responses

Success Response

{
  "success": true,
  "response": {
    "message": "Agent Created Successfully"
  }
}

Failure Response

{
  "success": false,
  "error": {
    "code": 1099,
    "reason": "Invalid schema or Missing Data sent"
  }
}

Error Codes

CodeDescription

2002

Phone number is not valid

2003

Email is not valid

2004

Phone number is already linked to another agent

2005

Email id is already linked to another agent

2017

DIDs are unavailable

2009

Agent already exists

1099

Invalid schema or Missing Data sent

Last updated