# Create Client Application # Overview API to register new Client Applications that can integrate with the Conversation Hub. Client applications are used to send and receive messages. New Account API process flow: Authenticiation > Client Application > Participant > Channel > Orchestration > Account ## Scope Client application must have 'app.conversation.conversationmgr.manage' scope assigned. Endpoint: POST /clientapplications Security: oAuthClient ## Request fields (application/json): - `name` (string, required) Unique name for client application - `description` (string) - `active` (boolean) - `roles` (array, required) - `roles.name` (string, required) Client aplication type Enum: "customer", "custom_bot", "egain_bot", "egain_agent", "custom_agent", "business_notification" - `roles.version` (string, required) Conversation Hub will send payload which is specific to this version. Enum: "v1", "v3" - `roles.callback` (string, required) Callback API to recieve messages from Conversation Hub sent by various participants in conversation. Callback APIs needs to respond within 5 seconds. We strongly recommend to process message asynchronously. API must return 401 if Authorization header is expired, Conversation Hub will generate new Authorization header on 401. Example: "https://example.support.com/messaging/callback/customer" - `roles.notificationEmail` (string, required) If client application callback is not reachable, Conversation Hub sends a notification to this email address Example: "admin@example.com" - `roles.headers` (array) Custom headers for callback, Conversation Hub will include these while sending message to callback - `roles.headers.name` (string, required) name of attribute - `roles.headers.value` (string, required) value of attribute - `roles.authentication` (object) Authentication for callback API. - `roles.authentication.id` (string, required) UUID generated for client application Example: "a987d07a-d59c-11ea-87d0-0242ac13000." ## Response 201 fields (application/json): - `id` (string) UUID generated for the object. ## Response 400 fields (application/json): - `code` (string, required) String that follow the pattern {integer}-{integer}. * The first part is http status code. The code is unique as a whole. Nothing common between 400-101 and 404-101 - `developerMessage` (string, required) Response explaining what happened - `details` (array) - `details.key` (string, required) - `details.value` (string) - `userMessage` (string) UI friendly message only supported by some API. * Client must request explicitly by passing X-egain-error-message=yes header ## Response 401 fields (application/json): - `code` (string, required) String that follow the pattern {integer}-{integer}. * The first part is http status code. The code is unique as a whole. Nothing common between 400-101 and 404-101 - `developerMessage` (string, required) Response explaining what happened - `details` (array) - `details.key` (string, required) - `details.value` (string) - `userMessage` (string) UI friendly message only supported by some API. * Client must request explicitly by passing X-egain-error-message=yes header ## Response 403 fields (application/json): - `code` (string, required) String that follow the pattern {integer}-{integer}. * The first part is http status code. The code is unique as a whole. Nothing common between 400-101 and 404-101 - `developerMessage` (string, required) Response explaining what happened - `details` (array) - `details.key` (string, required) - `details.value` (string) - `userMessage` (string) UI friendly message only supported by some API. * Client must request explicitly by passing X-egain-error-message=yes header ## Response 500 fields (application/json): - `code` (string, required) String that follow the pattern {integer}-{integer}. * The first part is http status code. The code is unique as a whole. Nothing common between 400-101 and 404-101 - `developerMessage` (string, required) Response explaining what happened - `details` (array) - `details.key` (string, required) - `details.value` (string) - `userMessage` (string) UI friendly message only supported by some API. * Client must request explicitly by passing X-egain-error-message=yes header