Reference example
# Fixed reference example. Playground inputs do not update this sample.
curl --request POST \
--url https://api.aisa.one/apis/v1/social/contacts/bulk \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"contacts": [
{
"name": "example"
}
],
"profileId": "prf_2Bn8Wq5Td1Yh7Kc3Mz9Lp4"
}'curl --request POST \
--url https://api.aisa.one/apis/v1/social/contacts/bulk \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"contacts": [
{
"name": "example"
}
],
"profileId": "prf_2Bn8Wq5Td1Yh7Kc3Mz9Lp4"
}
'import requests
url = "https://api.aisa.one/apis/v1/social/contacts/bulk"
payload = {
"contacts": [{ "name": "example" }],
"profileId": "prf_2Bn8Wq5Td1Yh7Kc3Mz9Lp4"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({contacts: [{name: 'example'}], profileId: 'prf_2Bn8Wq5Td1Yh7Kc3Mz9Lp4'})
};
fetch('https://api.aisa.one/apis/v1/social/contacts/bulk', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.aisa.one/apis/v1/social/contacts/bulk",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'contacts' => [
[
'name' => 'example'
]
],
'profileId' => 'prf_2Bn8Wq5Td1Yh7Kc3Mz9Lp4'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.aisa.one/apis/v1/social/contacts/bulk"
payload := strings.NewReader("{\n \"contacts\": [\n {\n \"name\": \"example\"\n }\n ],\n \"profileId\": \"prf_2Bn8Wq5Td1Yh7Kc3Mz9Lp4\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.aisa.one/apis/v1/social/contacts/bulk")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"contacts\": [\n {\n \"name\": \"example\"\n }\n ],\n \"profileId\": \"prf_2Bn8Wq5Td1Yh7Kc3Mz9Lp4\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/apis/v1/social/contacts/bulk")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"contacts\": [\n {\n \"name\": \"example\"\n }\n ],\n \"profileId\": \"prf_2Bn8Wq5Td1Yh7Kc3Mz9Lp4\"\n}"
response = http.request(request)
puts response.read_body{
"created": 123,
"errors": [
"<string>"
],
"skipped": 123,
"success": true,
"total": 123
}{
"error": {
"code": "<string>",
"details": {},
"message": "<string>",
"param": "<string>",
"retryHint": "never",
"retryable": true,
"type": "<string>"
}
}联系人与日历
Bulk create contacts
Contacts. Changes your own setup; needs social:draft. Audited. Ids are yours: accounts acc_…, profiles prf_…, posts pst_…; every other object id is checked against your accounts before the call.
Import up to 1000 contacts at a time. Skips duplicates, merging any new tags onto the existing contact.
Accounts and platform
- accountId is required whenever contacts carry a platformIdentifier (or a row-level accountId).
- platform is always derived from the resolved account, never used to decide whether channels are created. A mismatched platform 404s as account not found.
Per-contact validation
- When accountId is set, each contact must carry a platformIdentifier. A row missing it is rejected individually (reported in errors[], HTTP 200), not a 400 for the whole import.
- On phone platforms (whatsapp, sms) the platformIdentifier is normalized to digits. A value that is not phone-shaped is rejected per contact and reported in errors[], not imported.
POST
https://api.aisa.one
/
apis
/
v1
/
social
/
contacts
/
bulk
Reference example
# Fixed reference example. Playground inputs do not update this sample.
curl --request POST \
--url https://api.aisa.one/apis/v1/social/contacts/bulk \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"contacts": [
{
"name": "example"
}
],
"profileId": "prf_2Bn8Wq5Td1Yh7Kc3Mz9Lp4"
}'curl --request POST \
--url https://api.aisa.one/apis/v1/social/contacts/bulk \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"contacts": [
{
"name": "example"
}
],
"profileId": "prf_2Bn8Wq5Td1Yh7Kc3Mz9Lp4"
}
'import requests
url = "https://api.aisa.one/apis/v1/social/contacts/bulk"
payload = {
"contacts": [{ "name": "example" }],
"profileId": "prf_2Bn8Wq5Td1Yh7Kc3Mz9Lp4"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({contacts: [{name: 'example'}], profileId: 'prf_2Bn8Wq5Td1Yh7Kc3Mz9Lp4'})
};
fetch('https://api.aisa.one/apis/v1/social/contacts/bulk', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.aisa.one/apis/v1/social/contacts/bulk",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'contacts' => [
[
'name' => 'example'
]
],
'profileId' => 'prf_2Bn8Wq5Td1Yh7Kc3Mz9Lp4'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.aisa.one/apis/v1/social/contacts/bulk"
payload := strings.NewReader("{\n \"contacts\": [\n {\n \"name\": \"example\"\n }\n ],\n \"profileId\": \"prf_2Bn8Wq5Td1Yh7Kc3Mz9Lp4\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.aisa.one/apis/v1/social/contacts/bulk")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"contacts\": [\n {\n \"name\": \"example\"\n }\n ],\n \"profileId\": \"prf_2Bn8Wq5Td1Yh7Kc3Mz9Lp4\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/apis/v1/social/contacts/bulk")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"contacts\": [\n {\n \"name\": \"example\"\n }\n ],\n \"profileId\": \"prf_2Bn8Wq5Td1Yh7Kc3Mz9Lp4\"\n}"
response = http.request(request)
puts response.read_body{
"created": 123,
"errors": [
"<string>"
],
"skipped": 123,
"success": true,
"total": 123
}{
"error": {
"code": "<string>",
"details": {},
"message": "<string>",
"param": "<string>",
"retryHint": "never",
"retryable": true,
"type": "<string>"
}
}请求规范
- 方法与路径: POST /apis/v1/social/contacts/bulk
- 可用状态: enabled
- 请求 URL 模板:
https://api.aisa.one/apis/v1/social/contacts/bulk
{
"operationId": "post_aisa_social_apis_v1_social_contacts_bulk",
"method": "POST",
"path": "/apis/v1/social/contacts/bulk",
"servers": [
{
"url": "https://api.aisa.one"
}
],
"parameters": [],
"security": [
{
"bearerAuth": []
}
],
"requestBody": {
"content": {
"application/json": {
"example": {
"contacts": [
{
"name": "example"
}
],
"profileId": "prf_2Bn8Wq5Td1Yh7Kc3Mz9Lp4"
},
"schema": {
"properties": {
"accountId": {
"description": "One of your social accounts (acc_...).",
"pattern": "^acc_[0-9A-Za-z]{22}$",
"type": "string"
},
"contacts": {
"items": {
"properties": {
"company": {
"type": "string"
},
"displayIdentifier": {
"type": "string"
},
"email": {
"type": "string"
},
"name": {
"type": "string"
},
"platformIdentifier": {
"description": "Required when the top-level accountId is set (channel mode). A row missing it in that mode is rejected individually and reported in errors[], not a 400 for the whole import.",
"type": "string"
},
"tags": {
"items": {
"type": "string"
},
"type": "array"
}
},
"required": [
"name"
],
"type": "object"
},
"maxItems": 1000,
"type": "array"
},
"platform": {
"description": "Ignored when accountId is set: the platform is derived from the resolved account. Only relevant to disambiguate accountId lookup; a mismatch 404s.",
"type": "string"
},
"profileId": {
"description": "One of your profiles (prf_...).",
"pattern": "^prf_[0-9A-Za-z]{22}$",
"type": "string"
}
},
"required": [
"contacts",
"profileId"
],
"type": "object"
}
}
},
"required": true
},
"x-aisa-status": "enabled",
"components": {
"securitySchemes": {
"bearerAuth": {
"scheme": "bearer",
"type": "http"
}
}
}
}
费用与请求规则
此操作不另收费。授权
请求体
application/json