Skip to main content
The Sling Contacts API lets you organise recipients into named groups, import contacts individually or in bulk, and keep contact details up to date. Once contacts are saved, you can reference them by ID in your messaging requests — avoiding the need to pass raw phone numbers every time you send. All requests require the Authorization: Bearer {API_TOKEN} header.

List your groups

Retrieve all contact groups on your account.
curl --request GET \
  --url https://app.sling.com.ng/api/v1/groups \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer {API_TOKEN}'
{
  "status": "success",
  "groups": [
    {
      "id": 42,
      "name": "Lagos Customers",
      "identifier": "lagos-customers",
      "description": "Customers based in Lagos",
      "contacts_count": 5
    }
  ]
}

Get contacts in a group

Retrieve all contacts belonging to a specific group. Replace {groupid} with the numeric ID of the group.
curl --request GET \
  --url https://app.sling.com.ng/api/v1/group-contacts/{groupid} \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer {API_TOKEN}'

Create a group

Create a new contact group by providing a name, and optionally an identifier and description.
curl --request POST \
  --url https://app.sling.com.ng/api/v1/create-group \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer {API_TOKEN}' \
  --header 'Content-Type: application/json' \
  --data '{
    "name": "Lagos Customers",
    "identifier": "lagos-customers",
    "description": "Customers based in Lagos"
  }'

Parameters

name
string
required
Display name for the new group.
identifier
string
A unique identifier for the group.
description
string
A short description of the group.

Add a single contact

Add one contact to your list. You can optionally assign them to an existing group at creation time.
curl --request POST \
  --url https://app.sling.com.ng/api/v1/add-contact \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer {API_TOKEN}' \
  --header 'Content-Type: application/json' \
  --data '{
    "name": "Amaka Obi",
    "phone": "2348012345678",
    "group_id": "42"
  }'

Parameters

name
string
required
Full name of the contact.
phone
string
required
Phone number of the contact. Accepts 11-digit local format, country code without plus, or with plus.
group_id
string
ID of the group to assign this contact to. Omit to save the contact without a group.

Add multiple contacts

Import a batch of contacts in a single request by passing an array of contact objects.
curl --request POST \
  --url https://app.sling.com.ng/api/v1/add-contacts \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer {API_TOKEN}' \
  --header 'Content-Type: application/json' \
  --data '{
    "contacts": [
      {
        "name": "Amaka Obi",
        "phone": "2348012345678",
        "group_id": "42"
      },
      {
        "name": "Chidi Nwosu",
        "phone": "2348098765432",
        "group_id": "42"
      }
    ]
  }'

Parameters

contacts
object[]
required
Array of contact objects. Each object accepts the same name, phone, and optional group_id fields as the single-contact endpoint.

Update a contact

Update the details of an existing contact. Replace {contactid} with the contact’s numeric ID.
curl --request POST \
  --url https://app.sling.com.ng/api/v1/update-contact/{contactid} \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer {API_TOKEN}' \
  --header 'Content-Type: application/json' \
  --data '{
    "name": "Amaka Obi-Johnson",
    "phone": "2348012345678",
    "group_id": "55"
  }'

Success response

All Contacts API endpoints return the following on success:
{
  "status": "success",
  "balance": "339"
}

Using contacts in messages

Once you have created contacts and groups, you can reference them directly in your SMS and Truecaller send requests:
  • Use the contact parameter with a contact ID to send to a specific saved contact.
  • Use the group parameter with a group ID to send to all contacts in that group.
See the Send SMS guide and Send Truecaller guide for full details.