API

Authentication

Authentication is OAuth2 based. We use AWS Cognito. Refer this url to know how it works. https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-userpools-server-contract-reference.html

Ask us for the client_id and client_secret and provide us the redirect_url by sending an email to support@7targets.com

Response

Successful authorization, returns the auth token to be used in further API calls

Status: 200

{ 
 "access_token":"eyJz9sdfsdfsdfsd", 
 "refresh_token":"dn43ud8uj32nk2je", 
 "id_token":"dmcxd329ujdmkemkd349r",
 "token_type":"Bearer", 
 "expires_in":3600
}

Authorization Header for the API calls
Authorization : Bearer <id_token>


Create a Lead

This method creates or assigns a Lead to the Assistant.

url_path: https://api.7targets.com/leads
type: POST

Request

The headers must include a **valid authentication token.
Authentication: Bearer <IdToken from the Auth cal>

The body can’t be empty

{
    name: "John",  //Mandatory
    lastName: "Doe", 
    source: "Website", //Optional. If not provided Website will be used.
    context: "AI Sales Assistant", //Assistant will write message using this
    additionalInformationLine: "Additional information", 
    email: "john.doe@gmail.com", //Mandatory 
    phone: "+919123456789", 
    scheduleId : <valid schedule Id>, //Optional. If not provided then use default
    assistantId : <your assistant Id> //Optional. If not provided then default will be used.
}

Response

If succeeds, returns the created Lead.

Status: 201 Created

{
    id: 2345,
    name: "John",   
    lastName: "Doe", 
    type: "SALES", 
    email: "john.doe@gmail.com", 
    phone: "+919123456789", 
    scheduleId : <valid schedule Id>,
    assistantId : <your assistant Id>,
    nextScheduleTime : <date and time the message will be send>,
    state : Cold,
    subState : Followup,
    followup : 1
}
×

Subscribe

The latest tutorials sent straight to your inbox.