NAV

Welcome

Developer API & Integration documentation (release 2017.11.16.b)

Welcome to the developer API & integration documentation for the aNinja sales & marketing platform.

Account holders can use their API keys to manage leads, contacts, tasks and more.

Please send any questions to aNinja support.

Integrations

One common task is to integrate with your existing website’s contact form in order to forward leads into aNinja.

WordPress Integration

We recommend using the “forms-3rdparty-integration” WordPress plugin in order to integrate your WordPress Contact forms submissions into aNinja. Here are the steps:

  1. Get your API key in your User Settings when logged into ANinja.
  2. Install & activate WP plugin in your WordPress installation: forms-3rdparty-integration
  3. Once the plugin is installed, access the plugins’ setting to configure it as following:

  4. Add a new 3rd-party service, e.g. name it “ANinja” Select the forms you want to attach the service to

Add Endpoint URL (replace with main user API key)

https://acquisition.ninja/api/v1/contactform/?apikey=YOUR_API_KEY_HERE

Map Form fields (without CF7 brackets - see what field names are defined and map to Aninja API fields)

API Authentication

To authorize, use this code:

curl "https://api.aninja.com/v1/"
  -H "Authorization: <API KEY>"

aNinja uses an API Key to authenticate access to the API.

Obtain your API in your Account Settings.

aNinja expects for the API key to be included in all API requests to the server in a header that looks like the following:

Authorization: <API KEY>

API Resources:

The following sections present different API endpoint resources that can be accessed.

- Users

Get My User Information

This endpoints retrieves your user account information.

HTTP Request

GET https://api.aninja.com/api/v1/users/me

Get User List

This endpoints retrieves a list of all users.

HTTP Request

GET https://api.aninja.com/api/v1/users

- Leads

List All Leads

curl "https://api.aninja.com/api/v1/leads"
  -H "Authorization: <API KEY>"

The above command returns JSON structured like this:

[
  {
    "id": 1,
    "name": "John Doe",
  },
  {
    "id": 2,
    "name": "Alfred Doe",
  }
]

This endpoint retrieves all Leads.

HTTP Request

GET https://api.aninja.com/api/v1/leads

Query Parameters

Parameter Default Description

Get a Specific Lead

curl "https://api.aninja.com/api/v1/leads/2"
  -H "Authorization: <API_KEY>"

This endpoint retrieves a specific Lead.

HTTP Request

GET https://api.aninja.com/leads/<ID>

URL Parameters

Parameter Description
ID The ID of the Lead to retrieve

Create a new Lead

URL Parameters

Parameter Description
name* Name of the new Lead
name Name of the new Lead

Update an Lead

Delete an Lead

- Contacts