Skip to main content

Profile Integration Specification

The Profile Integration APIs provide synchronous and asynchronous options to upload and update subscriber records in Msgkart.


Global API Configuration​

ParameterRequired On Every RequestValue
Base URLYeshttps://{{msgkart_host}}
HeaderYesx-api-key: {{api_key}}
HeaderYesContent-Type: application/json

Available Endpoints​

  1. Direct Profile Upload API (POST /api/v3/profile-upload/contacts)
    • Synchronous upload of subscriber profiles directly in the request body.
  2. Bulk Profile Upload API (POST /api/v3/profile-upload/contacts/bulk)
    • Asynchronous import of large profile datasets via a presigned URL.

Standard Profile Body Schema​

The request body must contain a profile array. The specification's direct-upload example shows a single object, but its validation guidance explicitly requires an array ({"profile":[...]}); use the array form. Field names are case-sensitive.

FieldTypeRequiredDescription
phonestringREQUIREDSubscriber's mobile number (e.g. "917415908509"). Record is rejected if missing or invalid.
countrycodestringOptionalISO country code. Defaults to IN if omitted.
namestringOptionalFull name of the subscriber.
ageintegerOptionalAge of the subscriber as an integer.
genderstringOptionalAllowed values: male, female, or other.
dobstringOptionalDate of birth. The field description specifies DD/MM/YYYY, but the sample request uses a Unix-epoch integer; confirm the accepted format with Msgkart before sending this field.
businesssubscriberidstringOptionalYour system's unique user or customer ID (e.g. "CUST-98712").
* (custom fields)anyOptionalAny other custom attribute (e.g., city, tier)

Status & Error Codes​

The following responses are specified for the profile upload endpoints:

HTTP Status CodeConditionResolution
200 OKRequest processed or initiatedIngestion completed, or the background job started.
400 Bad RequestMissing profile arrayFormat the request as {"profile": [...]}.
400 Bad RequestMissing url fieldRequired for bulk upload; provide a non-empty URL.
400 Bad RequestInvalid file URLThe URL scheme must be http or https.
401 UnauthorizedMissing x-api-key headerInclude the x-api-key header on every request.
401 UnauthorizedInvalid API keyThe key is incorrect or deactivated; contact support to rotate it.
500 Internal Server ErrorFailed to fetch and store fileThe presigned URL may have expired, be unauthorized, or return a non-200 response. Verify that it is readable.