1. Contacts
RASL
  • Introduction
  • Authentication
  • Changelog
  • Messages
    • Overview
    • Send Text Message
      POST
    • Send Media Message
      POST
    • Send Template Message
      POST
    • Send Interactive Message
      POST
    • List Messages
      GET
    • Get Message
      GET
  • Auth (OTP/Verification)
    • Overview
    • Send OTP
      POST
    • Verify OTP
      POST
    • Resend OTP
      POST
    • Check OTP Status
      POST
    • List Authentication Templates
      GET
  • Templates
    • Overview
    • List Templates
      GET
    • Get Template
      GET
    • Sync Templates
      POST
  • Contacts
    • Overview
    • List Contacts
      GET
    • Create Contact
      POST
    • Get Contact
      GET
    • Update Contact
      PATCH
    • Delete Contact
      DELETE
    • Batch Create Contacts
      POST
    • Batch Delete Contacts
      DELETE
  • Groups
    • Overview
    • List Groups
    • Create Group
    • Get Group
    • Update Group
    • Delete Group
    • Add Contacts to Group
    • Remove Contacts from Group
  • Account
    • Overview
    • Get Account Info
    • Get Usage Statistics
    • Get Plan Limits
  • Integrations
    • Webhook Format Reference
    • N8N Webhook Integration
    • eCommerce Webhook Integration
      • Webhook Listener
      • WooCommerce Webhook Setup
Dashboard
Support
Support
  • Email
  • WhatsApp
Dashboard
Support
Support
  • Email
  • WhatsApp
Instagram
  1. Contacts

Batch Create Contacts

POST
https://getrasl.io/api/v2/contacts/batch

Create multiple contacts in a single request. Runs inside a database transaction#

Required Scope#

contacts: write

Contact Object Fields#

Each contact in the contacts array follows the same validation as the single create endpoint

Duplicate Detection#

When options.skip_duplicates is true, the phone field is used as the unique identifier. Contacts with an existing phone number in the tenant will be skipped (not failed)

Response#

Success (200 OK): Returns a summary of the batch operation with detailed results

Request

Authorization
Bearer Token
Provide your bearer token in the
Authorization
header when making requests to protected resources.
Example:
Authorization: Bearer ********************
or
Header Params

Body Params application/jsonRequired

Example
{
    "contacts": [
        {
            "firstname": "string",
            "lastname": "string",
            "phone": "string",
            "type": "lead",
            "source_id": 0,
            "status_id": 0,
            "email": "user@example.com",
            "company": "string",
            "description": "string",
            "city": "string",
            "state": "string",
            "zip": "string",
            "address": "string",
            "country_id": 0,
            "assigned_id": 0
        }
    ],
    "options": {
        "continue_on_error": true,
        "skip_duplicates": false
    }
}

Request Code Samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://getrasl.io/api/v2/contacts/batch' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "contacts": [
        {
            "firstname": "string",
            "lastname": "string",
            "phone": "string",
            "type": "lead",
            "source_id": 0,
            "status_id": 0,
            "email": "user@example.com",
            "company": "string",
            "description": "string",
            "city": "string",
            "state": "string",
            "zip": "string",
            "address": "string",
            "country_id": 0,
            "assigned_id": 0
        }
    ],
    "options": {
        "continue_on_error": true,
        "skip_duplicates": false
    }
}'

Responses

🟢200Success
application/json
Body

Example
{
    "success": true,
    "summary": {
        "total": 0,
        "created": 0,
        "skipped": 0,
        "failed": 0
    },
    "created": [
        {
            "property1": "string",
            "property2": "string"
        }
    ],
    "skipped": [
        {
            "index": 0,
            "reason": "string",
            "data": {
                "property1": "string",
                "property2": "string"
            }
        }
    ],
    "errors": [
        {
            "index": 0,
            "data": {
                "property1": "string",
                "property2": "string"
            },
            "errors": {
                "property1": [
                    "string"
                ],
                "property2": [
                    "string"
                ]
            }
        }
    ]
}
🟠401UNAUTHORIZED
🟠403INSUFFICIENT_SCOPE
🟠403FEATURE_LIMIT_EXCEEDED
🟠404NOT_FOUND
🟠422VALIDATION_ERROR
🟠422WHATSAPP_NOT_CONFIGURED
🟠429RATE_LIMIT_EXCEEDED
🔴500INTERNAL_ERROR
Previous
Delete Contact
Next
Batch Delete Contacts
Built with